commit stringlengths 40 40 | old_file stringlengths 4 118 | new_file stringlengths 4 118 | old_contents stringlengths 0 2.94k | new_contents stringlengths 1 4.43k | subject stringlengths 15 444 | message stringlengths 16 3.45k | lang stringclasses 1
value | license stringclasses 13
values | repos stringlengths 5 43.2k | prompt stringlengths 17 4.58k | response stringlengths 1 4.43k | prompt_tagged stringlengths 58 4.62k | response_tagged stringlengths 1 4.43k | text stringlengths 132 7.29k | text_tagged stringlengths 173 7.33k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6547d653491adb6ab46e4a3a5f8251129719d3f7 | login/middleware.py | login/middleware.py | from django.conf import settings
from django.http import HttpResponseRedirect
DETACH_PATH = '/user/detach'
ACTIVATE_PATH = '/user/activate'
class DetachMiddleware(object):
def process_request(self, request):
if not request.path == '/login/' \
and not request.path.startswith('/api'):
... | from django.conf import settings
from django.http import HttpResponseRedirect
DETACH_PATH = '/user/detach'
ACTIVATE_PATH = '/user/activate'
class DetachMiddleware(object):
def process_request(self, request):
if not request.path == '/login/' \
and not request.path.startswith('/api') \
... | Remove infinite loop if user is neither native nor verified | Remove infinite loop if user is neither native nor verified
| Python | agpl-3.0 | openego/oeplatform,openego/oeplatform,openego/oeplatform,openego/oeplatform | from django.conf import settings
from django.http import HttpResponseRedirect
DETACH_PATH = '/user/detach'
ACTIVATE_PATH = '/user/activate'
class DetachMiddleware(object):
def process_request(self, request):
if not request.path == '/login/' \
and not request.path.startswith('/api'):
... | from django.conf import settings
from django.http import HttpResponseRedirect
DETACH_PATH = '/user/detach'
ACTIVATE_PATH = '/user/activate'
class DetachMiddleware(object):
def process_request(self, request):
if not request.path == '/login/' \
and not request.path.startswith('/api') \
... | <commit_before>from django.conf import settings
from django.http import HttpResponseRedirect
DETACH_PATH = '/user/detach'
ACTIVATE_PATH = '/user/activate'
class DetachMiddleware(object):
def process_request(self, request):
if not request.path == '/login/' \
and not request.path.startswith(... | from django.conf import settings
from django.http import HttpResponseRedirect
DETACH_PATH = '/user/detach'
ACTIVATE_PATH = '/user/activate'
class DetachMiddleware(object):
def process_request(self, request):
if not request.path == '/login/' \
and not request.path.startswith('/api') \
... | from django.conf import settings
from django.http import HttpResponseRedirect
DETACH_PATH = '/user/detach'
ACTIVATE_PATH = '/user/activate'
class DetachMiddleware(object):
def process_request(self, request):
if not request.path == '/login/' \
and not request.path.startswith('/api'):
... | <commit_before>from django.conf import settings
from django.http import HttpResponseRedirect
DETACH_PATH = '/user/detach'
ACTIVATE_PATH = '/user/activate'
class DetachMiddleware(object):
def process_request(self, request):
if not request.path == '/login/' \
and not request.path.startswith(... |
de6de7c43932224f2845cc540170eeaf46650491 | mkerefuse/refuse.py | mkerefuse/refuse.py | from .util import XPathObject
class RefusePickup(XPathObject):
"""Defines attribute to XPath specification matching"""
input_properties = {
'success_msg': '//*[@id="nConf"]/h1',
'route_garbage': '//*[@id="nConf"]/strong[1]',
'next_pickup_garbage': '//*[@id="nConf"]/strong[2]',
... | Add RefusePickup class (for parsing) | Add RefusePickup class (for parsing)
| Python | unlicense | tomislacker/python-mke-trash-pickup,tomislacker/python-mke-trash-pickup |
Add RefusePickup class (for parsing) | from .util import XPathObject
class RefusePickup(XPathObject):
"""Defines attribute to XPath specification matching"""
input_properties = {
'success_msg': '//*[@id="nConf"]/h1',
'route_garbage': '//*[@id="nConf"]/strong[1]',
'next_pickup_garbage': '//*[@id="nConf"]/strong[2]',
... | <commit_before>
<commit_msg>Add RefusePickup class (for parsing)<commit_after> | from .util import XPathObject
class RefusePickup(XPathObject):
"""Defines attribute to XPath specification matching"""
input_properties = {
'success_msg': '//*[@id="nConf"]/h1',
'route_garbage': '//*[@id="nConf"]/strong[1]',
'next_pickup_garbage': '//*[@id="nConf"]/strong[2]',
... |
Add RefusePickup class (for parsing)from .util import XPathObject
class RefusePickup(XPathObject):
"""Defines attribute to XPath specification matching"""
input_properties = {
'success_msg': '//*[@id="nConf"]/h1',
'route_garbage': '//*[@id="nConf"]/strong[1]',
'next_pickup_garbage': ... | <commit_before>
<commit_msg>Add RefusePickup class (for parsing)<commit_after>from .util import XPathObject
class RefusePickup(XPathObject):
"""Defines attribute to XPath specification matching"""
input_properties = {
'success_msg': '//*[@id="nConf"]/h1',
'route_garbage': '//*[@id="nConf"]/st... | |
016f14304b6b86634c4608927d3345f993178682 | config.py | config.py | ###
# Copyright (c) 2012, spline
# All rights reserved.
#
#
###
import supybot.conf as conf
import supybot.registry as registry
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Scores')
def configure(advanced):
# This will be called by supybot to conf... | ###
# Copyright (c) 2012, spline
# All rights reserved.
#
#
###
import supybot.conf as conf
import supybot.registry as registry
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Scores')
def configure(advanced):
# This will be called by supybot to conf... | Add in channel value for disabling ansi | Add in channel value for disabling ansi
| Python | mit | reticulatingspline/Scores,cottongin/Scores | ###
# Copyright (c) 2012, spline
# All rights reserved.
#
#
###
import supybot.conf as conf
import supybot.registry as registry
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Scores')
def configure(advanced):
# This will be called by supybot to conf... | ###
# Copyright (c) 2012, spline
# All rights reserved.
#
#
###
import supybot.conf as conf
import supybot.registry as registry
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Scores')
def configure(advanced):
# This will be called by supybot to conf... | <commit_before>###
# Copyright (c) 2012, spline
# All rights reserved.
#
#
###
import supybot.conf as conf
import supybot.registry as registry
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Scores')
def configure(advanced):
# This will be called by ... | ###
# Copyright (c) 2012, spline
# All rights reserved.
#
#
###
import supybot.conf as conf
import supybot.registry as registry
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Scores')
def configure(advanced):
# This will be called by supybot to conf... | ###
# Copyright (c) 2012, spline
# All rights reserved.
#
#
###
import supybot.conf as conf
import supybot.registry as registry
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Scores')
def configure(advanced):
# This will be called by supybot to conf... | <commit_before>###
# Copyright (c) 2012, spline
# All rights reserved.
#
#
###
import supybot.conf as conf
import supybot.registry as registry
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Scores')
def configure(advanced):
# This will be called by ... |
61fe55efba2c491da6a93421fa702f123615bc32 | spacy/lang/en/__init__.py | spacy/lang/en/__init__.py | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lex_attrs import LEX_ATTRS
from .morph_rules import MORPH_RULES
from .lemmatizer import LEMMA_RULES, LEMMA_INDEX, LEMMA_EXC
from .syntax_it... | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lex_attrs import LEX_ATTRS
from .morph_rules import MORPH_RULES
from .lemmatizer import LEMMA_RULES, LEMMA_INDEX, LEMMA_EXC
from .syntax_it... | Move EnglishDefaults class out of English | Move EnglishDefaults class out of English
| Python | mit | honnibal/spaCy,aikramer2/spaCy,recognai/spaCy,recognai/spaCy,honnibal/spaCy,aikramer2/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,recognai/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,honnibal/spaCy,spacy-io/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/sp... | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lex_attrs import LEX_ATTRS
from .morph_rules import MORPH_RULES
from .lemmatizer import LEMMA_RULES, LEMMA_INDEX, LEMMA_EXC
from .syntax_it... | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lex_attrs import LEX_ATTRS
from .morph_rules import MORPH_RULES
from .lemmatizer import LEMMA_RULES, LEMMA_INDEX, LEMMA_EXC
from .syntax_it... | <commit_before># coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lex_attrs import LEX_ATTRS
from .morph_rules import MORPH_RULES
from .lemmatizer import LEMMA_RULES, LEMMA_INDEX, LEMMA_EXC
... | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lex_attrs import LEX_ATTRS
from .morph_rules import MORPH_RULES
from .lemmatizer import LEMMA_RULES, LEMMA_INDEX, LEMMA_EXC
from .syntax_it... | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lex_attrs import LEX_ATTRS
from .morph_rules import MORPH_RULES
from .lemmatizer import LEMMA_RULES, LEMMA_INDEX, LEMMA_EXC
from .syntax_it... | <commit_before># coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .tag_map import TAG_MAP
from .stop_words import STOP_WORDS
from .lex_attrs import LEX_ATTRS
from .morph_rules import MORPH_RULES
from .lemmatizer import LEMMA_RULES, LEMMA_INDEX, LEMMA_EXC
... |
d6cd7c16e32f64c4fd3627953d751e8c8bc26f1c | premis_event_service/forms.py | premis_event_service/forms.py | from django import forms
import settings
OUTCOME_CHOICES = settings.EVENT_OUTCOME_CHOICES
EVENT_TYPE_CHOICES = settings.EVENT_TYPE_CHOICES
class EventSearchForm(forms.Form):
event_outcome = forms.ChoiceField(
widget=forms.Select(
attrs={
'id': 'prependedInput',
... | from django import forms
import settings
OUTCOME_CHOICES = settings.EVENT_OUTCOME_CHOICES
EVENT_TYPE_CHOICES = settings.EVENT_TYPE_CHOICES
class EventSearchForm(forms.Form):
event_outcome = forms.ChoiceField(
widget=forms.Select(attrs={'id': 'prependedInput', 'class': 'input-small'}),
choices=OU... | Fix formatting for the EventSearchForm class. | Fix formatting for the EventSearchForm class.
| Python | bsd-3-clause | unt-libraries/django-premis-event-service,unt-libraries/django-premis-event-service,unt-libraries/django-premis-event-service | from django import forms
import settings
OUTCOME_CHOICES = settings.EVENT_OUTCOME_CHOICES
EVENT_TYPE_CHOICES = settings.EVENT_TYPE_CHOICES
class EventSearchForm(forms.Form):
event_outcome = forms.ChoiceField(
widget=forms.Select(
attrs={
'id': 'prependedInput',
... | from django import forms
import settings
OUTCOME_CHOICES = settings.EVENT_OUTCOME_CHOICES
EVENT_TYPE_CHOICES = settings.EVENT_TYPE_CHOICES
class EventSearchForm(forms.Form):
event_outcome = forms.ChoiceField(
widget=forms.Select(attrs={'id': 'prependedInput', 'class': 'input-small'}),
choices=OU... | <commit_before>from django import forms
import settings
OUTCOME_CHOICES = settings.EVENT_OUTCOME_CHOICES
EVENT_TYPE_CHOICES = settings.EVENT_TYPE_CHOICES
class EventSearchForm(forms.Form):
event_outcome = forms.ChoiceField(
widget=forms.Select(
attrs={
'id': 'prependedInput',... | from django import forms
import settings
OUTCOME_CHOICES = settings.EVENT_OUTCOME_CHOICES
EVENT_TYPE_CHOICES = settings.EVENT_TYPE_CHOICES
class EventSearchForm(forms.Form):
event_outcome = forms.ChoiceField(
widget=forms.Select(attrs={'id': 'prependedInput', 'class': 'input-small'}),
choices=OU... | from django import forms
import settings
OUTCOME_CHOICES = settings.EVENT_OUTCOME_CHOICES
EVENT_TYPE_CHOICES = settings.EVENT_TYPE_CHOICES
class EventSearchForm(forms.Form):
event_outcome = forms.ChoiceField(
widget=forms.Select(
attrs={
'id': 'prependedInput',
... | <commit_before>from django import forms
import settings
OUTCOME_CHOICES = settings.EVENT_OUTCOME_CHOICES
EVENT_TYPE_CHOICES = settings.EVENT_TYPE_CHOICES
class EventSearchForm(forms.Form):
event_outcome = forms.ChoiceField(
widget=forms.Select(
attrs={
'id': 'prependedInput',... |
585fe3142860a294a6b30edb9879f979b6ac9c49 | apex/lib/db.py | apex/lib/db.py | from pyramid.httpexceptions import HTTPNotFound
from pyramid.i18n import TranslationString as _
def get_or_create(session, model, **kw):
""" Django's get_or_create function
http://stackoverflow.com/questions/2546207/does-sqlalchemy-have-an-equivalent-of-djangos-get-or-create
"""
obj = session.query(model)... | from pyramid.httpexceptions import HTTPNotFound
from pyramid.i18n import TranslationString as _
def get_or_create(session, model, **kw):
""" Django's get_or_create function
http://stackoverflow.com/questions/2546207/does-sqlalchemy-have-an-equivalent-of-djangos-get-or-create
"""
obj = session.query(model)... | Fix issue with wsgi and translations. | Fix issue with wsgi and translations. | Python | mit | Qwait/apex,Qwait/apex | from pyramid.httpexceptions import HTTPNotFound
from pyramid.i18n import TranslationString as _
def get_or_create(session, model, **kw):
""" Django's get_or_create function
http://stackoverflow.com/questions/2546207/does-sqlalchemy-have-an-equivalent-of-djangos-get-or-create
"""
obj = session.query(model)... | from pyramid.httpexceptions import HTTPNotFound
from pyramid.i18n import TranslationString as _
def get_or_create(session, model, **kw):
""" Django's get_or_create function
http://stackoverflow.com/questions/2546207/does-sqlalchemy-have-an-equivalent-of-djangos-get-or-create
"""
obj = session.query(model)... | <commit_before>from pyramid.httpexceptions import HTTPNotFound
from pyramid.i18n import TranslationString as _
def get_or_create(session, model, **kw):
""" Django's get_or_create function
http://stackoverflow.com/questions/2546207/does-sqlalchemy-have-an-equivalent-of-djangos-get-or-create
"""
obj = sessi... | from pyramid.httpexceptions import HTTPNotFound
from pyramid.i18n import TranslationString as _
def get_or_create(session, model, **kw):
""" Django's get_or_create function
http://stackoverflow.com/questions/2546207/does-sqlalchemy-have-an-equivalent-of-djangos-get-or-create
"""
obj = session.query(model)... | from pyramid.httpexceptions import HTTPNotFound
from pyramid.i18n import TranslationString as _
def get_or_create(session, model, **kw):
""" Django's get_or_create function
http://stackoverflow.com/questions/2546207/does-sqlalchemy-have-an-equivalent-of-djangos-get-or-create
"""
obj = session.query(model)... | <commit_before>from pyramid.httpexceptions import HTTPNotFound
from pyramid.i18n import TranslationString as _
def get_or_create(session, model, **kw):
""" Django's get_or_create function
http://stackoverflow.com/questions/2546207/does-sqlalchemy-have-an-equivalent-of-djangos-get-or-create
"""
obj = sessi... |
2937af0fe2f28ed9381b6b43c337c4cca14e4e78 | apps/polls/admin.py | apps/polls/admin.py | from django.contrib import admin
from apps.polls.models import Poll, Choice
class ChoiceInline(admin.TabularInline):
model = Choice
extra = 3
class PollAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['question']}),
('Date information', {'fields': ['pub_date'], 'classes': ['colla... | from django.contrib import admin
from apps.polls.models import Poll, Choice
class ChoiceInline(admin.TabularInline):
model = Choice
extra = 3
class PollAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['question']}),
('Date information', {'fields': ['pub_date'], 'classes': ['colla... | Add search_fields = ['question'] to PollAdmin | Add search_fields = ['question'] to PollAdmin
| Python | bsd-3-clause | datphan/teracy-tutorial,teracyhq/django-tutorial | from django.contrib import admin
from apps.polls.models import Poll, Choice
class ChoiceInline(admin.TabularInline):
model = Choice
extra = 3
class PollAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['question']}),
('Date information', {'fields': ['pub_date'], 'classes': ['colla... | from django.contrib import admin
from apps.polls.models import Poll, Choice
class ChoiceInline(admin.TabularInline):
model = Choice
extra = 3
class PollAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['question']}),
('Date information', {'fields': ['pub_date'], 'classes': ['colla... | <commit_before>from django.contrib import admin
from apps.polls.models import Poll, Choice
class ChoiceInline(admin.TabularInline):
model = Choice
extra = 3
class PollAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['question']}),
('Date information', {'fields': ['pub_date'], 'cl... | from django.contrib import admin
from apps.polls.models import Poll, Choice
class ChoiceInline(admin.TabularInline):
model = Choice
extra = 3
class PollAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['question']}),
('Date information', {'fields': ['pub_date'], 'classes': ['colla... | from django.contrib import admin
from apps.polls.models import Poll, Choice
class ChoiceInline(admin.TabularInline):
model = Choice
extra = 3
class PollAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['question']}),
('Date information', {'fields': ['pub_date'], 'classes': ['colla... | <commit_before>from django.contrib import admin
from apps.polls.models import Poll, Choice
class ChoiceInline(admin.TabularInline):
model = Choice
extra = 3
class PollAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['question']}),
('Date information', {'fields': ['pub_date'], 'cl... |
f50589ec9b61efbd2bd56cca802ffc542f5b3336 | pyrene/constants.py | pyrene/constants.py | class REPO:
'''Repo attributes'''
TYPE = 'type'
DIRECTORY = 'directory'
VOLATILE = 'volatile'
SERVE_INTERFACE = 'serve_interface'
SERVE_PORT = 'serve_port'
SERVE_USERNAME = 'serve_username'
SERVE_PASSWORD = 'serve_password'
USERNAME = 'username'
PASSWORD = 'password'
DOWNLO... | class REPO:
'''Repo attributes'''
TYPE = 'type'
DIRECTORY = 'directory'
VOLATILE = 'volatile'
SERVE_INTERFACE = 'interface'
SERVE_PORT = 'port'
SERVE_USERNAME = 'username'
SERVE_PASSWORD = 'password'
USERNAME = 'username'
PASSWORD = 'password'
DOWNLOAD_URL = 'download_url'
... | Revert "make REPO.SERVE_* attributes distinct from other attributes (username, password)" | Revert "make REPO.SERVE_* attributes distinct from other attributes (username, password)"
This reverts commit 1553f4bae5f315666fac5ad9f6600ba8b076a84b.
| Python | mit | krisztianfekete/pyrene | class REPO:
'''Repo attributes'''
TYPE = 'type'
DIRECTORY = 'directory'
VOLATILE = 'volatile'
SERVE_INTERFACE = 'serve_interface'
SERVE_PORT = 'serve_port'
SERVE_USERNAME = 'serve_username'
SERVE_PASSWORD = 'serve_password'
USERNAME = 'username'
PASSWORD = 'password'
DOWNLO... | class REPO:
'''Repo attributes'''
TYPE = 'type'
DIRECTORY = 'directory'
VOLATILE = 'volatile'
SERVE_INTERFACE = 'interface'
SERVE_PORT = 'port'
SERVE_USERNAME = 'username'
SERVE_PASSWORD = 'password'
USERNAME = 'username'
PASSWORD = 'password'
DOWNLOAD_URL = 'download_url'
... | <commit_before>class REPO:
'''Repo attributes'''
TYPE = 'type'
DIRECTORY = 'directory'
VOLATILE = 'volatile'
SERVE_INTERFACE = 'serve_interface'
SERVE_PORT = 'serve_port'
SERVE_USERNAME = 'serve_username'
SERVE_PASSWORD = 'serve_password'
USERNAME = 'username'
PASSWORD = 'passw... | class REPO:
'''Repo attributes'''
TYPE = 'type'
DIRECTORY = 'directory'
VOLATILE = 'volatile'
SERVE_INTERFACE = 'interface'
SERVE_PORT = 'port'
SERVE_USERNAME = 'username'
SERVE_PASSWORD = 'password'
USERNAME = 'username'
PASSWORD = 'password'
DOWNLOAD_URL = 'download_url'
... | class REPO:
'''Repo attributes'''
TYPE = 'type'
DIRECTORY = 'directory'
VOLATILE = 'volatile'
SERVE_INTERFACE = 'serve_interface'
SERVE_PORT = 'serve_port'
SERVE_USERNAME = 'serve_username'
SERVE_PASSWORD = 'serve_password'
USERNAME = 'username'
PASSWORD = 'password'
DOWNLO... | <commit_before>class REPO:
'''Repo attributes'''
TYPE = 'type'
DIRECTORY = 'directory'
VOLATILE = 'volatile'
SERVE_INTERFACE = 'serve_interface'
SERVE_PORT = 'serve_port'
SERVE_USERNAME = 'serve_username'
SERVE_PASSWORD = 'serve_password'
USERNAME = 'username'
PASSWORD = 'passw... |
2973b664e8c9cf551d5d7277ab4995125be5fad0 | python/reference.py | python/reference.py | import os
# Current directory
# If you call this from the current directory without abspath,
# then it will not work since __file__ is a relative path
os.path.dirname(os.path.abspath(__file__))
| import os
# Current directory
# If you call this from the current directory without abspath,
# then it will not work since __file__ is a relative path
os.path.dirname(os.path.abspath(__file__))
# Get all files in a directory
# Never use os.walk again
def all_sub_files(root):
for path, subdirs, files in os.walk(roo... | Add util for not using os.walk | Add util for not using os.walk
| Python | mit | brycepg/how-to | import os
# Current directory
# If you call this from the current directory without abspath,
# then it will not work since __file__ is a relative path
os.path.dirname(os.path.abspath(__file__))
Add util for not using os.walk | import os
# Current directory
# If you call this from the current directory without abspath,
# then it will not work since __file__ is a relative path
os.path.dirname(os.path.abspath(__file__))
# Get all files in a directory
# Never use os.walk again
def all_sub_files(root):
for path, subdirs, files in os.walk(roo... | <commit_before>import os
# Current directory
# If you call this from the current directory without abspath,
# then it will not work since __file__ is a relative path
os.path.dirname(os.path.abspath(__file__))
<commit_msg>Add util for not using os.walk<commit_after> | import os
# Current directory
# If you call this from the current directory without abspath,
# then it will not work since __file__ is a relative path
os.path.dirname(os.path.abspath(__file__))
# Get all files in a directory
# Never use os.walk again
def all_sub_files(root):
for path, subdirs, files in os.walk(roo... | import os
# Current directory
# If you call this from the current directory without abspath,
# then it will not work since __file__ is a relative path
os.path.dirname(os.path.abspath(__file__))
Add util for not using os.walkimport os
# Current directory
# If you call this from the current directory without abspath,
# t... | <commit_before>import os
# Current directory
# If you call this from the current directory without abspath,
# then it will not work since __file__ is a relative path
os.path.dirname(os.path.abspath(__file__))
<commit_msg>Add util for not using os.walk<commit_after>import os
# Current directory
# If you call this from t... |
38dfe0948b063b93f5375e065129838335d5ca95 | raiden/constants.py | raiden/constants.py | # -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-06-19 from commit 2677298a69c1b1f35b9ab26beafe457acfdcc0ee
ROPSTEN_REGISTRY_ADDRESS = 'aff1f958c69a6820b08a02549ff9041629ae8257'
ROPSTEN_DIS... | # -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-08-03 from commit 17aa7671159779ceef22fe90001970bed0685c4d
ROPSTEN_REGISTRY_ADDRESS = '25926b6d29f56ba8466601d7ce7dd29985af1f14'
ROPSTEN_DIS... | Update default smart contract addresses | Update default smart contract addresses
| Python | mit | tomashaber/raiden,tomashaber/raiden,hackaugusto/raiden,tomashaber/raiden,hackaugusto/raiden,tomashaber/raiden,tomashaber/raiden | # -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-06-19 from commit 2677298a69c1b1f35b9ab26beafe457acfdcc0ee
ROPSTEN_REGISTRY_ADDRESS = 'aff1f958c69a6820b08a02549ff9041629ae8257'
ROPSTEN_DIS... | # -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-08-03 from commit 17aa7671159779ceef22fe90001970bed0685c4d
ROPSTEN_REGISTRY_ADDRESS = '25926b6d29f56ba8466601d7ce7dd29985af1f14'
ROPSTEN_DIS... | <commit_before># -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-06-19 from commit 2677298a69c1b1f35b9ab26beafe457acfdcc0ee
ROPSTEN_REGISTRY_ADDRESS = 'aff1f958c69a6820b08a02549ff9041629ae82... | # -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-08-03 from commit 17aa7671159779ceef22fe90001970bed0685c4d
ROPSTEN_REGISTRY_ADDRESS = '25926b6d29f56ba8466601d7ce7dd29985af1f14'
ROPSTEN_DIS... | # -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-06-19 from commit 2677298a69c1b1f35b9ab26beafe457acfdcc0ee
ROPSTEN_REGISTRY_ADDRESS = 'aff1f958c69a6820b08a02549ff9041629ae8257'
ROPSTEN_DIS... | <commit_before># -*- coding: utf-8 -*-
UINT64_MAX = 2 ** 64 - 1
UINT64_MIN = 0
INT64_MAX = 2 ** 63 - 1
INT64_MIN = -(2 ** 63)
UINT256_MAX = 2 ** 256 - 1
# Deployed to Ropsten revival on 2017-06-19 from commit 2677298a69c1b1f35b9ab26beafe457acfdcc0ee
ROPSTEN_REGISTRY_ADDRESS = 'aff1f958c69a6820b08a02549ff9041629ae82... |
ab1893301736e2cf5cd87cc30671898884377661 | test/test_events.py | test/test_events.py | import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from smartbot import events
class TestEvents(unittest.TestCase):
def test_empty(self):
event = events.Event()
self.assertEqual(len(event.trigger()), 0)
def test_with_handlers(... | import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from smartbot import events
class TestEvents(unittest.TestCase):
def test_empty(self):
event = events.Event()
self.assertEqual(len(event.trigger()), 0)
def test_with_handlers(... | Update unit tests to match correct behaviour | Update unit tests to match correct behaviour
| Python | mit | Cyanogenoid/smartbot,tomleese/smartbot,Muzer/smartbot,thomasleese/smartbot-old | import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from smartbot import events
class TestEvents(unittest.TestCase):
def test_empty(self):
event = events.Event()
self.assertEqual(len(event.trigger()), 0)
def test_with_handlers(... | import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from smartbot import events
class TestEvents(unittest.TestCase):
def test_empty(self):
event = events.Event()
self.assertEqual(len(event.trigger()), 0)
def test_with_handlers(... | <commit_before>import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from smartbot import events
class TestEvents(unittest.TestCase):
def test_empty(self):
event = events.Event()
self.assertEqual(len(event.trigger()), 0)
def test... | import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from smartbot import events
class TestEvents(unittest.TestCase):
def test_empty(self):
event = events.Event()
self.assertEqual(len(event.trigger()), 0)
def test_with_handlers(... | import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from smartbot import events
class TestEvents(unittest.TestCase):
def test_empty(self):
event = events.Event()
self.assertEqual(len(event.trigger()), 0)
def test_with_handlers(... | <commit_before>import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from smartbot import events
class TestEvents(unittest.TestCase):
def test_empty(self):
event = events.Event()
self.assertEqual(len(event.trigger()), 0)
def test... |
0540b78a5c83cf307c4d629bb814c8359edd8709 | comrade/core/context_processors.py | comrade/core/context_processors.py | from django.conf import settings
from django.contrib.sites.models import Site
from settings import DeploymentType
def context_processor(request):
context = {}
context['DEPLOYMENT'] = settings.DEPLOYMENT
context['site'] = Site.objects.get_current()
if settings.DEPLOYMENT != DeploymentType.PRODUCTION:
... | from django.conf import settings
from django.contrib.sites.models import Site
from settings import DeploymentType
def default(request):
context = {}
context['DEPLOYMENT'] = settings.DEPLOYMENT
context['site'] = Site.objects.get_current()
if settings.DEPLOYMENT != DeploymentType.PRODUCTION:
cont... | Rename the only context processor. | Rename the only context processor.
| Python | mit | bueda/django-comrade | from django.conf import settings
from django.contrib.sites.models import Site
from settings import DeploymentType
def context_processor(request):
context = {}
context['DEPLOYMENT'] = settings.DEPLOYMENT
context['site'] = Site.objects.get_current()
if settings.DEPLOYMENT != DeploymentType.PRODUCTION:
... | from django.conf import settings
from django.contrib.sites.models import Site
from settings import DeploymentType
def default(request):
context = {}
context['DEPLOYMENT'] = settings.DEPLOYMENT
context['site'] = Site.objects.get_current()
if settings.DEPLOYMENT != DeploymentType.PRODUCTION:
cont... | <commit_before>from django.conf import settings
from django.contrib.sites.models import Site
from settings import DeploymentType
def context_processor(request):
context = {}
context['DEPLOYMENT'] = settings.DEPLOYMENT
context['site'] = Site.objects.get_current()
if settings.DEPLOYMENT != DeploymentType... | from django.conf import settings
from django.contrib.sites.models import Site
from settings import DeploymentType
def default(request):
context = {}
context['DEPLOYMENT'] = settings.DEPLOYMENT
context['site'] = Site.objects.get_current()
if settings.DEPLOYMENT != DeploymentType.PRODUCTION:
cont... | from django.conf import settings
from django.contrib.sites.models import Site
from settings import DeploymentType
def context_processor(request):
context = {}
context['DEPLOYMENT'] = settings.DEPLOYMENT
context['site'] = Site.objects.get_current()
if settings.DEPLOYMENT != DeploymentType.PRODUCTION:
... | <commit_before>from django.conf import settings
from django.contrib.sites.models import Site
from settings import DeploymentType
def context_processor(request):
context = {}
context['DEPLOYMENT'] = settings.DEPLOYMENT
context['site'] = Site.objects.get_current()
if settings.DEPLOYMENT != DeploymentType... |
b7939c13622d1134364e874da1d1903bcea6cffe | tests/test_graph.py | tests/test_graph.py |
import os
from xml.etree import ElementTree
from utils import with_app, pretty_print_xml
#=============================================================================
# Tests
@with_app(buildername="xml", srcdir="graph", warningiserror=True)
def test_graph(app, status, warning):
app.build()
tree... |
import os
from xml.etree import ElementTree
from utils import with_app, pretty_print_xml
#=============================================================================
# Tests
@with_app(buildername="xml", srcdir="graph", warningiserror=True)
def test_graph(app, status, warning):
app.build()
tree... | Remove debug printing of doctree during a test | Remove debug printing of doctree during a test
| Python | apache-2.0 | t4ngo/sphinxcontrib-traceables |
import os
from xml.etree import ElementTree
from utils import with_app, pretty_print_xml
#=============================================================================
# Tests
@with_app(buildername="xml", srcdir="graph", warningiserror=True)
def test_graph(app, status, warning):
app.build()
tree... |
import os
from xml.etree import ElementTree
from utils import with_app, pretty_print_xml
#=============================================================================
# Tests
@with_app(buildername="xml", srcdir="graph", warningiserror=True)
def test_graph(app, status, warning):
app.build()
tree... | <commit_before>
import os
from xml.etree import ElementTree
from utils import with_app, pretty_print_xml
#=============================================================================
# Tests
@with_app(buildername="xml", srcdir="graph", warningiserror=True)
def test_graph(app, status, warning):
app.bu... |
import os
from xml.etree import ElementTree
from utils import with_app, pretty_print_xml
#=============================================================================
# Tests
@with_app(buildername="xml", srcdir="graph", warningiserror=True)
def test_graph(app, status, warning):
app.build()
tree... |
import os
from xml.etree import ElementTree
from utils import with_app, pretty_print_xml
#=============================================================================
# Tests
@with_app(buildername="xml", srcdir="graph", warningiserror=True)
def test_graph(app, status, warning):
app.build()
tree... | <commit_before>
import os
from xml.etree import ElementTree
from utils import with_app, pretty_print_xml
#=============================================================================
# Tests
@with_app(buildername="xml", srcdir="graph", warningiserror=True)
def test_graph(app, status, warning):
app.bu... |
942bd1abf9d4e74b0f1dbeb8fc5acaaaeed1a2a6 | tests/test_nexus.py | tests/test_nexus.py | import os, sys
sys.path.append(os.path.abspath('..'))
import unittest
from mock import patch
from pynexus import api_client
class NexusTest(unittest.TestCase):
def test_constructor_appends_base(self):
n = api_client.ApiClient('http://test.com', 'testuser', 'testpwd')
self.assertEquals(n.uri, 'htt... | import os, sys
sys.path.append(os.path.abspath('..'))
import unittest
from mock import patch
from pynexus import api_client
class NexusTest(unittest.TestCase):
def test_constructor_appends_base(self):
n = api_client.ApiClient('http://test.com', 'testuser', 'testpwd')
self.assertEquals(n.uri, 'htt... | Fix constructor test, since constructor does not append / at the end | Fix constructor test, since constructor does not append / at the end
| Python | apache-2.0 | rcarrillocruz/pynexus | import os, sys
sys.path.append(os.path.abspath('..'))
import unittest
from mock import patch
from pynexus import api_client
class NexusTest(unittest.TestCase):
def test_constructor_appends_base(self):
n = api_client.ApiClient('http://test.com', 'testuser', 'testpwd')
self.assertEquals(n.uri, 'htt... | import os, sys
sys.path.append(os.path.abspath('..'))
import unittest
from mock import patch
from pynexus import api_client
class NexusTest(unittest.TestCase):
def test_constructor_appends_base(self):
n = api_client.ApiClient('http://test.com', 'testuser', 'testpwd')
self.assertEquals(n.uri, 'htt... | <commit_before>import os, sys
sys.path.append(os.path.abspath('..'))
import unittest
from mock import patch
from pynexus import api_client
class NexusTest(unittest.TestCase):
def test_constructor_appends_base(self):
n = api_client.ApiClient('http://test.com', 'testuser', 'testpwd')
self.assertEqu... | import os, sys
sys.path.append(os.path.abspath('..'))
import unittest
from mock import patch
from pynexus import api_client
class NexusTest(unittest.TestCase):
def test_constructor_appends_base(self):
n = api_client.ApiClient('http://test.com', 'testuser', 'testpwd')
self.assertEquals(n.uri, 'htt... | import os, sys
sys.path.append(os.path.abspath('..'))
import unittest
from mock import patch
from pynexus import api_client
class NexusTest(unittest.TestCase):
def test_constructor_appends_base(self):
n = api_client.ApiClient('http://test.com', 'testuser', 'testpwd')
self.assertEquals(n.uri, 'htt... | <commit_before>import os, sys
sys.path.append(os.path.abspath('..'))
import unittest
from mock import patch
from pynexus import api_client
class NexusTest(unittest.TestCase):
def test_constructor_appends_base(self):
n = api_client.ApiClient('http://test.com', 'testuser', 'testpwd')
self.assertEqu... |
c76e3accff36eb993ea44f4e38adad9466af1f54 | tests/wsgi_tests.py | tests/wsgi_tests.py | import mock
import unittest
from resto.wsgi import Middleware
class AppTestCase(unittest.TestCase):
def setUp(self):
self.environ = {
'wsgi.version': (1, 0),
'wsgi.multithread': False,
'wsgi.multiprocess': False,
'wsgi.run_once': True,
}
se... | import mock
import unittest
from resto.wsgi import Middleware
class AppTestCase(unittest.TestCase):
def setUp(self):
self.environ = {
'wsgi.version': (1, 0),
'wsgi.multithread': False,
'wsgi.multiprocess': False,
'wsgi.run_once': True,
}
se... | Test WSGI start_response is called | Test WSGI start_response is called
| Python | mit | rafaelpivato/resto | import mock
import unittest
from resto.wsgi import Middleware
class AppTestCase(unittest.TestCase):
def setUp(self):
self.environ = {
'wsgi.version': (1, 0),
'wsgi.multithread': False,
'wsgi.multiprocess': False,
'wsgi.run_once': True,
}
se... | import mock
import unittest
from resto.wsgi import Middleware
class AppTestCase(unittest.TestCase):
def setUp(self):
self.environ = {
'wsgi.version': (1, 0),
'wsgi.multithread': False,
'wsgi.multiprocess': False,
'wsgi.run_once': True,
}
se... | <commit_before>import mock
import unittest
from resto.wsgi import Middleware
class AppTestCase(unittest.TestCase):
def setUp(self):
self.environ = {
'wsgi.version': (1, 0),
'wsgi.multithread': False,
'wsgi.multiprocess': False,
'wsgi.run_once': True,
... | import mock
import unittest
from resto.wsgi import Middleware
class AppTestCase(unittest.TestCase):
def setUp(self):
self.environ = {
'wsgi.version': (1, 0),
'wsgi.multithread': False,
'wsgi.multiprocess': False,
'wsgi.run_once': True,
}
se... | import mock
import unittest
from resto.wsgi import Middleware
class AppTestCase(unittest.TestCase):
def setUp(self):
self.environ = {
'wsgi.version': (1, 0),
'wsgi.multithread': False,
'wsgi.multiprocess': False,
'wsgi.run_once': True,
}
se... | <commit_before>import mock
import unittest
from resto.wsgi import Middleware
class AppTestCase(unittest.TestCase):
def setUp(self):
self.environ = {
'wsgi.version': (1, 0),
'wsgi.multithread': False,
'wsgi.multiprocess': False,
'wsgi.run_once': True,
... |
ff662e931cf4d57016c97698d490bc75368ecb67 | pmxbot/testing/fixtures.py | pmxbot/testing/fixtures.py | import pytest
@pytest.fixture(scope='session', autouse=True)
def init_config():
__import__('pmxbot').config = {}
@pytest.fixture(params=['mongodb', 'sqlite'])
def db_uri(request):
if request.param == 'mongodb':
return request.getfuncargvalue('mongodb_uri')
return 'sqlite:pmxbot.sqlite'
| import pytest
@pytest.fixture(scope='session', autouse=True)
def init_config():
__import__('pmxbot').config = {}
@pytest.fixture(params=['mongodb', 'sqlite'])
def db_uri(request):
if request.param == 'mongodb':
return request.getfixturevalue('mongodb_uri')
return 'sqlite:pmxbot.sqlite'
| Fix deprecation warning in fixture retrieval. | Fix deprecation warning in fixture retrieval.
| Python | mit | yougov/pmxbot,yougov/pmxbot,yougov/pmxbot | import pytest
@pytest.fixture(scope='session', autouse=True)
def init_config():
__import__('pmxbot').config = {}
@pytest.fixture(params=['mongodb', 'sqlite'])
def db_uri(request):
if request.param == 'mongodb':
return request.getfuncargvalue('mongodb_uri')
return 'sqlite:pmxbot.sqlite'
Fix deprecation warning ... | import pytest
@pytest.fixture(scope='session', autouse=True)
def init_config():
__import__('pmxbot').config = {}
@pytest.fixture(params=['mongodb', 'sqlite'])
def db_uri(request):
if request.param == 'mongodb':
return request.getfixturevalue('mongodb_uri')
return 'sqlite:pmxbot.sqlite'
| <commit_before>import pytest
@pytest.fixture(scope='session', autouse=True)
def init_config():
__import__('pmxbot').config = {}
@pytest.fixture(params=['mongodb', 'sqlite'])
def db_uri(request):
if request.param == 'mongodb':
return request.getfuncargvalue('mongodb_uri')
return 'sqlite:pmxbot.sqlite'
<commit_m... | import pytest
@pytest.fixture(scope='session', autouse=True)
def init_config():
__import__('pmxbot').config = {}
@pytest.fixture(params=['mongodb', 'sqlite'])
def db_uri(request):
if request.param == 'mongodb':
return request.getfixturevalue('mongodb_uri')
return 'sqlite:pmxbot.sqlite'
| import pytest
@pytest.fixture(scope='session', autouse=True)
def init_config():
__import__('pmxbot').config = {}
@pytest.fixture(params=['mongodb', 'sqlite'])
def db_uri(request):
if request.param == 'mongodb':
return request.getfuncargvalue('mongodb_uri')
return 'sqlite:pmxbot.sqlite'
Fix deprecation warning ... | <commit_before>import pytest
@pytest.fixture(scope='session', autouse=True)
def init_config():
__import__('pmxbot').config = {}
@pytest.fixture(params=['mongodb', 'sqlite'])
def db_uri(request):
if request.param == 'mongodb':
return request.getfuncargvalue('mongodb_uri')
return 'sqlite:pmxbot.sqlite'
<commit_m... |
32f7b016d0e06fa85bef95119223636dc74918ad | reclass/defaults.py | reclass/defaults.py | #
# -*- coding: utf-8 -*-
#
# This file is part of reclass (http://github.com/madduck/reclass)
#
# Copyright © 2007–14 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
import os, sys
from version import RECLASS_NAME
# defaults for the command-line options
OPT_STORAGE_TYPE... | #
# -*- coding: utf-8 -*-
#
# This file is part of reclass (http://github.com/madduck/reclass)
#
# Copyright © 2007–14 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
import os, sys
from version import RECLASS_NAME
# defaults for the command-line options
OPT_STORAGE_TYPE... | Change interpolation sentinels to prevent collissions with pillar data | Change interpolation sentinels to prevent collissions with pillar data
| Python | artistic-2.0 | jeroen92/reclass,jeroen92/reclass | #
# -*- coding: utf-8 -*-
#
# This file is part of reclass (http://github.com/madduck/reclass)
#
# Copyright © 2007–14 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
import os, sys
from version import RECLASS_NAME
# defaults for the command-line options
OPT_STORAGE_TYPE... | #
# -*- coding: utf-8 -*-
#
# This file is part of reclass (http://github.com/madduck/reclass)
#
# Copyright © 2007–14 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
import os, sys
from version import RECLASS_NAME
# defaults for the command-line options
OPT_STORAGE_TYPE... | <commit_before>#
# -*- coding: utf-8 -*-
#
# This file is part of reclass (http://github.com/madduck/reclass)
#
# Copyright © 2007–14 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
import os, sys
from version import RECLASS_NAME
# defaults for the command-line options
O... | #
# -*- coding: utf-8 -*-
#
# This file is part of reclass (http://github.com/madduck/reclass)
#
# Copyright © 2007–14 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
import os, sys
from version import RECLASS_NAME
# defaults for the command-line options
OPT_STORAGE_TYPE... | #
# -*- coding: utf-8 -*-
#
# This file is part of reclass (http://github.com/madduck/reclass)
#
# Copyright © 2007–14 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
import os, sys
from version import RECLASS_NAME
# defaults for the command-line options
OPT_STORAGE_TYPE... | <commit_before>#
# -*- coding: utf-8 -*-
#
# This file is part of reclass (http://github.com/madduck/reclass)
#
# Copyright © 2007–14 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
import os, sys
from version import RECLASS_NAME
# defaults for the command-line options
O... |
019aa0d78fbf54dda405cf8df3aab92dfdaba188 | tests/grammar_atomic_tests.py | tests/grammar_atomic_tests.py | from unittest import TestCase
from pyparsing import ParseException
from regparser.grammar.atomic import *
class GrammarAtomicTests(TestCase):
def test_em_digit_p(self):
result = em_digit_p.parseString('(<E T="03">2</E>)')
self.assertEqual('2', result.p5)
def test_double_alpha(self):
... | from unittest import TestCase
from pyparsing import ParseException
from regparser.grammar.atomic import *
class GrammarAtomicTests(TestCase):
def test_em_digit_p(self):
result = em_digit_p.parseString('(<E T="03">2</E>)')
self.assertEqual('2', result.p5)
def test_double_alpha(self):
... | Refactor test to eliminate assertRaises() error with Python 2.6 | Refactor test to eliminate assertRaises() error with Python 2.6
| Python | cc0-1.0 | adderall/regulations-parser,willbarton/regulations-parser,grapesmoker/regulations-parser | from unittest import TestCase
from pyparsing import ParseException
from regparser.grammar.atomic import *
class GrammarAtomicTests(TestCase):
def test_em_digit_p(self):
result = em_digit_p.parseString('(<E T="03">2</E>)')
self.assertEqual('2', result.p5)
def test_double_alpha(self):
... | from unittest import TestCase
from pyparsing import ParseException
from regparser.grammar.atomic import *
class GrammarAtomicTests(TestCase):
def test_em_digit_p(self):
result = em_digit_p.parseString('(<E T="03">2</E>)')
self.assertEqual('2', result.p5)
def test_double_alpha(self):
... | <commit_before>from unittest import TestCase
from pyparsing import ParseException
from regparser.grammar.atomic import *
class GrammarAtomicTests(TestCase):
def test_em_digit_p(self):
result = em_digit_p.parseString('(<E T="03">2</E>)')
self.assertEqual('2', result.p5)
def test_double_alpha(... | from unittest import TestCase
from pyparsing import ParseException
from regparser.grammar.atomic import *
class GrammarAtomicTests(TestCase):
def test_em_digit_p(self):
result = em_digit_p.parseString('(<E T="03">2</E>)')
self.assertEqual('2', result.p5)
def test_double_alpha(self):
... | from unittest import TestCase
from pyparsing import ParseException
from regparser.grammar.atomic import *
class GrammarAtomicTests(TestCase):
def test_em_digit_p(self):
result = em_digit_p.parseString('(<E T="03">2</E>)')
self.assertEqual('2', result.p5)
def test_double_alpha(self):
... | <commit_before>from unittest import TestCase
from pyparsing import ParseException
from regparser.grammar.atomic import *
class GrammarAtomicTests(TestCase):
def test_em_digit_p(self):
result = em_digit_p.parseString('(<E T="03">2</E>)')
self.assertEqual('2', result.p5)
def test_double_alpha(... |
c34817c2740e860493692b630a11fdb7acab76aa | tests/test_simple_features.py | tests/test_simple_features.py | from wordgraph.points import Point
import wordgraph
EPOCH_START = 1407109280
def time_values(values, start=EPOCH_START, increment=1):
datapoints = []
for index, value in enumerate(values):
datapoints.append(Point(x=value, y=start + (increment * index)))
return datapoints
def test_monotonic_up_per... | from wordgraph.points import Point
import wordgraph
EPOCH_START = 1407109280
def time_values(values, start=EPOCH_START, increment=1):
datapoints = []
for index, value in enumerate(values):
datapoints.append(Point(x=value, y=start + (increment * index)))
return datapoints
def test_monotonic_up_per... | Test case for monotonically decreasing graphs | Test case for monotonically decreasing graphs
Generate time series data for values that decrease monotonically over
time.
| Python | apache-2.0 | tleeuwenburg/wordgraph,tleeuwenburg/wordgraph | from wordgraph.points import Point
import wordgraph
EPOCH_START = 1407109280
def time_values(values, start=EPOCH_START, increment=1):
datapoints = []
for index, value in enumerate(values):
datapoints.append(Point(x=value, y=start + (increment * index)))
return datapoints
def test_monotonic_up_per... | from wordgraph.points import Point
import wordgraph
EPOCH_START = 1407109280
def time_values(values, start=EPOCH_START, increment=1):
datapoints = []
for index, value in enumerate(values):
datapoints.append(Point(x=value, y=start + (increment * index)))
return datapoints
def test_monotonic_up_per... | <commit_before>from wordgraph.points import Point
import wordgraph
EPOCH_START = 1407109280
def time_values(values, start=EPOCH_START, increment=1):
datapoints = []
for index, value in enumerate(values):
datapoints.append(Point(x=value, y=start + (increment * index)))
return datapoints
def test_m... | from wordgraph.points import Point
import wordgraph
EPOCH_START = 1407109280
def time_values(values, start=EPOCH_START, increment=1):
datapoints = []
for index, value in enumerate(values):
datapoints.append(Point(x=value, y=start + (increment * index)))
return datapoints
def test_monotonic_up_per... | from wordgraph.points import Point
import wordgraph
EPOCH_START = 1407109280
def time_values(values, start=EPOCH_START, increment=1):
datapoints = []
for index, value in enumerate(values):
datapoints.append(Point(x=value, y=start + (increment * index)))
return datapoints
def test_monotonic_up_per... | <commit_before>from wordgraph.points import Point
import wordgraph
EPOCH_START = 1407109280
def time_values(values, start=EPOCH_START, increment=1):
datapoints = []
for index, value in enumerate(values):
datapoints.append(Point(x=value, y=start + (increment * index)))
return datapoints
def test_m... |
e2991360bb35060e570e59bbea6a1e6d23a54aa7 | transport_tester.py | transport_tester.py | from gevent import monkey
monkey.patch_all() # noqa
import sys
import time
from raiden.network.transport import UDPTransport
from raiden.network.sockfactory import socket_factory
class DummyProtocol(object):
def __init__(self):
self.raiden = None
def receive(self, data):
print data
if __... | from gevent import monkey
monkey.patch_all() # noqa
import sys
import time
from ethereum import slogging
from raiden.network.transport import UDPTransport
from raiden.network.sockfactory import socket_factory
class DummyProtocol(object):
def __init__(self):
self.raiden = None
def receive(self, da... | Add logging to script test | Add logging to script test
| Python | mit | hackaugusto/raiden,tomashaber/raiden,tomashaber/raiden,tomashaber/raiden,hackaugusto/raiden,tomashaber/raiden,tomashaber/raiden,charles-cooper/raiden,charles-cooper/raiden | from gevent import monkey
monkey.patch_all() # noqa
import sys
import time
from raiden.network.transport import UDPTransport
from raiden.network.sockfactory import socket_factory
class DummyProtocol(object):
def __init__(self):
self.raiden = None
def receive(self, data):
print data
if __... | from gevent import monkey
monkey.patch_all() # noqa
import sys
import time
from ethereum import slogging
from raiden.network.transport import UDPTransport
from raiden.network.sockfactory import socket_factory
class DummyProtocol(object):
def __init__(self):
self.raiden = None
def receive(self, da... | <commit_before>from gevent import monkey
monkey.patch_all() # noqa
import sys
import time
from raiden.network.transport import UDPTransport
from raiden.network.sockfactory import socket_factory
class DummyProtocol(object):
def __init__(self):
self.raiden = None
def receive(self, data):
pri... | from gevent import monkey
monkey.patch_all() # noqa
import sys
import time
from ethereum import slogging
from raiden.network.transport import UDPTransport
from raiden.network.sockfactory import socket_factory
class DummyProtocol(object):
def __init__(self):
self.raiden = None
def receive(self, da... | from gevent import monkey
monkey.patch_all() # noqa
import sys
import time
from raiden.network.transport import UDPTransport
from raiden.network.sockfactory import socket_factory
class DummyProtocol(object):
def __init__(self):
self.raiden = None
def receive(self, data):
print data
if __... | <commit_before>from gevent import monkey
monkey.patch_all() # noqa
import sys
import time
from raiden.network.transport import UDPTransport
from raiden.network.sockfactory import socket_factory
class DummyProtocol(object):
def __init__(self):
self.raiden = None
def receive(self, data):
pri... |
156ebae630c3690db875b8925bfbdc5ded396fdd | src/Sensors/Factory.py | src/Sensors/Factory.py | from src.Sensors.BME280 import BME280
from src.Sensors.BME680 import BME680
from src.Sensors.DS18B20 import DS18B20
from src.Notification.Subscriber.LED.RGB import RGB
class Factory:
@staticmethod
def create_sensor(device, address):
if device == 'BME280':
return BME280(address=address)
... | from src.Sensors.BME280 import BME280
from src.Sensors.BME680 import BME680
from src.Sensors.DS18B20 import DS18B20
from src.Sensors.CCS811 import CCS811
from src.Notification.Subscriber.LED.RGB import RGB
class Factory:
@staticmethod
def create_sensor(device, address):
if device == 'BME280':
... | Add CCS811 to device factory | Add CCS811 to device factory
| Python | mit | dashford/sentinel | from src.Sensors.BME280 import BME280
from src.Sensors.BME680 import BME680
from src.Sensors.DS18B20 import DS18B20
from src.Notification.Subscriber.LED.RGB import RGB
class Factory:
@staticmethod
def create_sensor(device, address):
if device == 'BME280':
return BME280(address=address)
... | from src.Sensors.BME280 import BME280
from src.Sensors.BME680 import BME680
from src.Sensors.DS18B20 import DS18B20
from src.Sensors.CCS811 import CCS811
from src.Notification.Subscriber.LED.RGB import RGB
class Factory:
@staticmethod
def create_sensor(device, address):
if device == 'BME280':
... | <commit_before>from src.Sensors.BME280 import BME280
from src.Sensors.BME680 import BME680
from src.Sensors.DS18B20 import DS18B20
from src.Notification.Subscriber.LED.RGB import RGB
class Factory:
@staticmethod
def create_sensor(device, address):
if device == 'BME280':
return BME280(addr... | from src.Sensors.BME280 import BME280
from src.Sensors.BME680 import BME680
from src.Sensors.DS18B20 import DS18B20
from src.Sensors.CCS811 import CCS811
from src.Notification.Subscriber.LED.RGB import RGB
class Factory:
@staticmethod
def create_sensor(device, address):
if device == 'BME280':
... | from src.Sensors.BME280 import BME280
from src.Sensors.BME680 import BME680
from src.Sensors.DS18B20 import DS18B20
from src.Notification.Subscriber.LED.RGB import RGB
class Factory:
@staticmethod
def create_sensor(device, address):
if device == 'BME280':
return BME280(address=address)
... | <commit_before>from src.Sensors.BME280 import BME280
from src.Sensors.BME680 import BME680
from src.Sensors.DS18B20 import DS18B20
from src.Notification.Subscriber.LED.RGB import RGB
class Factory:
@staticmethod
def create_sensor(device, address):
if device == 'BME280':
return BME280(addr... |
b05ba019143cc39ba0d02d822824172313e78591 | aubergine/celery.py | aubergine/celery.py | from __future__ import absolute_import
from celery import Celery
app = Celery('aubergine')
app.config_from_object('aubergine.settings.celeryconfig')
app.autodiscover_tasks(['aubergine'], related_name='tasks')
app.setup_security()
@app.task(bind=True)
def debug_task(self):
print('Request: {0!r}'.format(self.req... | from __future__ import absolute_import
from celery import Celery
app = Celery('aubergine')
app.config_from_object('aubergine.settings.celeryconfig')
app.autodiscover_tasks(['aubergine'], related_name='tasks')
# For message signing
# app.setup_security()
@app.task(bind=True)
def debug_task(self):
print('Reques... | Disable message signing for now | Disable message signing for now
| Python | bsd-3-clause | michaelwisely/aubergine | from __future__ import absolute_import
from celery import Celery
app = Celery('aubergine')
app.config_from_object('aubergine.settings.celeryconfig')
app.autodiscover_tasks(['aubergine'], related_name='tasks')
app.setup_security()
@app.task(bind=True)
def debug_task(self):
print('Request: {0!r}'.format(self.req... | from __future__ import absolute_import
from celery import Celery
app = Celery('aubergine')
app.config_from_object('aubergine.settings.celeryconfig')
app.autodiscover_tasks(['aubergine'], related_name='tasks')
# For message signing
# app.setup_security()
@app.task(bind=True)
def debug_task(self):
print('Reques... | <commit_before>from __future__ import absolute_import
from celery import Celery
app = Celery('aubergine')
app.config_from_object('aubergine.settings.celeryconfig')
app.autodiscover_tasks(['aubergine'], related_name='tasks')
app.setup_security()
@app.task(bind=True)
def debug_task(self):
print('Request: {0!r}'.... | from __future__ import absolute_import
from celery import Celery
app = Celery('aubergine')
app.config_from_object('aubergine.settings.celeryconfig')
app.autodiscover_tasks(['aubergine'], related_name='tasks')
# For message signing
# app.setup_security()
@app.task(bind=True)
def debug_task(self):
print('Reques... | from __future__ import absolute_import
from celery import Celery
app = Celery('aubergine')
app.config_from_object('aubergine.settings.celeryconfig')
app.autodiscover_tasks(['aubergine'], related_name='tasks')
app.setup_security()
@app.task(bind=True)
def debug_task(self):
print('Request: {0!r}'.format(self.req... | <commit_before>from __future__ import absolute_import
from celery import Celery
app = Celery('aubergine')
app.config_from_object('aubergine.settings.celeryconfig')
app.autodiscover_tasks(['aubergine'], related_name='tasks')
app.setup_security()
@app.task(bind=True)
def debug_task(self):
print('Request: {0!r}'.... |
f1af7dad41992b53e90a5f8dd20e1635f11a7ce1 | pstats_print2list/__init__.py | pstats_print2list/__init__.py | # -*- coding: utf-8 -*-
__author__ = 'Vauxoo'
__email__ = 'info@vauxoo.com'
__version__ = '0.1.0'
| # -*- coding: utf-8 -*-
from pstats_print2list import print_stats
__author__ = 'Vauxoo'
__email__ = 'info@vauxoo.com'
__version__ = '0.1.0'
| Add print_stats to init file | [REF] pstats_print2list: Add print_stats to init file
| Python | isc | Vauxoo/pstats-print2list | # -*- coding: utf-8 -*-
__author__ = 'Vauxoo'
__email__ = 'info@vauxoo.com'
__version__ = '0.1.0'
[REF] pstats_print2list: Add print_stats to init file | # -*- coding: utf-8 -*-
from pstats_print2list import print_stats
__author__ = 'Vauxoo'
__email__ = 'info@vauxoo.com'
__version__ = '0.1.0'
| <commit_before># -*- coding: utf-8 -*-
__author__ = 'Vauxoo'
__email__ = 'info@vauxoo.com'
__version__ = '0.1.0'
<commit_msg>[REF] pstats_print2list: Add print_stats to init file<commit_after> | # -*- coding: utf-8 -*-
from pstats_print2list import print_stats
__author__ = 'Vauxoo'
__email__ = 'info@vauxoo.com'
__version__ = '0.1.0'
| # -*- coding: utf-8 -*-
__author__ = 'Vauxoo'
__email__ = 'info@vauxoo.com'
__version__ = '0.1.0'
[REF] pstats_print2list: Add print_stats to init file# -*- coding: utf-8 -*-
from pstats_print2list import print_stats
__author__ = 'Vauxoo'
__email__ = 'info@vauxoo.com'
__version__ = '0.1.0'
| <commit_before># -*- coding: utf-8 -*-
__author__ = 'Vauxoo'
__email__ = 'info@vauxoo.com'
__version__ = '0.1.0'
<commit_msg>[REF] pstats_print2list: Add print_stats to init file<commit_after># -*- coding: utf-8 -*-
from pstats_print2list import print_stats
__author__ = 'Vauxoo'
__email__ = 'info@vauxoo.com'
__versi... |
875e25231dec76760bde97107d52036560347914 | salt/modules/win_shadow.py | salt/modules/win_shadow.py | '''
Manage the shadow file
'''
import salt.utils
def __virtual__():
'''
Only works on Windows systems
'''
if salt.utils.is_windows():
return 'shadow'
return False
def info(name):
'''
Return information for the specified user
This is just returns dummy data so that salt state... | '''
Manage the shadow file
'''
import salt.utils
def __virtual__():
'''
Only works on Windows systems
'''
if salt.utils.is_windows():
return 'shadow'
return False
def info(name):
'''
Return information for the specified user
This is just returns dummy data so that salt state... | Rename 'pwd' field in windows shadow.info output | Rename 'pwd' field in windows shadow.info output
This makes the field name consistent with the other shadow modules. Note
that the passwd field is not used at all in Windows user management, so
this is merely a cosmetic change.
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | '''
Manage the shadow file
'''
import salt.utils
def __virtual__():
'''
Only works on Windows systems
'''
if salt.utils.is_windows():
return 'shadow'
return False
def info(name):
'''
Return information for the specified user
This is just returns dummy data so that salt state... | '''
Manage the shadow file
'''
import salt.utils
def __virtual__():
'''
Only works on Windows systems
'''
if salt.utils.is_windows():
return 'shadow'
return False
def info(name):
'''
Return information for the specified user
This is just returns dummy data so that salt state... | <commit_before>'''
Manage the shadow file
'''
import salt.utils
def __virtual__():
'''
Only works on Windows systems
'''
if salt.utils.is_windows():
return 'shadow'
return False
def info(name):
'''
Return information for the specified user
This is just returns dummy data so ... | '''
Manage the shadow file
'''
import salt.utils
def __virtual__():
'''
Only works on Windows systems
'''
if salt.utils.is_windows():
return 'shadow'
return False
def info(name):
'''
Return information for the specified user
This is just returns dummy data so that salt state... | '''
Manage the shadow file
'''
import salt.utils
def __virtual__():
'''
Only works on Windows systems
'''
if salt.utils.is_windows():
return 'shadow'
return False
def info(name):
'''
Return information for the specified user
This is just returns dummy data so that salt state... | <commit_before>'''
Manage the shadow file
'''
import salt.utils
def __virtual__():
'''
Only works on Windows systems
'''
if salt.utils.is_windows():
return 'shadow'
return False
def info(name):
'''
Return information for the specified user
This is just returns dummy data so ... |
d279572c255a302dd5f191b0f047c46c9184ec2a | tests/test_write.py | tests/test_write.py | from __future__ import absolute_import
from ofxparse import OfxParser as op, OfxPrinter
from unittest import TestCase
from os import close, remove
from tempfile import mkstemp
import sys
sys.path.append('..')
from .support import open_file
class TestOfxWrite(TestCase):
def test_write(self):
test_file = o... | from __future__ import absolute_import
from ofxparse import OfxParser, OfxPrinter
from unittest import TestCase
from os import close, remove
from tempfile import mkstemp
import sys
sys.path.append('..')
from .support import open_file
class TestOfxWrite(TestCase):
def test_write(self):
with open_file('fid... | Fix warnings under Python 3 | Fix warnings under Python 3
| Python | mit | rdsteed/ofxparse,jaraco/ofxparse,jseutter/ofxparse,udibr/ofxparse | from __future__ import absolute_import
from ofxparse import OfxParser as op, OfxPrinter
from unittest import TestCase
from os import close, remove
from tempfile import mkstemp
import sys
sys.path.append('..')
from .support import open_file
class TestOfxWrite(TestCase):
def test_write(self):
test_file = o... | from __future__ import absolute_import
from ofxparse import OfxParser, OfxPrinter
from unittest import TestCase
from os import close, remove
from tempfile import mkstemp
import sys
sys.path.append('..')
from .support import open_file
class TestOfxWrite(TestCase):
def test_write(self):
with open_file('fid... | <commit_before>from __future__ import absolute_import
from ofxparse import OfxParser as op, OfxPrinter
from unittest import TestCase
from os import close, remove
from tempfile import mkstemp
import sys
sys.path.append('..')
from .support import open_file
class TestOfxWrite(TestCase):
def test_write(self):
... | from __future__ import absolute_import
from ofxparse import OfxParser, OfxPrinter
from unittest import TestCase
from os import close, remove
from tempfile import mkstemp
import sys
sys.path.append('..')
from .support import open_file
class TestOfxWrite(TestCase):
def test_write(self):
with open_file('fid... | from __future__ import absolute_import
from ofxparse import OfxParser as op, OfxPrinter
from unittest import TestCase
from os import close, remove
from tempfile import mkstemp
import sys
sys.path.append('..')
from .support import open_file
class TestOfxWrite(TestCase):
def test_write(self):
test_file = o... | <commit_before>from __future__ import absolute_import
from ofxparse import OfxParser as op, OfxPrinter
from unittest import TestCase
from os import close, remove
from tempfile import mkstemp
import sys
sys.path.append('..')
from .support import open_file
class TestOfxWrite(TestCase):
def test_write(self):
... |
491613b34cb3c89e8d49670457a46b924a109529 | pypinksign/__init__.py | pypinksign/__init__.py | """
Basic Template system for project pinksign,
similar to the template part of PasteScript but without any dependencies.
"""
from .pypinksign import (
PinkSign, get_npki_path, url_encode, paramize, choose_cert, seed_cbc_128_encrypt, seed_cbc_128_decrypt, seed_generator,
bit2string, separate_p12_into_npki
)
| """
Basic Template system for project pinksign,
similar to the template part of PasteScript but without any dependencies.
"""
from .pypinksign import (
PinkSign, get_npki_path, url_encode, paramize, choose_cert, seed_cbc_128_encrypt, seed_cbc_128_decrypt, seed_generator,
bit2string, separate_p12_into_npki, en... | Add new function in init | Add new function in init
| Python | mit | bandoche/PyPinkSign | """
Basic Template system for project pinksign,
similar to the template part of PasteScript but without any dependencies.
"""
from .pypinksign import (
PinkSign, get_npki_path, url_encode, paramize, choose_cert, seed_cbc_128_encrypt, seed_cbc_128_decrypt, seed_generator,
bit2string, separate_p12_into_npki
)
A... | """
Basic Template system for project pinksign,
similar to the template part of PasteScript but without any dependencies.
"""
from .pypinksign import (
PinkSign, get_npki_path, url_encode, paramize, choose_cert, seed_cbc_128_encrypt, seed_cbc_128_decrypt, seed_generator,
bit2string, separate_p12_into_npki, en... | <commit_before>"""
Basic Template system for project pinksign,
similar to the template part of PasteScript but without any dependencies.
"""
from .pypinksign import (
PinkSign, get_npki_path, url_encode, paramize, choose_cert, seed_cbc_128_encrypt, seed_cbc_128_decrypt, seed_generator,
bit2string, separate_p1... | """
Basic Template system for project pinksign,
similar to the template part of PasteScript but without any dependencies.
"""
from .pypinksign import (
PinkSign, get_npki_path, url_encode, paramize, choose_cert, seed_cbc_128_encrypt, seed_cbc_128_decrypt, seed_generator,
bit2string, separate_p12_into_npki, en... | """
Basic Template system for project pinksign,
similar to the template part of PasteScript but without any dependencies.
"""
from .pypinksign import (
PinkSign, get_npki_path, url_encode, paramize, choose_cert, seed_cbc_128_encrypt, seed_cbc_128_decrypt, seed_generator,
bit2string, separate_p12_into_npki
)
A... | <commit_before>"""
Basic Template system for project pinksign,
similar to the template part of PasteScript but without any dependencies.
"""
from .pypinksign import (
PinkSign, get_npki_path, url_encode, paramize, choose_cert, seed_cbc_128_encrypt, seed_cbc_128_decrypt, seed_generator,
bit2string, separate_p1... |
d7534dc3536ebe035abf063d83aa8d471cdadb16 | python/pyqt_version.py | python/pyqt_version.py | import PySide2.QtCore
# Prints PySide2 version
# e.g. 5.11.1a1
print(PySide2.__version__)
# Gets a tuple with each version component
# e.g. (5, 11, 1, 'a', 1)
print(PySide2.__version_info__)
# Prints the Qt version used to compile PySide2
# e.g. "5.11.2"
print(PySide2.QtCore.__version__)
# Gets a tuple with each ve... | #!/usr/bin/env python3
# coding: utf-8
'''
PySide2
'''
import sys
try:
import PySide2.QtCore
except ImportError:
print('cannot load module: PySide2.QtCore')
sys.exit(1)
# Prints PySide2 version
# e.g. 5.11.1a1
print(PySide2.__version__)
# Gets a tuple with each version component
# e.g. (5, 11, 1, 'a', 1... | ADD try-except to handle import error | ADD try-except to handle import error
| Python | mit | ericosur/myqt,ericosur/myqt,ericosur/myqt,ericosur/myqt,ericosur/myqt,ericosur/myqt | import PySide2.QtCore
# Prints PySide2 version
# e.g. 5.11.1a1
print(PySide2.__version__)
# Gets a tuple with each version component
# e.g. (5, 11, 1, 'a', 1)
print(PySide2.__version_info__)
# Prints the Qt version used to compile PySide2
# e.g. "5.11.2"
print(PySide2.QtCore.__version__)
# Gets a tuple with each ve... | #!/usr/bin/env python3
# coding: utf-8
'''
PySide2
'''
import sys
try:
import PySide2.QtCore
except ImportError:
print('cannot load module: PySide2.QtCore')
sys.exit(1)
# Prints PySide2 version
# e.g. 5.11.1a1
print(PySide2.__version__)
# Gets a tuple with each version component
# e.g. (5, 11, 1, 'a', 1... | <commit_before>import PySide2.QtCore
# Prints PySide2 version
# e.g. 5.11.1a1
print(PySide2.__version__)
# Gets a tuple with each version component
# e.g. (5, 11, 1, 'a', 1)
print(PySide2.__version_info__)
# Prints the Qt version used to compile PySide2
# e.g. "5.11.2"
print(PySide2.QtCore.__version__)
# Gets a tup... | #!/usr/bin/env python3
# coding: utf-8
'''
PySide2
'''
import sys
try:
import PySide2.QtCore
except ImportError:
print('cannot load module: PySide2.QtCore')
sys.exit(1)
# Prints PySide2 version
# e.g. 5.11.1a1
print(PySide2.__version__)
# Gets a tuple with each version component
# e.g. (5, 11, 1, 'a', 1... | import PySide2.QtCore
# Prints PySide2 version
# e.g. 5.11.1a1
print(PySide2.__version__)
# Gets a tuple with each version component
# e.g. (5, 11, 1, 'a', 1)
print(PySide2.__version_info__)
# Prints the Qt version used to compile PySide2
# e.g. "5.11.2"
print(PySide2.QtCore.__version__)
# Gets a tuple with each ve... | <commit_before>import PySide2.QtCore
# Prints PySide2 version
# e.g. 5.11.1a1
print(PySide2.__version__)
# Gets a tuple with each version component
# e.g. (5, 11, 1, 'a', 1)
print(PySide2.__version_info__)
# Prints the Qt version used to compile PySide2
# e.g. "5.11.2"
print(PySide2.QtCore.__version__)
# Gets a tup... |
da67ce3f25a708b99cb81f17703e74965dbea960 | rtrss/filestorage/httputil.py | rtrss/filestorage/httputil.py | import logging
import time
import requests
from googleapiclient.errors import HttpError
# Number of retries in case of API errors
NUM_RETRIES = 3
# Delay between retry attempts, seconds
RETRY_DELAY = 1
_logger = logging.getLogger(__name__)
def is_retryable(exc):
retryable_codes = [500, 502, 503, 504]
"""... | import logging
import time
import requests
from googleapiclient.errors import HttpError
# Number of retries in case of API errors
NUM_RETRIES = 3
# Delay between retry attempts, seconds
RETRY_DELAY = 1
_logger = logging.getLogger(__name__)
def is_retryable(exc):
retryable_codes = [500, 502, 503, 504]
""... | Remove unnecessary parameter, fix type detection bug | Remove unnecessary parameter, fix type detection bug
| Python | apache-2.0 | notapresent/rtrss,notapresent/rtrss,notapresent/rtrss,notapresent/rtrss | import logging
import time
import requests
from googleapiclient.errors import HttpError
# Number of retries in case of API errors
NUM_RETRIES = 3
# Delay between retry attempts, seconds
RETRY_DELAY = 1
_logger = logging.getLogger(__name__)
def is_retryable(exc):
retryable_codes = [500, 502, 503, 504]
"""... | import logging
import time
import requests
from googleapiclient.errors import HttpError
# Number of retries in case of API errors
NUM_RETRIES = 3
# Delay between retry attempts, seconds
RETRY_DELAY = 1
_logger = logging.getLogger(__name__)
def is_retryable(exc):
retryable_codes = [500, 502, 503, 504]
""... | <commit_before>import logging
import time
import requests
from googleapiclient.errors import HttpError
# Number of retries in case of API errors
NUM_RETRIES = 3
# Delay between retry attempts, seconds
RETRY_DELAY = 1
_logger = logging.getLogger(__name__)
def is_retryable(exc):
retryable_codes = [500, 502, 50... | import logging
import time
import requests
from googleapiclient.errors import HttpError
# Number of retries in case of API errors
NUM_RETRIES = 3
# Delay between retry attempts, seconds
RETRY_DELAY = 1
_logger = logging.getLogger(__name__)
def is_retryable(exc):
retryable_codes = [500, 502, 503, 504]
""... | import logging
import time
import requests
from googleapiclient.errors import HttpError
# Number of retries in case of API errors
NUM_RETRIES = 3
# Delay between retry attempts, seconds
RETRY_DELAY = 1
_logger = logging.getLogger(__name__)
def is_retryable(exc):
retryable_codes = [500, 502, 503, 504]
"""... | <commit_before>import logging
import time
import requests
from googleapiclient.errors import HttpError
# Number of retries in case of API errors
NUM_RETRIES = 3
# Delay between retry attempts, seconds
RETRY_DELAY = 1
_logger = logging.getLogger(__name__)
def is_retryable(exc):
retryable_codes = [500, 502, 50... |
5a3cdba13cb4898b76d83c949fc3ab6895c267ff | scripts/cpuflags.py | scripts/cpuflags.py | import errno
class CPUFlags:
def __init__(self):
self.flags = set()
try:
self.flags = self.__parse_cpuinfo()
except IOError as e:
if e.errno == errno.ENOENT:
return
raise
def __contains__(self, name):
return name in self.fl... | import errno
import sys
class CPUFlags:
def __init__(self):
self.flags = set()
try:
self.flags = self.__parse_cpuinfo()
except IOError as e:
if e.errno == errno.ENOENT:
return
raise
def __contains__(self, name):
return name... | Check script returns an exit code | Check script returns an exit code
| Python | bsd-2-clause | WojciechMula/toys,WojciechMula/toys,WojciechMula/toys,WojciechMula/toys,WojciechMula/toys | import errno
class CPUFlags:
def __init__(self):
self.flags = set()
try:
self.flags = self.__parse_cpuinfo()
except IOError as e:
if e.errno == errno.ENOENT:
return
raise
def __contains__(self, name):
return name in self.fl... | import errno
import sys
class CPUFlags:
def __init__(self):
self.flags = set()
try:
self.flags = self.__parse_cpuinfo()
except IOError as e:
if e.errno == errno.ENOENT:
return
raise
def __contains__(self, name):
return name... | <commit_before>import errno
class CPUFlags:
def __init__(self):
self.flags = set()
try:
self.flags = self.__parse_cpuinfo()
except IOError as e:
if e.errno == errno.ENOENT:
return
raise
def __contains__(self, name):
return ... | import errno
import sys
class CPUFlags:
def __init__(self):
self.flags = set()
try:
self.flags = self.__parse_cpuinfo()
except IOError as e:
if e.errno == errno.ENOENT:
return
raise
def __contains__(self, name):
return name... | import errno
class CPUFlags:
def __init__(self):
self.flags = set()
try:
self.flags = self.__parse_cpuinfo()
except IOError as e:
if e.errno == errno.ENOENT:
return
raise
def __contains__(self, name):
return name in self.fl... | <commit_before>import errno
class CPUFlags:
def __init__(self):
self.flags = set()
try:
self.flags = self.__parse_cpuinfo()
except IOError as e:
if e.errno == errno.ENOENT:
return
raise
def __contains__(self, name):
return ... |
ea62a1cd9642dbff69cbfae3f8b540604a8a8fca | mine/__init__.py | mine/__init__.py | #!/usr/bin/env python
"""Package for mine."""
import sys
__project__ = 'mine'
__version__ = '0.1'
CLI = 'mine'
VERSION = __project__ + '-' + __version__
DESCRIPTION = "Manages running applications across multiple computers."
PYTHON_VERSION = 3, 3
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (man... | #!/usr/bin/env python
"""Package for mine."""
import sys
__project__ = 'mine'
__version__ = '0.1'
CLI = 'mine'
VERSION = __project__ + '-' + __version__
DESCRIPTION = "For applications that haven't learned to share."
PYTHON_VERSION = 3, 3
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (manual test... | Update headline to match GitHub | Update headline to match GitHub
| Python | mit | jacebrowning/mine | #!/usr/bin/env python
"""Package for mine."""
import sys
__project__ = 'mine'
__version__ = '0.1'
CLI = 'mine'
VERSION = __project__ + '-' + __version__
DESCRIPTION = "Manages running applications across multiple computers."
PYTHON_VERSION = 3, 3
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (man... | #!/usr/bin/env python
"""Package for mine."""
import sys
__project__ = 'mine'
__version__ = '0.1'
CLI = 'mine'
VERSION = __project__ + '-' + __version__
DESCRIPTION = "For applications that haven't learned to share."
PYTHON_VERSION = 3, 3
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (manual test... | <commit_before>#!/usr/bin/env python
"""Package for mine."""
import sys
__project__ = 'mine'
__version__ = '0.1'
CLI = 'mine'
VERSION = __project__ + '-' + __version__
DESCRIPTION = "Manages running applications across multiple computers."
PYTHON_VERSION = 3, 3
if not sys.version_info >= PYTHON_VERSION: # pragma... | #!/usr/bin/env python
"""Package for mine."""
import sys
__project__ = 'mine'
__version__ = '0.1'
CLI = 'mine'
VERSION = __project__ + '-' + __version__
DESCRIPTION = "For applications that haven't learned to share."
PYTHON_VERSION = 3, 3
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (manual test... | #!/usr/bin/env python
"""Package for mine."""
import sys
__project__ = 'mine'
__version__ = '0.1'
CLI = 'mine'
VERSION = __project__ + '-' + __version__
DESCRIPTION = "Manages running applications across multiple computers."
PYTHON_VERSION = 3, 3
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (man... | <commit_before>#!/usr/bin/env python
"""Package for mine."""
import sys
__project__ = 'mine'
__version__ = '0.1'
CLI = 'mine'
VERSION = __project__ + '-' + __version__
DESCRIPTION = "Manages running applications across multiple computers."
PYTHON_VERSION = 3, 3
if not sys.version_info >= PYTHON_VERSION: # pragma... |
f95460070e80e1d83394fa6ed08bad9dad34802c | ovp_users/emails.py | ovp_users/emails.py | from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user registers
"""
... | from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user registers
"""
... | Revert "fix getting user email for recoveryToken" | Revert "fix getting user email for recoveryToken"
This reverts commit a47b098e4d644391213958f9e05c179a7410208d.
| Python | agpl-3.0 | OpenVolunteeringPlatform/django-ovp-users,OpenVolunteeringPlatform/django-ovp-users | from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user registers
"""
... | from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user registers
"""
... | <commit_before>from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user regi... | from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user registers
"""
... | from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user registers
"""
... | <commit_before>from ovp_core.emails import BaseMail
class UserMail(BaseMail):
"""
This class is responsible for firing emails for Users
"""
def __init__(self, user, async_mail=None):
super(UserMail, self).__init__(user.email, async_mail)
def sendWelcome(self, context={}):
"""
Sent when user regi... |
839a0cafca1d172f7a061dcec5f6a4eca6d725c8 | superlists/lists/tests.py | superlists/lists/tests.py | from django.test import TestCase
# Create your tests here.
| from django.test import TestCase
class SmokeTest(TestCase):
def test_bad_maths(self):
self.assertEqual(1 + 1, 3)
| Add app for lists, with deliberately failing unit test | Add app for lists, with deliberately failing unit test
| Python | apache-2.0 | Alfawuhn/test-driven-python | from django.test import TestCase
# Create your tests here.
Add app for lists, with deliberately failing unit test | from django.test import TestCase
class SmokeTest(TestCase):
def test_bad_maths(self):
self.assertEqual(1 + 1, 3)
| <commit_before>from django.test import TestCase
# Create your tests here.
<commit_msg>Add app for lists, with deliberately failing unit test<commit_after> | from django.test import TestCase
class SmokeTest(TestCase):
def test_bad_maths(self):
self.assertEqual(1 + 1, 3)
| from django.test import TestCase
# Create your tests here.
Add app for lists, with deliberately failing unit testfrom django.test import TestCase
class SmokeTest(TestCase):
def test_bad_maths(self):
self.assertEqual(1 + 1, 3)
| <commit_before>from django.test import TestCase
# Create your tests here.
<commit_msg>Add app for lists, with deliberately failing unit test<commit_after>from django.test import TestCase
class SmokeTest(TestCase):
def test_bad_maths(self):
self.assertEqual(1 + 1, 3)
|
13d9cf933e49849a3c5343e7bdbf887b9aee6097 | busbus/entity.py | busbus/entity.py | from busbus import util
class LazyEntityProperty(object):
def __init__(self, f, *args, **kwargs):
self.f = f
self.args = args
self.kwargs = kwargs
def __call__(self):
return self.f(*self.args, **self.kwargs)
class BaseEntity(object):
def __init__(self, provider, **kwar... | from busbus import util
class LazyEntityProperty(object):
def __init__(self, f, *args, **kwargs):
self.f = f
self.args = args
self.kwargs = kwargs
def __call__(self):
return self.f(*self.args, **self.kwargs)
class BaseEntity(object):
__repr_attrs__ = ('id',)
def __... | Use an instance variable instead of a non-standard argument to __repr__ | Use an instance variable instead of a non-standard argument to __repr__
| Python | mit | spaceboats/busbus | from busbus import util
class LazyEntityProperty(object):
def __init__(self, f, *args, **kwargs):
self.f = f
self.args = args
self.kwargs = kwargs
def __call__(self):
return self.f(*self.args, **self.kwargs)
class BaseEntity(object):
def __init__(self, provider, **kwar... | from busbus import util
class LazyEntityProperty(object):
def __init__(self, f, *args, **kwargs):
self.f = f
self.args = args
self.kwargs = kwargs
def __call__(self):
return self.f(*self.args, **self.kwargs)
class BaseEntity(object):
__repr_attrs__ = ('id',)
def __... | <commit_before>from busbus import util
class LazyEntityProperty(object):
def __init__(self, f, *args, **kwargs):
self.f = f
self.args = args
self.kwargs = kwargs
def __call__(self):
return self.f(*self.args, **self.kwargs)
class BaseEntity(object):
def __init__(self, p... | from busbus import util
class LazyEntityProperty(object):
def __init__(self, f, *args, **kwargs):
self.f = f
self.args = args
self.kwargs = kwargs
def __call__(self):
return self.f(*self.args, **self.kwargs)
class BaseEntity(object):
__repr_attrs__ = ('id',)
def __... | from busbus import util
class LazyEntityProperty(object):
def __init__(self, f, *args, **kwargs):
self.f = f
self.args = args
self.kwargs = kwargs
def __call__(self):
return self.f(*self.args, **self.kwargs)
class BaseEntity(object):
def __init__(self, provider, **kwar... | <commit_before>from busbus import util
class LazyEntityProperty(object):
def __init__(self, f, *args, **kwargs):
self.f = f
self.args = args
self.kwargs = kwargs
def __call__(self):
return self.f(*self.args, **self.kwargs)
class BaseEntity(object):
def __init__(self, p... |
5b6823ec19185ed5b413d1c01d3afeb5b1716778 | taca/server_status/cli.py | taca/server_status/cli.py | import click
import logging
from taca.server_status import server_status as status
from taca.utils.config import CONFIG
from taca.server_status import cronjobs as cj # to avoid similar names with command, otherwise exception
@click.group(name='server_status')
def server_status():
""" Monitor server status """
... | import click
import logging
from taca.server_status import server_status as status
from taca.utils.config import CONFIG
from taca.server_status import cronjobs as cj # to avoid similar names with command, otherwise exception
@click.group(name='server_status')
def server_status():
""" Monitor server status """
#... | Move warning about missing config entry to relevant subcommand | Move warning about missing config entry to relevant subcommand
| Python | mit | SciLifeLab/TACA,SciLifeLab/TACA,SciLifeLab/TACA | import click
import logging
from taca.server_status import server_status as status
from taca.utils.config import CONFIG
from taca.server_status import cronjobs as cj # to avoid similar names with command, otherwise exception
@click.group(name='server_status')
def server_status():
""" Monitor server status """
... | import click
import logging
from taca.server_status import server_status as status
from taca.utils.config import CONFIG
from taca.server_status import cronjobs as cj # to avoid similar names with command, otherwise exception
@click.group(name='server_status')
def server_status():
""" Monitor server status """
#... | <commit_before>import click
import logging
from taca.server_status import server_status as status
from taca.utils.config import CONFIG
from taca.server_status import cronjobs as cj # to avoid similar names with command, otherwise exception
@click.group(name='server_status')
def server_status():
""" Monitor serve... | import click
import logging
from taca.server_status import server_status as status
from taca.utils.config import CONFIG
from taca.server_status import cronjobs as cj # to avoid similar names with command, otherwise exception
@click.group(name='server_status')
def server_status():
""" Monitor server status """
#... | import click
import logging
from taca.server_status import server_status as status
from taca.utils.config import CONFIG
from taca.server_status import cronjobs as cj # to avoid similar names with command, otherwise exception
@click.group(name='server_status')
def server_status():
""" Monitor server status """
... | <commit_before>import click
import logging
from taca.server_status import server_status as status
from taca.utils.config import CONFIG
from taca.server_status import cronjobs as cj # to avoid similar names with command, otherwise exception
@click.group(name='server_status')
def server_status():
""" Monitor serve... |
d20347f4a57bb195291ebc79fc1ca0858b3f1d65 | PyLunch/pylunch/specials/models.py | PyLunch/pylunch/specials/models.py | from django.db import models
MAX_PRICE_FORMAT = {
'max_digits': 5,
'decimal_places': 2
}
SPECIAL_TYPES = (
('LU', 'Lunch'),
('BR', 'Breakfast'),
('DI', 'Dinner'),
)
MAX_RESTAURANT_NAME_LENGTH = 50
MAX_DESCRIPTION_LENGTH = 500
class Restaurant(models.Model):
name = models.Ch... | from django.db import models
MAX_PRICE_FORMAT = {
'max_digits': 5,
'decimal_places': 2
}
SPECIAL_TYPES = (
('LU', 'Lunch'),
('BR', 'Breakfast'),
('DI', 'Dinner'),
)
MAX_RESTAURANT_NAME_LENGTH = 50
MAX_DESCRIPTION_LENGTH = 500
class Restaurant(models.Model):
name = models.Ch... | Add fields to Special model | Add fields to Special model
| Python | unlicense | wiehan-a/pylunch | from django.db import models
MAX_PRICE_FORMAT = {
'max_digits': 5,
'decimal_places': 2
}
SPECIAL_TYPES = (
('LU', 'Lunch'),
('BR', 'Breakfast'),
('DI', 'Dinner'),
)
MAX_RESTAURANT_NAME_LENGTH = 50
MAX_DESCRIPTION_LENGTH = 500
class Restaurant(models.Model):
name = models.Ch... | from django.db import models
MAX_PRICE_FORMAT = {
'max_digits': 5,
'decimal_places': 2
}
SPECIAL_TYPES = (
('LU', 'Lunch'),
('BR', 'Breakfast'),
('DI', 'Dinner'),
)
MAX_RESTAURANT_NAME_LENGTH = 50
MAX_DESCRIPTION_LENGTH = 500
class Restaurant(models.Model):
name = models.Ch... | <commit_before>from django.db import models
MAX_PRICE_FORMAT = {
'max_digits': 5,
'decimal_places': 2
}
SPECIAL_TYPES = (
('LU', 'Lunch'),
('BR', 'Breakfast'),
('DI', 'Dinner'),
)
MAX_RESTAURANT_NAME_LENGTH = 50
MAX_DESCRIPTION_LENGTH = 500
class Restaurant(models.Model):
n... | from django.db import models
MAX_PRICE_FORMAT = {
'max_digits': 5,
'decimal_places': 2
}
SPECIAL_TYPES = (
('LU', 'Lunch'),
('BR', 'Breakfast'),
('DI', 'Dinner'),
)
MAX_RESTAURANT_NAME_LENGTH = 50
MAX_DESCRIPTION_LENGTH = 500
class Restaurant(models.Model):
name = models.Ch... | from django.db import models
MAX_PRICE_FORMAT = {
'max_digits': 5,
'decimal_places': 2
}
SPECIAL_TYPES = (
('LU', 'Lunch'),
('BR', 'Breakfast'),
('DI', 'Dinner'),
)
MAX_RESTAURANT_NAME_LENGTH = 50
MAX_DESCRIPTION_LENGTH = 500
class Restaurant(models.Model):
name = models.Ch... | <commit_before>from django.db import models
MAX_PRICE_FORMAT = {
'max_digits': 5,
'decimal_places': 2
}
SPECIAL_TYPES = (
('LU', 'Lunch'),
('BR', 'Breakfast'),
('DI', 'Dinner'),
)
MAX_RESTAURANT_NAME_LENGTH = 50
MAX_DESCRIPTION_LENGTH = 500
class Restaurant(models.Model):
n... |
d72e34de631e3f6984a1810cbd8ec2b128a196de | sigma_core/tests/factories.py | sigma_core/tests/factories.py | import factory
from django.utils.text import slugify
from sigma_core.models.user import User
from sigma_core.models.group import Group
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
lastname = factory.Faker('last_name')
firstname = factory.Faker('first_name')
... | import factory
from django.utils.text import slugify
from sigma_core.models.user import User
from sigma_core.models.group import Group
from sigma_core.models.user_group import UserGroup
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
lastname = factory.Faker('last_nam... | Add UserGroupFactory for future tests | Add UserGroupFactory for future tests
| Python | agpl-3.0 | ProjetSigma/backend,ProjetSigma/backend | import factory
from django.utils.text import slugify
from sigma_core.models.user import User
from sigma_core.models.group import Group
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
lastname = factory.Faker('last_name')
firstname = factory.Faker('first_name')
... | import factory
from django.utils.text import slugify
from sigma_core.models.user import User
from sigma_core.models.group import Group
from sigma_core.models.user_group import UserGroup
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
lastname = factory.Faker('last_nam... | <commit_before>import factory
from django.utils.text import slugify
from sigma_core.models.user import User
from sigma_core.models.group import Group
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
lastname = factory.Faker('last_name')
firstname = factory.Faker('fi... | import factory
from django.utils.text import slugify
from sigma_core.models.user import User
from sigma_core.models.group import Group
from sigma_core.models.user_group import UserGroup
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
lastname = factory.Faker('last_nam... | import factory
from django.utils.text import slugify
from sigma_core.models.user import User
from sigma_core.models.group import Group
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
lastname = factory.Faker('last_name')
firstname = factory.Faker('first_name')
... | <commit_before>import factory
from django.utils.text import slugify
from sigma_core.models.user import User
from sigma_core.models.group import Group
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
lastname = factory.Faker('last_name')
firstname = factory.Faker('fi... |
70f69f7b801404f7091e91b6ed997602709f9f42 | commands/globaladd.py | commands/globaladd.py | from devbot import chat
def call(message: str, name, protocol, cfg, commands):
if message is '':
chat.say('/msg {} {}'.format(name, commands['help']['globaladd'].format('globaladd')))
return
if ' ' in message:
chat.say('/msg {} Sorry, that was not a valid player name: It contains spac... | from devbot import chat
def call(message: str, name, protocol, cfg, commands):
if message is '':
chat.say('/msg {} {}'.format(name, commands['help']['globaladd'].format('globaladd')))
return
if ' ' in message:
chat.say('/msg {} Sorry, that was not a valid player name: It contains space... | Fix gadd not sending tutorial | Fix gadd not sending tutorial
| Python | mit | Ameliorate/DevotedBot,Ameliorate/DevotedBot | from devbot import chat
def call(message: str, name, protocol, cfg, commands):
if message is '':
chat.say('/msg {} {}'.format(name, commands['help']['globaladd'].format('globaladd')))
return
if ' ' in message:
chat.say('/msg {} Sorry, that was not a valid player name: It contains spac... | from devbot import chat
def call(message: str, name, protocol, cfg, commands):
if message is '':
chat.say('/msg {} {}'.format(name, commands['help']['globaladd'].format('globaladd')))
return
if ' ' in message:
chat.say('/msg {} Sorry, that was not a valid player name: It contains space... | <commit_before>from devbot import chat
def call(message: str, name, protocol, cfg, commands):
if message is '':
chat.say('/msg {} {}'.format(name, commands['help']['globaladd'].format('globaladd')))
return
if ' ' in message:
chat.say('/msg {} Sorry, that was not a valid player name: I... | from devbot import chat
def call(message: str, name, protocol, cfg, commands):
if message is '':
chat.say('/msg {} {}'.format(name, commands['help']['globaladd'].format('globaladd')))
return
if ' ' in message:
chat.say('/msg {} Sorry, that was not a valid player name: It contains space... | from devbot import chat
def call(message: str, name, protocol, cfg, commands):
if message is '':
chat.say('/msg {} {}'.format(name, commands['help']['globaladd'].format('globaladd')))
return
if ' ' in message:
chat.say('/msg {} Sorry, that was not a valid player name: It contains spac... | <commit_before>from devbot import chat
def call(message: str, name, protocol, cfg, commands):
if message is '':
chat.say('/msg {} {}'.format(name, commands['help']['globaladd'].format('globaladd')))
return
if ' ' in message:
chat.say('/msg {} Sorry, that was not a valid player name: I... |
559f3c18a7e27e4bb1147b03a27ec083a66749d0 | was/photo/models.py | was/photo/models.py | from django.db import models
class Photo(models.Model):
artist = models.ForeignKey('artists.Artists')
picture = models.ImageField(null=True, blank=True, upload_to="art_picture/")
comment = models.TextField(max_length=500) | from django.db import models
class Photo(models.Model):
artist = models.ForeignKey('artists.Artists')
picture = models.ImageField(null=True, blank=True, upload_to="art_picture/")
comment = models.TextField(max_length=500)
def __str__(self):
return '{}'.format(self.picture) | Define a '__str__' method for photo model | Define a '__str__' method for photo model
| Python | mit | KeserOner/where-artists-share,KeserOner/where-artists-share | from django.db import models
class Photo(models.Model):
artist = models.ForeignKey('artists.Artists')
picture = models.ImageField(null=True, blank=True, upload_to="art_picture/")
comment = models.TextField(max_length=500)Define a '__str__' method for photo model | from django.db import models
class Photo(models.Model):
artist = models.ForeignKey('artists.Artists')
picture = models.ImageField(null=True, blank=True, upload_to="art_picture/")
comment = models.TextField(max_length=500)
def __str__(self):
return '{}'.format(self.picture) | <commit_before>from django.db import models
class Photo(models.Model):
artist = models.ForeignKey('artists.Artists')
picture = models.ImageField(null=True, blank=True, upload_to="art_picture/")
comment = models.TextField(max_length=500)<commit_msg>Define a '__str__' method for photo model<commit_after> | from django.db import models
class Photo(models.Model):
artist = models.ForeignKey('artists.Artists')
picture = models.ImageField(null=True, blank=True, upload_to="art_picture/")
comment = models.TextField(max_length=500)
def __str__(self):
return '{}'.format(self.picture) | from django.db import models
class Photo(models.Model):
artist = models.ForeignKey('artists.Artists')
picture = models.ImageField(null=True, blank=True, upload_to="art_picture/")
comment = models.TextField(max_length=500)Define a '__str__' method for photo modelfrom django.db import models
class Photo(m... | <commit_before>from django.db import models
class Photo(models.Model):
artist = models.ForeignKey('artists.Artists')
picture = models.ImageField(null=True, blank=True, upload_to="art_picture/")
comment = models.TextField(max_length=500)<commit_msg>Define a '__str__' method for photo model<commit_after>fro... |
c967776872e9a5c6fa840d202f25a067020c148f | cyder/cydhcp/range/forms.py | cyder/cydhcp/range/forms.py | from django import forms
from cyder.base.eav.forms import get_eav_form
from cyder.base.mixins import UsabilityFormMixin
from cyder.cydhcp.range.models import Range, RangeAV
from cyder.cydns.forms import ViewChoiceForm
class RangeForm(ViewChoiceForm, UsabilityFormMixin):
class Meta:
model = Range
... | from django import forms
from cyder.base.eav.forms import get_eav_form
from cyder.base.mixins import UsabilityFormMixin
from cyder.cydhcp.range.models import Range, RangeAV
from cyder.cydns.forms import ViewChoiceForm
class RangeForm(ViewChoiceForm, UsabilityFormMixin):
class Meta:
model = Range
... | Include name field in range form | Include name field in range form
| Python | bsd-3-clause | OSU-Net/cyder,zeeman/cyder,drkitty/cyder,OSU-Net/cyder,akeym/cyder,murrown/cyder,murrown/cyder,akeym/cyder,zeeman/cyder,akeym/cyder,murrown/cyder,murrown/cyder,drkitty/cyder,zeeman/cyder,akeym/cyder,zeeman/cyder,OSU-Net/cyder,drkitty/cyder,drkitty/cyder,OSU-Net/cyder | from django import forms
from cyder.base.eav.forms import get_eav_form
from cyder.base.mixins import UsabilityFormMixin
from cyder.cydhcp.range.models import Range, RangeAV
from cyder.cydns.forms import ViewChoiceForm
class RangeForm(ViewChoiceForm, UsabilityFormMixin):
class Meta:
model = Range
... | from django import forms
from cyder.base.eav.forms import get_eav_form
from cyder.base.mixins import UsabilityFormMixin
from cyder.cydhcp.range.models import Range, RangeAV
from cyder.cydns.forms import ViewChoiceForm
class RangeForm(ViewChoiceForm, UsabilityFormMixin):
class Meta:
model = Range
... | <commit_before>from django import forms
from cyder.base.eav.forms import get_eav_form
from cyder.base.mixins import UsabilityFormMixin
from cyder.cydhcp.range.models import Range, RangeAV
from cyder.cydns.forms import ViewChoiceForm
class RangeForm(ViewChoiceForm, UsabilityFormMixin):
class Meta:
model =... | from django import forms
from cyder.base.eav.forms import get_eav_form
from cyder.base.mixins import UsabilityFormMixin
from cyder.cydhcp.range.models import Range, RangeAV
from cyder.cydns.forms import ViewChoiceForm
class RangeForm(ViewChoiceForm, UsabilityFormMixin):
class Meta:
model = Range
... | from django import forms
from cyder.base.eav.forms import get_eav_form
from cyder.base.mixins import UsabilityFormMixin
from cyder.cydhcp.range.models import Range, RangeAV
from cyder.cydns.forms import ViewChoiceForm
class RangeForm(ViewChoiceForm, UsabilityFormMixin):
class Meta:
model = Range
... | <commit_before>from django import forms
from cyder.base.eav.forms import get_eav_form
from cyder.base.mixins import UsabilityFormMixin
from cyder.cydhcp.range.models import Range, RangeAV
from cyder.cydns.forms import ViewChoiceForm
class RangeForm(ViewChoiceForm, UsabilityFormMixin):
class Meta:
model =... |
13ee0e2084765dcf958f4dbc844da54750878242 | snapshottest/django.py | snapshottest/django.py | from __future__ import absolute_import
from django.test import TestCase as dTestCase
from django.test.runner import DiscoverRunner
from snapshottest.reporting import reporting_lines
from .unittest import TestCase as uTestCase
class TestRunner(DiscoverRunner):
separator1 = "=" * 70
separator2 = "-" * 70
... | from __future__ import absolute_import
from django.test import TestCase as dTestCase
from django.test import SimpleTestCase as dSimpleTestCase
from django.test.runner import DiscoverRunner
from snapshottest.reporting import reporting_lines
from .unittest import TestCase as uTestCase
class TestRunner(DiscoverRunner):... | Allow use of alternate Django test cases | Allow use of alternate Django test cases
| Python | mit | syrusakbary/snapshottest | from __future__ import absolute_import
from django.test import TestCase as dTestCase
from django.test.runner import DiscoverRunner
from snapshottest.reporting import reporting_lines
from .unittest import TestCase as uTestCase
class TestRunner(DiscoverRunner):
separator1 = "=" * 70
separator2 = "-" * 70
... | from __future__ import absolute_import
from django.test import TestCase as dTestCase
from django.test import SimpleTestCase as dSimpleTestCase
from django.test.runner import DiscoverRunner
from snapshottest.reporting import reporting_lines
from .unittest import TestCase as uTestCase
class TestRunner(DiscoverRunner):... | <commit_before>from __future__ import absolute_import
from django.test import TestCase as dTestCase
from django.test.runner import DiscoverRunner
from snapshottest.reporting import reporting_lines
from .unittest import TestCase as uTestCase
class TestRunner(DiscoverRunner):
separator1 = "=" * 70
separator2 ... | from __future__ import absolute_import
from django.test import TestCase as dTestCase
from django.test import SimpleTestCase as dSimpleTestCase
from django.test.runner import DiscoverRunner
from snapshottest.reporting import reporting_lines
from .unittest import TestCase as uTestCase
class TestRunner(DiscoverRunner):... | from __future__ import absolute_import
from django.test import TestCase as dTestCase
from django.test.runner import DiscoverRunner
from snapshottest.reporting import reporting_lines
from .unittest import TestCase as uTestCase
class TestRunner(DiscoverRunner):
separator1 = "=" * 70
separator2 = "-" * 70
... | <commit_before>from __future__ import absolute_import
from django.test import TestCase as dTestCase
from django.test.runner import DiscoverRunner
from snapshottest.reporting import reporting_lines
from .unittest import TestCase as uTestCase
class TestRunner(DiscoverRunner):
separator1 = "=" * 70
separator2 ... |
7c591a38bc89350ea2586fb83a6880cdf71b4a9a | passwd_change.py | passwd_change.py | #!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 4:
keys_file = _args[1]
target_file = _args[2]
result_file = _args[3]
with open(keys_file, 'r') as k:
keys = k.readlines()
keys = [key.strip() for key in keys]
... | #!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 4:
keys_file = _args[1]
target_file = _args[2]
result_file = _args[3]
try:
with open(keys_file, 'r') as k:
keys = k.readlines()
keys = [key.s... | Add Exception to all with's block. | Add Exception to all with's block.
| Python | mit | maxsocl/oldmailer | #!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 4:
keys_file = _args[1]
target_file = _args[2]
result_file = _args[3]
with open(keys_file, 'r') as k:
keys = k.readlines()
keys = [key.strip() for key in keys]
... | #!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 4:
keys_file = _args[1]
target_file = _args[2]
result_file = _args[3]
try:
with open(keys_file, 'r') as k:
keys = k.readlines()
keys = [key.s... | <commit_before>#!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 4:
keys_file = _args[1]
target_file = _args[2]
result_file = _args[3]
with open(keys_file, 'r') as k:
keys = k.readlines()
keys = [key.strip() fo... | #!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 4:
keys_file = _args[1]
target_file = _args[2]
result_file = _args[3]
try:
with open(keys_file, 'r') as k:
keys = k.readlines()
keys = [key.s... | #!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 4:
keys_file = _args[1]
target_file = _args[2]
result_file = _args[3]
with open(keys_file, 'r') as k:
keys = k.readlines()
keys = [key.strip() for key in keys]
... | <commit_before>#!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 4:
keys_file = _args[1]
target_file = _args[2]
result_file = _args[3]
with open(keys_file, 'r') as k:
keys = k.readlines()
keys = [key.strip() fo... |
c79c573c93a96bf5b631472c5e7efccc60102813 | yatsm/log_yatsm.py | yatsm/log_yatsm.py | import logging
FORMAT = '%(asctime)s:%(levelname)s:%(module)s.%(funcName)s:%(message)s'
logging.basicConfig(format=FORMAT, level=logging.INFO, datefmt='%H:%M:%S')
logger = logging.getLogger('yatsm')
| import logging
_FORMAT = '%(asctime)s:%(levelname)s:%(module)s.%(funcName)s:%(message)s'
_formatter = logging.Formatter(_FORMAT)
_handler = logging.StreamHandler()
_handler.setFormatter(_formatter)
logger = logging.getLogger('yatsm')
logger.addHandler(_handler)
logger.setLevel(logging.INFO)
| Change logger to be more friendly and play nice | Change logger to be more friendly and play nice
| Python | mit | ceholden/yatsm,ceholden/yatsm,valpasq/yatsm,c11/yatsm,valpasq/yatsm,c11/yatsm | import logging
FORMAT = '%(asctime)s:%(levelname)s:%(module)s.%(funcName)s:%(message)s'
logging.basicConfig(format=FORMAT, level=logging.INFO, datefmt='%H:%M:%S')
logger = logging.getLogger('yatsm')
Change logger to be more friendly and play nice | import logging
_FORMAT = '%(asctime)s:%(levelname)s:%(module)s.%(funcName)s:%(message)s'
_formatter = logging.Formatter(_FORMAT)
_handler = logging.StreamHandler()
_handler.setFormatter(_formatter)
logger = logging.getLogger('yatsm')
logger.addHandler(_handler)
logger.setLevel(logging.INFO)
| <commit_before>import logging
FORMAT = '%(asctime)s:%(levelname)s:%(module)s.%(funcName)s:%(message)s'
logging.basicConfig(format=FORMAT, level=logging.INFO, datefmt='%H:%M:%S')
logger = logging.getLogger('yatsm')
<commit_msg>Change logger to be more friendly and play nice<commit_after> | import logging
_FORMAT = '%(asctime)s:%(levelname)s:%(module)s.%(funcName)s:%(message)s'
_formatter = logging.Formatter(_FORMAT)
_handler = logging.StreamHandler()
_handler.setFormatter(_formatter)
logger = logging.getLogger('yatsm')
logger.addHandler(_handler)
logger.setLevel(logging.INFO)
| import logging
FORMAT = '%(asctime)s:%(levelname)s:%(module)s.%(funcName)s:%(message)s'
logging.basicConfig(format=FORMAT, level=logging.INFO, datefmt='%H:%M:%S')
logger = logging.getLogger('yatsm')
Change logger to be more friendly and play niceimport logging
_FORMAT = '%(asctime)s:%(levelname)s:%(module)s.%(funcNam... | <commit_before>import logging
FORMAT = '%(asctime)s:%(levelname)s:%(module)s.%(funcName)s:%(message)s'
logging.basicConfig(format=FORMAT, level=logging.INFO, datefmt='%H:%M:%S')
logger = logging.getLogger('yatsm')
<commit_msg>Change logger to be more friendly and play nice<commit_after>import logging
_FORMAT = '%(asc... |
03ebfe0518a7ac39f9414b3e8d8638c9dcba917c | tests/auth/test_models.py | tests/auth/test_models.py | # -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.utils import unittest
from bakery.auth.models import BakeryUser
class TestBakeryUserModel(TestCase):
@unittest.skip('Not yet implemented')
def test_get_absolute_url(self):
user = Bakery... | # -*- coding: utf-8 -*-
from django.test import TestCase
from bakery.auth.models import BakeryUser
class TestBakeryUserModel(TestCase):
def test_get_absolute_url(self):
user = BakeryUser.objects.create_user('user', 'password')
user.name = 'John Doe'
self.assertEqual(user.get_absolute_ur... | Adjust test (refers prev commit) | Adjust test (refers prev commit)
| Python | bsd-3-clause | muffins-on-dope/bakery,muffins-on-dope/bakery,muffins-on-dope/bakery | # -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.utils import unittest
from bakery.auth.models import BakeryUser
class TestBakeryUserModel(TestCase):
@unittest.skip('Not yet implemented')
def test_get_absolute_url(self):
user = Bakery... | # -*- coding: utf-8 -*-
from django.test import TestCase
from bakery.auth.models import BakeryUser
class TestBakeryUserModel(TestCase):
def test_get_absolute_url(self):
user = BakeryUser.objects.create_user('user', 'password')
user.name = 'John Doe'
self.assertEqual(user.get_absolute_ur... | <commit_before># -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.utils import unittest
from bakery.auth.models import BakeryUser
class TestBakeryUserModel(TestCase):
@unittest.skip('Not yet implemented')
def test_get_absolute_url(self):
... | # -*- coding: utf-8 -*-
from django.test import TestCase
from bakery.auth.models import BakeryUser
class TestBakeryUserModel(TestCase):
def test_get_absolute_url(self):
user = BakeryUser.objects.create_user('user', 'password')
user.name = 'John Doe'
self.assertEqual(user.get_absolute_ur... | # -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.utils import unittest
from bakery.auth.models import BakeryUser
class TestBakeryUserModel(TestCase):
@unittest.skip('Not yet implemented')
def test_get_absolute_url(self):
user = Bakery... | <commit_before># -*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.utils import unittest
from bakery.auth.models import BakeryUser
class TestBakeryUserModel(TestCase):
@unittest.skip('Not yet implemented')
def test_get_absolute_url(self):
... |
853eb4896315c7fc60b1cbd7c87be9f7674f01ba | urls.py | urls.py | from django.conf.urls.defaults import *
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.views.generic.simple import direct_to_template
import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
(r'^idp/', incl... | from django.conf.urls.defaults import *
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.views.generic.simple import direct_to_template
import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
(r'^idp/', incl... | Move OpenID stuff under /accounts/openid/ | Move OpenID stuff under /accounts/openid/
| Python | agpl-3.0 | adieu/authentic2,adieu/authentic2,pu239ppy/authentic2,incuna/authentic,incuna/authentic,BryceLohr/authentic,BryceLohr/authentic,pu239ppy/authentic2,incuna/authentic,adieu/authentic2,adieu/authentic2,BryceLohr/authentic,BryceLohr/authentic,incuna/authentic,incuna/authentic,pu239ppy/authentic2,pu239ppy/authentic2 | from django.conf.urls.defaults import *
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.views.generic.simple import direct_to_template
import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
(r'^idp/', incl... | from django.conf.urls.defaults import *
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.views.generic.simple import direct_to_template
import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
(r'^idp/', incl... | <commit_before>from django.conf.urls.defaults import *
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.views.generic.simple import direct_to_template
import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
... | from django.conf.urls.defaults import *
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.views.generic.simple import direct_to_template
import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
(r'^idp/', incl... | from django.conf.urls.defaults import *
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.views.generic.simple import direct_to_template
import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
(r'^idp/', incl... | <commit_before>from django.conf.urls.defaults import *
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.views.generic.simple import direct_to_template
import settings
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
... |
73af0eed3ce746154b957af5c05137f9e432c7a3 | tests/test_pkgmanifest.py | tests/test_pkgmanifest.py | # Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
import requests
from platformio.util import get_api_result
def pytest_generate_tests(metafunc):
if "package_data" not in metafunc.fixturenames:
return
pkgs_manifest = get_api_result("/packages")
assert isinstance(pkgs_manif... | # Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
import requests
from platformio.util import get_api_result
def pytest_generate_tests(metafunc):
if "package_data" not in metafunc.fixturenames:
return
pkgs_manifest = get_api_result("/packages")
assert isinstance(pkgs_manif... | Add "application/octet-stream" mime type for package | Add "application/octet-stream" mime type for package
| Python | apache-2.0 | bkudria/platformio,awong1900/platformio,bkudria/platformio,platformio/platformio,jrobeson/platformio,platformio/platformio-core,TimJay/platformio,jrobeson/platformio,eiginn/platformio,platformio/platformio-core,bkudria/platformio,TimJay/platformio,TimJay/platformio,awong1900/platformio,valeros/platformio,ZachMassia/pla... | # Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
import requests
from platformio.util import get_api_result
def pytest_generate_tests(metafunc):
if "package_data" not in metafunc.fixturenames:
return
pkgs_manifest = get_api_result("/packages")
assert isinstance(pkgs_manif... | # Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
import requests
from platformio.util import get_api_result
def pytest_generate_tests(metafunc):
if "package_data" not in metafunc.fixturenames:
return
pkgs_manifest = get_api_result("/packages")
assert isinstance(pkgs_manif... | <commit_before># Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
import requests
from platformio.util import get_api_result
def pytest_generate_tests(metafunc):
if "package_data" not in metafunc.fixturenames:
return
pkgs_manifest = get_api_result("/packages")
assert isinst... | # Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
import requests
from platformio.util import get_api_result
def pytest_generate_tests(metafunc):
if "package_data" not in metafunc.fixturenames:
return
pkgs_manifest = get_api_result("/packages")
assert isinstance(pkgs_manif... | # Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
import requests
from platformio.util import get_api_result
def pytest_generate_tests(metafunc):
if "package_data" not in metafunc.fixturenames:
return
pkgs_manifest = get_api_result("/packages")
assert isinstance(pkgs_manif... | <commit_before># Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
import requests
from platformio.util import get_api_result
def pytest_generate_tests(metafunc):
if "package_data" not in metafunc.fixturenames:
return
pkgs_manifest = get_api_result("/packages")
assert isinst... |
76dbf84facac62345ba02f17b33844a41d326d1f | tg/tests/test_testutil.py | tg/tests/test_testutil.py | """Tests for the testutil module"""
from unittest import TestCase
from sqlalchemy import create_engine
from sqlalchemy.exc import DBAPIError
import transaction
from tg.testutil import DBTest
from tg.tests.fixtures import model
# Ideally, we would have defined several different descendants of DBTest,
# in order to ... | """Tests for the testutil module"""
from unittest import TestCase
from sqlalchemy import create_engine
from sqlalchemy.exc import DBAPIError
import transaction
from tg.testutil import DBTest
from tg.tests.fixtures import model
# Ideally, we would have defined several different descendants of DBTest,
# in order to ... | Fix from cdevienne for SA Deprecation warnings | Fix from cdevienne for SA Deprecation warnings
--HG--
extra : convert_revision : svn%3A77541ad4-5f01-0410-9ede-a1b63cd9a898/trunk%405878
| Python | mit | lucius-feng/tg2,lucius-feng/tg2 | """Tests for the testutil module"""
from unittest import TestCase
from sqlalchemy import create_engine
from sqlalchemy.exc import DBAPIError
import transaction
from tg.testutil import DBTest
from tg.tests.fixtures import model
# Ideally, we would have defined several different descendants of DBTest,
# in order to ... | """Tests for the testutil module"""
from unittest import TestCase
from sqlalchemy import create_engine
from sqlalchemy.exc import DBAPIError
import transaction
from tg.testutil import DBTest
from tg.tests.fixtures import model
# Ideally, we would have defined several different descendants of DBTest,
# in order to ... | <commit_before>"""Tests for the testutil module"""
from unittest import TestCase
from sqlalchemy import create_engine
from sqlalchemy.exc import DBAPIError
import transaction
from tg.testutil import DBTest
from tg.tests.fixtures import model
# Ideally, we would have defined several different descendants of DBTest,... | """Tests for the testutil module"""
from unittest import TestCase
from sqlalchemy import create_engine
from sqlalchemy.exc import DBAPIError
import transaction
from tg.testutil import DBTest
from tg.tests.fixtures import model
# Ideally, we would have defined several different descendants of DBTest,
# in order to ... | """Tests for the testutil module"""
from unittest import TestCase
from sqlalchemy import create_engine
from sqlalchemy.exc import DBAPIError
import transaction
from tg.testutil import DBTest
from tg.tests.fixtures import model
# Ideally, we would have defined several different descendants of DBTest,
# in order to ... | <commit_before>"""Tests for the testutil module"""
from unittest import TestCase
from sqlalchemy import create_engine
from sqlalchemy.exc import DBAPIError
import transaction
from tg.testutil import DBTest
from tg.tests.fixtures import model
# Ideally, we would have defined several different descendants of DBTest,... |
daa4021011778f7511ad2c97648155bb17539d98 | tests/func/test_examples.py | tests/func/test_examples.py | import pytest # noqa
import os
import sys
import glob
import imp
def test_examples():
examples_pat = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'../../examples/*/*.py')
# Filter out __init__.py
examples = [f for f in glob.glob(examples_pat)
... | import pytest # noqa
import os
import sys
import glob
import importlib
def test_examples():
examples_pat = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'../../examples/*/*.py')
# Filter out __init__.py
examples = [f for f in glob.glob(examples_pat)
... | Replace deprecated imp with importlib | Replace deprecated imp with importlib
| Python | mit | igordejanovic/parglare,igordejanovic/parglare | import pytest # noqa
import os
import sys
import glob
import imp
def test_examples():
examples_pat = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'../../examples/*/*.py')
# Filter out __init__.py
examples = [f for f in glob.glob(examples_pat)
... | import pytest # noqa
import os
import sys
import glob
import importlib
def test_examples():
examples_pat = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'../../examples/*/*.py')
# Filter out __init__.py
examples = [f for f in glob.glob(examples_pat)
... | <commit_before>import pytest # noqa
import os
import sys
import glob
import imp
def test_examples():
examples_pat = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'../../examples/*/*.py')
# Filter out __init__.py
examples = [f for f in glob.glob(examples_pat)
... | import pytest # noqa
import os
import sys
import glob
import importlib
def test_examples():
examples_pat = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'../../examples/*/*.py')
# Filter out __init__.py
examples = [f for f in glob.glob(examples_pat)
... | import pytest # noqa
import os
import sys
import glob
import imp
def test_examples():
examples_pat = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'../../examples/*/*.py')
# Filter out __init__.py
examples = [f for f in glob.glob(examples_pat)
... | <commit_before>import pytest # noqa
import os
import sys
import glob
import imp
def test_examples():
examples_pat = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'../../examples/*/*.py')
# Filter out __init__.py
examples = [f for f in glob.glob(examples_pat)
... |
fe98a627943c235ba24fc6de781deec69e7fd02e | relayer/__init__.py | relayer/__init__.py | from kafka import KafkaProducer
from .event_emitter import EventEmitter
from .exceptions import ConfigurationError
__version__ = '0.1.3'
class Relayer(object):
def __init__(self, logging_topic, context_handler_class, kafka_hosts=None, topic_prefix='', topic_suffix='', source=''):
self.logging_topic = l... | from kafka import KafkaProducer
from .event_emitter import EventEmitter
from .exceptions import ConfigurationError
__version__ = '0.1.3'
class Relayer(object):
def __init__(self, logging_topic, context_handler_class, kafka_hosts=None, topic_prefix='', topic_suffix='', source=''):
self.logging_topic = l... | Save event emitter y producer reference in relayer instance | Save event emitter y producer reference in relayer instance
| Python | mit | wizeline/relayer | from kafka import KafkaProducer
from .event_emitter import EventEmitter
from .exceptions import ConfigurationError
__version__ = '0.1.3'
class Relayer(object):
def __init__(self, logging_topic, context_handler_class, kafka_hosts=None, topic_prefix='', topic_suffix='', source=''):
self.logging_topic = l... | from kafka import KafkaProducer
from .event_emitter import EventEmitter
from .exceptions import ConfigurationError
__version__ = '0.1.3'
class Relayer(object):
def __init__(self, logging_topic, context_handler_class, kafka_hosts=None, topic_prefix='', topic_suffix='', source=''):
self.logging_topic = l... | <commit_before>from kafka import KafkaProducer
from .event_emitter import EventEmitter
from .exceptions import ConfigurationError
__version__ = '0.1.3'
class Relayer(object):
def __init__(self, logging_topic, context_handler_class, kafka_hosts=None, topic_prefix='', topic_suffix='', source=''):
self.lo... | from kafka import KafkaProducer
from .event_emitter import EventEmitter
from .exceptions import ConfigurationError
__version__ = '0.1.3'
class Relayer(object):
def __init__(self, logging_topic, context_handler_class, kafka_hosts=None, topic_prefix='', topic_suffix='', source=''):
self.logging_topic = l... | from kafka import KafkaProducer
from .event_emitter import EventEmitter
from .exceptions import ConfigurationError
__version__ = '0.1.3'
class Relayer(object):
def __init__(self, logging_topic, context_handler_class, kafka_hosts=None, topic_prefix='', topic_suffix='', source=''):
self.logging_topic = l... | <commit_before>from kafka import KafkaProducer
from .event_emitter import EventEmitter
from .exceptions import ConfigurationError
__version__ = '0.1.3'
class Relayer(object):
def __init__(self, logging_topic, context_handler_class, kafka_hosts=None, topic_prefix='', topic_suffix='', source=''):
self.lo... |
64ac175029393c75a6b308bb36287081ab1bde8f | alignak_backend_import/__init__.py | alignak_backend_import/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak backend import"
__short_version__ = '... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak backend import"
__short_version_... | Fix bad indentation that broke PEP8 ! | Fix bad indentation that broke PEP8 !
| Python | agpl-3.0 | Alignak-monitoring-contrib/alignak-backend-import,Alignak-monitoring-contrib/alignak-backend-import | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak backend import"
__short_version__ = '... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak backend import"
__short_version_... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak backend import"
__shor... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak backend import"
__short_version_... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak backend import"
__short_version__ = '... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 4, 3)
__application__ = u"Alignak backend import"
__shor... |
da447a06c65a421b8d2fe122cb7b6bee5d11614e | app.py | app.py | import sys
from upload_s3 import set_metadata
from flask import Flask, render_template
from flask_frozen import Freezer
app = Flask(__name__)
freezer = Freezer(app)
app.config['FREEZER_DEFAULT_MIMETYPE'] = 'text/html'
app.config['FREEZER_IGNORE_MIMETYPE_WARNINGS'] = True
app.config['FREEZER_BASE_URL'] = 'http://www.... | import sys
from upload_s3 import set_metadata
from flask import Flask, render_template
from flask_frozen import Freezer
app = Flask(__name__)
freezer = Freezer(app)
app.config['FREEZER_DEFAULT_MIMETYPE'] = 'text/html'
app.config['FREEZER_IGNORE_MIMETYPE_WARNINGS'] = True
# If project doesn't have it's own domain/su... | Comment out optional base url configuration | Comment out optional base url configuration
| Python | apache-2.0 | vprnet/interactive-transcript-gov-peter-shumlins-2015-budget-speech,vprnet/google-s3-json,vprnet/app-template,vprnet/EOTS-iframe-widget,vprnet/soundcloud-podcast,vprnet/interactive-transcript-gov-peter-shumlins-2015-budget-speech,vprnet/timeline-dcf-systemic-failure,vprnet/live-from-the-fort,vprnet/live-from-the-fort,v... | import sys
from upload_s3 import set_metadata
from flask import Flask, render_template
from flask_frozen import Freezer
app = Flask(__name__)
freezer = Freezer(app)
app.config['FREEZER_DEFAULT_MIMETYPE'] = 'text/html'
app.config['FREEZER_IGNORE_MIMETYPE_WARNINGS'] = True
app.config['FREEZER_BASE_URL'] = 'http://www.... | import sys
from upload_s3 import set_metadata
from flask import Flask, render_template
from flask_frozen import Freezer
app = Flask(__name__)
freezer = Freezer(app)
app.config['FREEZER_DEFAULT_MIMETYPE'] = 'text/html'
app.config['FREEZER_IGNORE_MIMETYPE_WARNINGS'] = True
# If project doesn't have it's own domain/su... | <commit_before>import sys
from upload_s3 import set_metadata
from flask import Flask, render_template
from flask_frozen import Freezer
app = Flask(__name__)
freezer = Freezer(app)
app.config['FREEZER_DEFAULT_MIMETYPE'] = 'text/html'
app.config['FREEZER_IGNORE_MIMETYPE_WARNINGS'] = True
app.config['FREEZER_BASE_URL']... | import sys
from upload_s3 import set_metadata
from flask import Flask, render_template
from flask_frozen import Freezer
app = Flask(__name__)
freezer = Freezer(app)
app.config['FREEZER_DEFAULT_MIMETYPE'] = 'text/html'
app.config['FREEZER_IGNORE_MIMETYPE_WARNINGS'] = True
# If project doesn't have it's own domain/su... | import sys
from upload_s3 import set_metadata
from flask import Flask, render_template
from flask_frozen import Freezer
app = Flask(__name__)
freezer = Freezer(app)
app.config['FREEZER_DEFAULT_MIMETYPE'] = 'text/html'
app.config['FREEZER_IGNORE_MIMETYPE_WARNINGS'] = True
app.config['FREEZER_BASE_URL'] = 'http://www.... | <commit_before>import sys
from upload_s3 import set_metadata
from flask import Flask, render_template
from flask_frozen import Freezer
app = Flask(__name__)
freezer = Freezer(app)
app.config['FREEZER_DEFAULT_MIMETYPE'] = 'text/html'
app.config['FREEZER_IGNORE_MIMETYPE_WARNINGS'] = True
app.config['FREEZER_BASE_URL']... |
07b22d0e4912678e3e2e5507e8a7fe2488ce2b3c | djangocms_installer/config/urls.py | djangocms_installer/config/urls.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.... | Move sitemaps to non-language prefix url | Move sitemaps to non-language prefix url
| Python | bsd-3-clause | nephila/djangocms-installer,nephila/djangocms-installer | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from ... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from ... |
c2a2776f6bbff866078ed2ecaa30f9756af1a5dc | flow_workflow/historian/handler.py | flow_workflow/historian/handler.py | import logging
import sys
from sqlalchemy.exc import ResourceClosedError, TimeoutError, DisconnectionError
from flow_workflow.historian.messages import UpdateMessage
LOG = logging.getLogger(__name__)
class WorkflowHistorianMessageHandler(object):
message_class = UpdateMessage
def __init__(self, broker=None... | import logging
import os
from sqlalchemy.exc import ResourceClosedError, TimeoutError, DisconnectionError
from flow_workflow.historian.messages import UpdateMessage
LOG = logging.getLogger(__name__)
class WorkflowHistorianMessageHandler(object):
message_class = UpdateMessage
def __init__(self, broker=None,... | Use the more betterer os._exit | Use the more betterer os._exit
| Python | agpl-3.0 | genome/flow-workflow,genome/flow-workflow,genome/flow-workflow | import logging
import sys
from sqlalchemy.exc import ResourceClosedError, TimeoutError, DisconnectionError
from flow_workflow.historian.messages import UpdateMessage
LOG = logging.getLogger(__name__)
class WorkflowHistorianMessageHandler(object):
message_class = UpdateMessage
def __init__(self, broker=None... | import logging
import os
from sqlalchemy.exc import ResourceClosedError, TimeoutError, DisconnectionError
from flow_workflow.historian.messages import UpdateMessage
LOG = logging.getLogger(__name__)
class WorkflowHistorianMessageHandler(object):
message_class = UpdateMessage
def __init__(self, broker=None,... | <commit_before>import logging
import sys
from sqlalchemy.exc import ResourceClosedError, TimeoutError, DisconnectionError
from flow_workflow.historian.messages import UpdateMessage
LOG = logging.getLogger(__name__)
class WorkflowHistorianMessageHandler(object):
message_class = UpdateMessage
def __init__(se... | import logging
import os
from sqlalchemy.exc import ResourceClosedError, TimeoutError, DisconnectionError
from flow_workflow.historian.messages import UpdateMessage
LOG = logging.getLogger(__name__)
class WorkflowHistorianMessageHandler(object):
message_class = UpdateMessage
def __init__(self, broker=None,... | import logging
import sys
from sqlalchemy.exc import ResourceClosedError, TimeoutError, DisconnectionError
from flow_workflow.historian.messages import UpdateMessage
LOG = logging.getLogger(__name__)
class WorkflowHistorianMessageHandler(object):
message_class = UpdateMessage
def __init__(self, broker=None... | <commit_before>import logging
import sys
from sqlalchemy.exc import ResourceClosedError, TimeoutError, DisconnectionError
from flow_workflow.historian.messages import UpdateMessage
LOG = logging.getLogger(__name__)
class WorkflowHistorianMessageHandler(object):
message_class = UpdateMessage
def __init__(se... |
b698c7ab1c13353d8e9538bb42797344049812c1 | astro.py | astro.py | import ephem
from datetime import datetime
def const(planet_name): # function name and parameters
planet_class = getattr(ephem, planet_name) # sets ephem object class
date_class = datetime.now()
planet = planet_class() # sets planet variable
south_bend = ephem.Observer... | import ephem
from datetime import datetime
def const(planet_name): # function name and parameters
planet_class = getattr(ephem, planet_name) # sets ephem object class
date_class = datetime.now()
planet = planet_class() # sets planet variable
south_bend = ephem.Observer... | Add to line 15 for testing. | Add to line 15 for testing.
| Python | mit | bennettscience/PySky | import ephem
from datetime import datetime
def const(planet_name): # function name and parameters
planet_class = getattr(ephem, planet_name) # sets ephem object class
date_class = datetime.now()
planet = planet_class() # sets planet variable
south_bend = ephem.Observer... | import ephem
from datetime import datetime
def const(planet_name): # function name and parameters
planet_class = getattr(ephem, planet_name) # sets ephem object class
date_class = datetime.now()
planet = planet_class() # sets planet variable
south_bend = ephem.Observer... | <commit_before>import ephem
from datetime import datetime
def const(planet_name): # function name and parameters
planet_class = getattr(ephem, planet_name) # sets ephem object class
date_class = datetime.now()
planet = planet_class() # sets planet variable
south_bend =... | import ephem
from datetime import datetime
def const(planet_name): # function name and parameters
planet_class = getattr(ephem, planet_name) # sets ephem object class
date_class = datetime.now()
planet = planet_class() # sets planet variable
south_bend = ephem.Observer... | import ephem
from datetime import datetime
def const(planet_name): # function name and parameters
planet_class = getattr(ephem, planet_name) # sets ephem object class
date_class = datetime.now()
planet = planet_class() # sets planet variable
south_bend = ephem.Observer... | <commit_before>import ephem
from datetime import datetime
def const(planet_name): # function name and parameters
planet_class = getattr(ephem, planet_name) # sets ephem object class
date_class = datetime.now()
planet = planet_class() # sets planet variable
south_bend =... |
7816fc20c2e46a9d1a1e7c11a061862163018069 | tests/test_vfg_path.py | tests/test_vfg_path.py | import angr
import logging
import os
l = logging.getLogger("angr_tests")
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
def test_vfg_paths():
p = angr.Project(os.path.join(test_location, "x86_64/track_user_input"))
main_a... | import angr
import logging
import os
l = logging.getLogger("angr_tests")
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
def test_vfg_paths():
p = angr.Project(os.path.join(test_location, "x86_64/track_user_input"))
main_a... | Fix the VFG path test. | Fix the VFG path test.
| Python | bsd-2-clause | tyb0807/angr,schieb/angr,schieb/angr,tyb0807/angr,chubbymaggie/angr,schieb/angr,chubbymaggie/angr,f-prettyland/angr,chubbymaggie/angr,angr/angr,angr/angr,axt/angr,axt/angr,axt/angr,f-prettyland/angr,angr/angr,tyb0807/angr,f-prettyland/angr,iamahuman/angr,iamahuman/angr,iamahuman/angr | import angr
import logging
import os
l = logging.getLogger("angr_tests")
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
def test_vfg_paths():
p = angr.Project(os.path.join(test_location, "x86_64/track_user_input"))
main_a... | import angr
import logging
import os
l = logging.getLogger("angr_tests")
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
def test_vfg_paths():
p = angr.Project(os.path.join(test_location, "x86_64/track_user_input"))
main_a... | <commit_before>import angr
import logging
import os
l = logging.getLogger("angr_tests")
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
def test_vfg_paths():
p = angr.Project(os.path.join(test_location, "x86_64/track_user_inpu... | import angr
import logging
import os
l = logging.getLogger("angr_tests")
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
def test_vfg_paths():
p = angr.Project(os.path.join(test_location, "x86_64/track_user_input"))
main_a... | import angr
import logging
import os
l = logging.getLogger("angr_tests")
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
def test_vfg_paths():
p = angr.Project(os.path.join(test_location, "x86_64/track_user_input"))
main_a... | <commit_before>import angr
import logging
import os
l = logging.getLogger("angr_tests")
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
def test_vfg_paths():
p = angr.Project(os.path.join(test_location, "x86_64/track_user_inpu... |
d0018748cae3f0af4818106643926f7e8effe3c6 | monasca_log_api_tempest/clients.py | monasca_log_api_tempest/clients.py | # Copyright 2015 FUJITSU LIMITED
#
# 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 writ... | # Copyright 2015-2016 FUJITSU LIMITED
#
# 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... | Fix the Monasca Log API tempest tests | Fix the Monasca Log API tempest tests
The Tempest Manager class must have changed and the service
argument apparently no longer exists. Instead, it was being set
as the scope which caused the catalog to not be retrieved
See-also: If934bac4e2cd833fe4e381c373218383354969ec
Change-Id: I43c023e91eb93e2c19096b0de812eabf7b... | Python | apache-2.0 | openstack/monasca-log-api,stackforge/monasca-log-api,stackforge/monasca-log-api,stackforge/monasca-log-api,openstack/monasca-log-api,openstack/monasca-log-api | # Copyright 2015 FUJITSU LIMITED
#
# 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 writ... | # Copyright 2015-2016 FUJITSU LIMITED
#
# 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... | <commit_before># Copyright 2015 FUJITSU LIMITED
#
# 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 ag... | # Copyright 2015-2016 FUJITSU LIMITED
#
# 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... | # Copyright 2015 FUJITSU LIMITED
#
# 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 writ... | <commit_before># Copyright 2015 FUJITSU LIMITED
#
# 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 ag... |
66fe6f98c079490d2d5de4c161da1d8b3801cda4 | monasca_persister/conf/influxdb.py | monasca_persister/conf/influxdb.py | # (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# Copyright 2017 FUJITSU LIMITED
#
# 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... | # (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# Copyright 2017 FUJITSU LIMITED
#
# 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... | Allow hostnames to be used as ip_address | Allow hostnames to be used as ip_address
Previously introduced change for monasca-persister
had enforced the IPAddress as the only type one can
configure influxdb.ip_address property with.
Following change makes it possible to use also hostname.
Using IPAdress is still possible.
Change-Id: Ib0d7f19b3ac2dcb7c84923872... | Python | apache-2.0 | stackforge/monasca-persister,openstack/monasca-persister,stackforge/monasca-persister,stackforge/monasca-persister,openstack/monasca-persister,openstack/monasca-persister | # (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# Copyright 2017 FUJITSU LIMITED
#
# 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... | # (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# Copyright 2017 FUJITSU LIMITED
#
# 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... | <commit_before># (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# Copyright 2017 FUJITSU LIMITED
#
# 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/l... | # (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# Copyright 2017 FUJITSU LIMITED
#
# 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... | # (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# Copyright 2017 FUJITSU LIMITED
#
# 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... | <commit_before># (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
# Copyright 2017 FUJITSU LIMITED
#
# 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/l... |
3ecca9dfa3f79a4c42a386e0bfe27cdca7e46a69 | tests/21-ct-clean-up-nc.py | tests/21-ct-clean-up-nc.py | import socket, sys
if len(sys.argv) != 6:
print('Wrong number of arguments. Usage: ./21-ct-clean-up-nc.py <localport> <timeout> <remote-address> <remote-port> <HTTP path>')
localport = int(sys.argv[1])
timeout = int(sys.argv[2])
serverAddr = sys.argv[3]
serverPort = int(sys.argv[4])
httpPath = sys.argv[5]
if ":" n... | import socket, sys
if len(sys.argv) != 6:
print('Wrong number of arguments. Usage: ./21-ct-clean-up-nc.py <localport> <timeout> <remote-address> <remote-port> <HTTP path>')
localport = int(sys.argv[1])
timeout = int(sys.argv[2])
serverAddr = sys.argv[3]
serverPort = int(sys.argv[4])
httpPath = sys.argv[5]
if ":" n... | Use HTTP 1.1 instead of HTTP 1.0 | tests: Use HTTP 1.1 instead of HTTP 1.0
Envoy does not support HTTP 1.0, so use HTTP 1.1 instead.
Signed-off-by: Jarno Rajahalme <0f1ab0ac7dffd9db21aa539af2fd4bb04abc3ad4@covalent.io>
| Python | apache-2.0 | cilium/cilium,cilium/cilium,tgraf/cilium,michi-covalent/cilium,cilium-team/cilium,eloycoto/cilium,tgraf/cilium,eloycoto/cilium,cilium/cilium,eloycoto/cilium,scanf/cilium,cilium-team/cilium,scanf/cilium,tklauser/cilium,scanf/cilium,cilium/cilium,scanf/cilium,cilium/cilium,tgraf/cilium,tgraf/cilium,tklauser/cilium,eloyco... | import socket, sys
if len(sys.argv) != 6:
print('Wrong number of arguments. Usage: ./21-ct-clean-up-nc.py <localport> <timeout> <remote-address> <remote-port> <HTTP path>')
localport = int(sys.argv[1])
timeout = int(sys.argv[2])
serverAddr = sys.argv[3]
serverPort = int(sys.argv[4])
httpPath = sys.argv[5]
if ":" n... | import socket, sys
if len(sys.argv) != 6:
print('Wrong number of arguments. Usage: ./21-ct-clean-up-nc.py <localport> <timeout> <remote-address> <remote-port> <HTTP path>')
localport = int(sys.argv[1])
timeout = int(sys.argv[2])
serverAddr = sys.argv[3]
serverPort = int(sys.argv[4])
httpPath = sys.argv[5]
if ":" n... | <commit_before>import socket, sys
if len(sys.argv) != 6:
print('Wrong number of arguments. Usage: ./21-ct-clean-up-nc.py <localport> <timeout> <remote-address> <remote-port> <HTTP path>')
localport = int(sys.argv[1])
timeout = int(sys.argv[2])
serverAddr = sys.argv[3]
serverPort = int(sys.argv[4])
httpPath = sys.ar... | import socket, sys
if len(sys.argv) != 6:
print('Wrong number of arguments. Usage: ./21-ct-clean-up-nc.py <localport> <timeout> <remote-address> <remote-port> <HTTP path>')
localport = int(sys.argv[1])
timeout = int(sys.argv[2])
serverAddr = sys.argv[3]
serverPort = int(sys.argv[4])
httpPath = sys.argv[5]
if ":" n... | import socket, sys
if len(sys.argv) != 6:
print('Wrong number of arguments. Usage: ./21-ct-clean-up-nc.py <localport> <timeout> <remote-address> <remote-port> <HTTP path>')
localport = int(sys.argv[1])
timeout = int(sys.argv[2])
serverAddr = sys.argv[3]
serverPort = int(sys.argv[4])
httpPath = sys.argv[5]
if ":" n... | <commit_before>import socket, sys
if len(sys.argv) != 6:
print('Wrong number of arguments. Usage: ./21-ct-clean-up-nc.py <localport> <timeout> <remote-address> <remote-port> <HTTP path>')
localport = int(sys.argv[1])
timeout = int(sys.argv[2])
serverAddr = sys.argv[3]
serverPort = int(sys.argv[4])
httpPath = sys.ar... |
5dd5d4e6ac93ad3867f98bd35412de11dd6b1dc2 | tests/test_generalwords.py | tests/test_generalwords.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_generalwords
----------------------------------
All the tests for the generalword module. Simple module, simple tests.
"""
import unittest
from generalwords import get_word
class TestGeneralwords(unittest.TestCase):
def setUp(self):
pass
def ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_generalwords
----------------------------------
All the tests for the generalword module. Simple module, simple tests.
"""
import unittest
from generalwords import get_word
class TestGeneralwords(unittest.TestCase):
def setUp(self):
pass
def ... | Remove set-comprehensions so that tests will pass on 2.6 | Remove set-comprehensions so that tests will pass on 2.6
| Python | bsd-3-clause | petrilli/generalwords | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_generalwords
----------------------------------
All the tests for the generalword module. Simple module, simple tests.
"""
import unittest
from generalwords import get_word
class TestGeneralwords(unittest.TestCase):
def setUp(self):
pass
def ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_generalwords
----------------------------------
All the tests for the generalword module. Simple module, simple tests.
"""
import unittest
from generalwords import get_word
class TestGeneralwords(unittest.TestCase):
def setUp(self):
pass
def ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_generalwords
----------------------------------
All the tests for the generalword module. Simple module, simple tests.
"""
import unittest
from generalwords import get_word
class TestGeneralwords(unittest.TestCase):
def setUp(self):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_generalwords
----------------------------------
All the tests for the generalword module. Simple module, simple tests.
"""
import unittest
from generalwords import get_word
class TestGeneralwords(unittest.TestCase):
def setUp(self):
pass
def ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_generalwords
----------------------------------
All the tests for the generalword module. Simple module, simple tests.
"""
import unittest
from generalwords import get_word
class TestGeneralwords(unittest.TestCase):
def setUp(self):
pass
def ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_generalwords
----------------------------------
All the tests for the generalword module. Simple module, simple tests.
"""
import unittest
from generalwords import get_word
class TestGeneralwords(unittest.TestCase):
def setUp(self):
... |
fd5634902f079c000c870192bb28fa4c35b956ec | snippets/urls.py | snippets/urls.py | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from funfactory.monkeypatches import patch
# Apply funfactory monkeypatches.
patch()
# Uncomment the next two lines to enable ... | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from django.views.static import serve as static_serve
from funfactory.monkeypatches import patch
# Apply funfactory monkeypatch... | Add CORS headers to dev server media. | Add CORS headers to dev server media. | Python | mpl-2.0 | mozilla/snippets-service,glogiotatidis/snippets-service,glogiotatidis/snippets-service,mozmar/snippets-service,schalkneethling/snippets-service,Osmose/snippets-service,bensternthal/snippets-service,bensternthal/snippets-service,Osmose/snippets-service,akatsoulas/snippets-service,schalkneethling/snippets-service,glogiot... | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from funfactory.monkeypatches import patch
# Apply funfactory monkeypatches.
patch()
# Uncomment the next two lines to enable ... | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from django.views.static import serve as static_serve
from funfactory.monkeypatches import patch
# Apply funfactory monkeypatch... | <commit_before>from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from funfactory.monkeypatches import patch
# Apply funfactory monkeypatches.
patch()
# Uncomment the next two l... | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from django.views.static import serve as static_serve
from funfactory.monkeypatches import patch
# Apply funfactory monkeypatch... | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from funfactory.monkeypatches import patch
# Apply funfactory monkeypatches.
patch()
# Uncomment the next two lines to enable ... | <commit_before>from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from funfactory.monkeypatches import patch
# Apply funfactory monkeypatches.
patch()
# Uncomment the next two l... |
8d0d4704f62b223128bab193cd5f5cda8e978c19 | polling_stations/apps/pollingstations/tests/test_urls.py | polling_stations/apps/pollingstations/tests/test_urls.py | import json
from django.test import TestCase
from django_extensions.management.commands.show_urls import Command
class UrlTests(TestCase):
def is_exception(self, url):
exceptions = [".txt", ".ics", ".geojson"]
for exception in exceptions:
if exception in url:
return Tru... | import json
from django.test import TestCase
from django_extensions.management.commands.show_urls import Command
class UrlTests(TestCase):
def is_exception(self, url):
exceptions = [".txt", ".ics", ".geojson"]
for exception in exceptions:
if exception in url:
return Tru... | Refactor test for new view added with upgrade | Refactor test for new view added with upgrade
| Python | bsd-3-clause | DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations | import json
from django.test import TestCase
from django_extensions.management.commands.show_urls import Command
class UrlTests(TestCase):
def is_exception(self, url):
exceptions = [".txt", ".ics", ".geojson"]
for exception in exceptions:
if exception in url:
return Tru... | import json
from django.test import TestCase
from django_extensions.management.commands.show_urls import Command
class UrlTests(TestCase):
def is_exception(self, url):
exceptions = [".txt", ".ics", ".geojson"]
for exception in exceptions:
if exception in url:
return Tru... | <commit_before>import json
from django.test import TestCase
from django_extensions.management.commands.show_urls import Command
class UrlTests(TestCase):
def is_exception(self, url):
exceptions = [".txt", ".ics", ".geojson"]
for exception in exceptions:
if exception in url:
... | import json
from django.test import TestCase
from django_extensions.management.commands.show_urls import Command
class UrlTests(TestCase):
def is_exception(self, url):
exceptions = [".txt", ".ics", ".geojson"]
for exception in exceptions:
if exception in url:
return Tru... | import json
from django.test import TestCase
from django_extensions.management.commands.show_urls import Command
class UrlTests(TestCase):
def is_exception(self, url):
exceptions = [".txt", ".ics", ".geojson"]
for exception in exceptions:
if exception in url:
return Tru... | <commit_before>import json
from django.test import TestCase
from django_extensions.management.commands.show_urls import Command
class UrlTests(TestCase):
def is_exception(self, url):
exceptions = [".txt", ".ics", ".geojson"]
for exception in exceptions:
if exception in url:
... |
fb675239ae79adcdc5f050bcf8403effb067a59b | smsgateway/utils.py | smsgateway/utils.py | import logging
logger = logging.getLogger(__name__)
def strspn(source, allowed):
newchrs = []
for c in source:
if c in allowed:
newchrs.append(c)
return u''.join(newchrs)
def check_cell_phone_number(number):
cleaned_number = strspn(number, u'+0123456789')
if not u'+' in cleane... | import logging
logger = logging.getLogger(__name__)
def strspn(source, allowed):
newchrs = []
for c in source:
if c in allowed:
newchrs.append(c)
return u''.join(newchrs)
def check_cell_phone_number(number):
cleaned_number = strspn(number, u'+0123456789')
if not u'+' in cleane... | Remove warning for long messages | Remove warning for long messages
| Python | bsd-3-clause | mvpoland/django-smsgateway,peterayeni/django-smsgateway,peterayeni/django-smsgateway,peterayeni/django-smsgateway,mvpoland/django-smsgateway,peterayeni/django-smsgateway,mvpoland/django-smsgateway | import logging
logger = logging.getLogger(__name__)
def strspn(source, allowed):
newchrs = []
for c in source:
if c in allowed:
newchrs.append(c)
return u''.join(newchrs)
def check_cell_phone_number(number):
cleaned_number = strspn(number, u'+0123456789')
if not u'+' in cleane... | import logging
logger = logging.getLogger(__name__)
def strspn(source, allowed):
newchrs = []
for c in source:
if c in allowed:
newchrs.append(c)
return u''.join(newchrs)
def check_cell_phone_number(number):
cleaned_number = strspn(number, u'+0123456789')
if not u'+' in cleane... | <commit_before>import logging
logger = logging.getLogger(__name__)
def strspn(source, allowed):
newchrs = []
for c in source:
if c in allowed:
newchrs.append(c)
return u''.join(newchrs)
def check_cell_phone_number(number):
cleaned_number = strspn(number, u'+0123456789')
if not... | import logging
logger = logging.getLogger(__name__)
def strspn(source, allowed):
newchrs = []
for c in source:
if c in allowed:
newchrs.append(c)
return u''.join(newchrs)
def check_cell_phone_number(number):
cleaned_number = strspn(number, u'+0123456789')
if not u'+' in cleane... | import logging
logger = logging.getLogger(__name__)
def strspn(source, allowed):
newchrs = []
for c in source:
if c in allowed:
newchrs.append(c)
return u''.join(newchrs)
def check_cell_phone_number(number):
cleaned_number = strspn(number, u'+0123456789')
if not u'+' in cleane... | <commit_before>import logging
logger = logging.getLogger(__name__)
def strspn(source, allowed):
newchrs = []
for c in source:
if c in allowed:
newchrs.append(c)
return u''.join(newchrs)
def check_cell_phone_number(number):
cleaned_number = strspn(number, u'+0123456789')
if not... |
e2831c6241e18d6f611eaaf51854b75b970867d7 | examples/demo.py | examples/demo.py | #-------------------------------------------------------------------------------
#
# Copyright (c) 2009, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the con... | #-------------------------------------------------------------------------------
#
# Copyright (c) 2009, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the con... | Use config files to construct the tree of examples. | Use config files to construct the tree of examples.
| Python | bsd-3-clause | ContinuumIO/chaco,ContinuumIO/chaco,tommy-u/chaco,ContinuumIO/chaco,burnpanck/chaco,tommy-u/chaco,tommy-u/chaco,burnpanck/chaco,burnpanck/chaco,ContinuumIO/chaco | #-------------------------------------------------------------------------------
#
# Copyright (c) 2009, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the con... | #-------------------------------------------------------------------------------
#
# Copyright (c) 2009, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the con... | <commit_before>#-------------------------------------------------------------------------------
#
# Copyright (c) 2009, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
#... | #-------------------------------------------------------------------------------
#
# Copyright (c) 2009, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the con... | #-------------------------------------------------------------------------------
#
# Copyright (c) 2009, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the con... | <commit_before>#-------------------------------------------------------------------------------
#
# Copyright (c) 2009, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
#... |
f9c9cd4505e9055a2905a87f91cdaab399352b27 | dthm4kaiako/config/__init__.py | dthm4kaiako/config/__init__.py | """Configuration for Django system."""
__version__ = "0.15.2"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| """Configuration for Django system."""
__version__ = "0.16.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| Increment version number to 0.16.0 | Increment version number to 0.16.0
| Python | mit | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | """Configuration for Django system."""
__version__ = "0.15.2"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
Increment version number to 0.16.0 | """Configuration for Django system."""
__version__ = "0.16.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| <commit_before>"""Configuration for Django system."""
__version__ = "0.15.2"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
<commit_msg>Increment version number to 0.16.0<commit_after> | """Configuration for Django system."""
__version__ = "0.16.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
| """Configuration for Django system."""
__version__ = "0.15.2"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
Increment version number to 0.16.0"""Configuration for Django system."""
__version__ = "0.16.0"
__version_info... | <commit_before>"""Configuration for Django system."""
__version__ = "0.15.2"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
for num in __version__.replace("-", ".", 1).split(".")
]
)
<commit_msg>Increment version number to 0.16.0<commit_after>"""Configuration for Django system."... |
e93ec5939d5a47e20501b4812e02a6cdac4a3ba6 | rplugin/python3/deoplete/sources/LanguageClientSource.py | rplugin/python3/deoplete/sources/LanguageClientSource.py | from .base import Base
import re
CompleteOutputs = "g:LanguageClient_omniCompleteResults"
class Source(Base):
def __init__(self, vim):
super().__init__(vim)
self.name = "LanguageClient"
self.mark = "[LC]"
self.rank = 1000
self.min_pattern_length = 1
self.filetype... | from .base import Base
import re
CompleteOutputs = "g:LanguageClient_omniCompleteResults"
class Source(Base):
def __init__(self, vim):
super().__init__(vim)
self.name = "LanguageClient"
self.mark = "[LC]"
self.rank = 1000
self.min_pattern_length = 0
self.filetype... | Fix deoplete source compete position sent to language servers. | Fix deoplete source compete position sent to language servers.
| Python | mit | autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/L... | from .base import Base
import re
CompleteOutputs = "g:LanguageClient_omniCompleteResults"
class Source(Base):
def __init__(self, vim):
super().__init__(vim)
self.name = "LanguageClient"
self.mark = "[LC]"
self.rank = 1000
self.min_pattern_length = 1
self.filetype... | from .base import Base
import re
CompleteOutputs = "g:LanguageClient_omniCompleteResults"
class Source(Base):
def __init__(self, vim):
super().__init__(vim)
self.name = "LanguageClient"
self.mark = "[LC]"
self.rank = 1000
self.min_pattern_length = 0
self.filetype... | <commit_before>from .base import Base
import re
CompleteOutputs = "g:LanguageClient_omniCompleteResults"
class Source(Base):
def __init__(self, vim):
super().__init__(vim)
self.name = "LanguageClient"
self.mark = "[LC]"
self.rank = 1000
self.min_pattern_length = 1
... | from .base import Base
import re
CompleteOutputs = "g:LanguageClient_omniCompleteResults"
class Source(Base):
def __init__(self, vim):
super().__init__(vim)
self.name = "LanguageClient"
self.mark = "[LC]"
self.rank = 1000
self.min_pattern_length = 0
self.filetype... | from .base import Base
import re
CompleteOutputs = "g:LanguageClient_omniCompleteResults"
class Source(Base):
def __init__(self, vim):
super().__init__(vim)
self.name = "LanguageClient"
self.mark = "[LC]"
self.rank = 1000
self.min_pattern_length = 1
self.filetype... | <commit_before>from .base import Base
import re
CompleteOutputs = "g:LanguageClient_omniCompleteResults"
class Source(Base):
def __init__(self, vim):
super().__init__(vim)
self.name = "LanguageClient"
self.mark = "[LC]"
self.rank = 1000
self.min_pattern_length = 1
... |
e25f085025f881ccf0a0da2e620b09787819507a | sub.py | sub.py | import csv
import sys
import threading
from time import sleep
from datetime import datetime
import msgpack
import zmq
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.setsockopt(zmq.SUBSCRIBE, b'')
socket.bind("tcp://*:4200")
terminate = threading.Event()
def go():
global terminate
writer = ... | import csv
import sys
import threading
from time import sleep
from datetime import datetime
import msgpack
import zmq
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.setsockopt(zmq.SUBSCRIBE, b'')
socket.bind("tcp://*:4200")
terminate = threading.Event()
def go():
global terminate
writer = ... | Move date/time to the first csv column. | Move date/time to the first csv column.
| Python | isc | jaj42/hsmedstream,jaj42/phystream | import csv
import sys
import threading
from time import sleep
from datetime import datetime
import msgpack
import zmq
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.setsockopt(zmq.SUBSCRIBE, b'')
socket.bind("tcp://*:4200")
terminate = threading.Event()
def go():
global terminate
writer = ... | import csv
import sys
import threading
from time import sleep
from datetime import datetime
import msgpack
import zmq
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.setsockopt(zmq.SUBSCRIBE, b'')
socket.bind("tcp://*:4200")
terminate = threading.Event()
def go():
global terminate
writer = ... | <commit_before>import csv
import sys
import threading
from time import sleep
from datetime import datetime
import msgpack
import zmq
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.setsockopt(zmq.SUBSCRIBE, b'')
socket.bind("tcp://*:4200")
terminate = threading.Event()
def go():
global terminat... | import csv
import sys
import threading
from time import sleep
from datetime import datetime
import msgpack
import zmq
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.setsockopt(zmq.SUBSCRIBE, b'')
socket.bind("tcp://*:4200")
terminate = threading.Event()
def go():
global terminate
writer = ... | import csv
import sys
import threading
from time import sleep
from datetime import datetime
import msgpack
import zmq
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.setsockopt(zmq.SUBSCRIBE, b'')
socket.bind("tcp://*:4200")
terminate = threading.Event()
def go():
global terminate
writer = ... | <commit_before>import csv
import sys
import threading
from time import sleep
from datetime import datetime
import msgpack
import zmq
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.setsockopt(zmq.SUBSCRIBE, b'')
socket.bind("tcp://*:4200")
terminate = threading.Event()
def go():
global terminat... |
866026a5d2f89a8ac76a726720e4fbe812c94eb4 | ds/providers/shell.py | ds/providers/shell.py | from __future__ import absolute_import, unicode_literals
__all__ = ['ShellProvider']
from .base import Provider
class ShellProvider(Provider):
def get_options(self):
return {
'command': {'required': True},
}
def execute(self, workspace, task):
command = task.provider_con... | from __future__ import absolute_import, unicode_literals
__all__ = ['ShellProvider']
from .base import Provider
class ShellProvider(Provider):
def get_options(self):
return {
'command': {'required': True},
}
def execute(self, workspace, task):
command = task.provider_con... | Fix arg passing to command | Fix arg passing to command
| Python | apache-2.0 | rshk/freight,klynton/freight,jkimbo/freight,getsentry/freight,getsentry/freight,klynton/freight,getsentry/freight,klynton/freight,rshk/freight,klynton/freight,jkimbo/freight,getsentry/freight,rshk/freight,jkimbo/freight,jkimbo/freight,rshk/freight,getsentry/freight | from __future__ import absolute_import, unicode_literals
__all__ = ['ShellProvider']
from .base import Provider
class ShellProvider(Provider):
def get_options(self):
return {
'command': {'required': True},
}
def execute(self, workspace, task):
command = task.provider_con... | from __future__ import absolute_import, unicode_literals
__all__ = ['ShellProvider']
from .base import Provider
class ShellProvider(Provider):
def get_options(self):
return {
'command': {'required': True},
}
def execute(self, workspace, task):
command = task.provider_con... | <commit_before>from __future__ import absolute_import, unicode_literals
__all__ = ['ShellProvider']
from .base import Provider
class ShellProvider(Provider):
def get_options(self):
return {
'command': {'required': True},
}
def execute(self, workspace, task):
command = ta... | from __future__ import absolute_import, unicode_literals
__all__ = ['ShellProvider']
from .base import Provider
class ShellProvider(Provider):
def get_options(self):
return {
'command': {'required': True},
}
def execute(self, workspace, task):
command = task.provider_con... | from __future__ import absolute_import, unicode_literals
__all__ = ['ShellProvider']
from .base import Provider
class ShellProvider(Provider):
def get_options(self):
return {
'command': {'required': True},
}
def execute(self, workspace, task):
command = task.provider_con... | <commit_before>from __future__ import absolute_import, unicode_literals
__all__ = ['ShellProvider']
from .base import Provider
class ShellProvider(Provider):
def get_options(self):
return {
'command': {'required': True},
}
def execute(self, workspace, task):
command = ta... |
b05d2666c834a9c4d151d0340612010851bd4610 | eniric/Qcalculator.py | eniric/Qcalculator.py | """
Created on Mon Dec 29 00:14:56 2014
@author: pfigueira
Editied Thur Dec 15 13:00 2016 by Jason Neal for eniric.
"""
# from eniric.IOmodule import read_2col
import numpy as np
import pandas as pd
c = 299792458 # m/s
def RVprec_calc(spectrum_file="resampled/Spectrum_M0-PHOENIX-ACES_Hband_vsini1.0_R60k_res3.txt... | """
Created on Mon Dec 29 00:14:56 2014
@author: pfigueira
Editied Thur Dec 15 13:00 2016 by Jason Neal for eniric.
"""
# from eniric.IOmodule import read_2col
import numpy as np
import pandas as pd
c = 299792458 # m/s
def RVprec_calc(spectrum_file="resampled/Spectrum_M0-PHOENIX-ACES_Hband_vsini1.0_R60k_res3.txt... | Update RVprec_calculation use numpy.diff() and remove unnecessary array calls. | Update RVprec_calculation
use numpy.diff() and remove unnecessary array calls.
Former-commit-id: 646ff0cea061feb87c08b819a47d8e9f3dd55b55 | Python | mit | jason-neal/eniric,jason-neal/eniric | """
Created on Mon Dec 29 00:14:56 2014
@author: pfigueira
Editied Thur Dec 15 13:00 2016 by Jason Neal for eniric.
"""
# from eniric.IOmodule import read_2col
import numpy as np
import pandas as pd
c = 299792458 # m/s
def RVprec_calc(spectrum_file="resampled/Spectrum_M0-PHOENIX-ACES_Hband_vsini1.0_R60k_res3.txt... | """
Created on Mon Dec 29 00:14:56 2014
@author: pfigueira
Editied Thur Dec 15 13:00 2016 by Jason Neal for eniric.
"""
# from eniric.IOmodule import read_2col
import numpy as np
import pandas as pd
c = 299792458 # m/s
def RVprec_calc(spectrum_file="resampled/Spectrum_M0-PHOENIX-ACES_Hband_vsini1.0_R60k_res3.txt... | <commit_before>"""
Created on Mon Dec 29 00:14:56 2014
@author: pfigueira
Editied Thur Dec 15 13:00 2016 by Jason Neal for eniric.
"""
# from eniric.IOmodule import read_2col
import numpy as np
import pandas as pd
c = 299792458 # m/s
def RVprec_calc(spectrum_file="resampled/Spectrum_M0-PHOENIX-ACES_Hband_vsini1.... | """
Created on Mon Dec 29 00:14:56 2014
@author: pfigueira
Editied Thur Dec 15 13:00 2016 by Jason Neal for eniric.
"""
# from eniric.IOmodule import read_2col
import numpy as np
import pandas as pd
c = 299792458 # m/s
def RVprec_calc(spectrum_file="resampled/Spectrum_M0-PHOENIX-ACES_Hband_vsini1.0_R60k_res3.txt... | """
Created on Mon Dec 29 00:14:56 2014
@author: pfigueira
Editied Thur Dec 15 13:00 2016 by Jason Neal for eniric.
"""
# from eniric.IOmodule import read_2col
import numpy as np
import pandas as pd
c = 299792458 # m/s
def RVprec_calc(spectrum_file="resampled/Spectrum_M0-PHOENIX-ACES_Hband_vsini1.0_R60k_res3.txt... | <commit_before>"""
Created on Mon Dec 29 00:14:56 2014
@author: pfigueira
Editied Thur Dec 15 13:00 2016 by Jason Neal for eniric.
"""
# from eniric.IOmodule import read_2col
import numpy as np
import pandas as pd
c = 299792458 # m/s
def RVprec_calc(spectrum_file="resampled/Spectrum_M0-PHOENIX-ACES_Hband_vsini1.... |
7d0f3ba1aa82c2ea5a4a2eca2bbe842b63a82c72 | wafer/talks/serializers.py | wafer/talks/serializers.py | from rest_framework import serializers
from reversion import revisions
from wafer.talks.models import Talk
class TalkSerializer(serializers.ModelSerializer):
class Meta:
model = Talk
exclude = ('_abstract_rendered', )
@revisions.create_revision()
def create(self, validated_data):
... | from rest_framework import serializers
from reversion import revisions
from wafer.talks.models import Talk
class TalkSerializer(serializers.ModelSerializer):
class Meta:
model = Talk
# private_notes should possibly be accessible to
# talk reviewers by the API, but certainly
# not... | Exclude notes and private_notes from api for now | Exclude notes and private_notes from api for now
| Python | isc | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer | from rest_framework import serializers
from reversion import revisions
from wafer.talks.models import Talk
class TalkSerializer(serializers.ModelSerializer):
class Meta:
model = Talk
exclude = ('_abstract_rendered', )
@revisions.create_revision()
def create(self, validated_data):
... | from rest_framework import serializers
from reversion import revisions
from wafer.talks.models import Talk
class TalkSerializer(serializers.ModelSerializer):
class Meta:
model = Talk
# private_notes should possibly be accessible to
# talk reviewers by the API, but certainly
# not... | <commit_before>from rest_framework import serializers
from reversion import revisions
from wafer.talks.models import Talk
class TalkSerializer(serializers.ModelSerializer):
class Meta:
model = Talk
exclude = ('_abstract_rendered', )
@revisions.create_revision()
def create(self, validat... | from rest_framework import serializers
from reversion import revisions
from wafer.talks.models import Talk
class TalkSerializer(serializers.ModelSerializer):
class Meta:
model = Talk
# private_notes should possibly be accessible to
# talk reviewers by the API, but certainly
# not... | from rest_framework import serializers
from reversion import revisions
from wafer.talks.models import Talk
class TalkSerializer(serializers.ModelSerializer):
class Meta:
model = Talk
exclude = ('_abstract_rendered', )
@revisions.create_revision()
def create(self, validated_data):
... | <commit_before>from rest_framework import serializers
from reversion import revisions
from wafer.talks.models import Talk
class TalkSerializer(serializers.ModelSerializer):
class Meta:
model = Talk
exclude = ('_abstract_rendered', )
@revisions.create_revision()
def create(self, validat... |
0600f3a4f9e13ac0a2a2b4d542db949f90e4185c | challenge_2/python/ning/challenge_2.py | challenge_2/python/ning/challenge_2.py | def find_unique(sequence):
item_counter = dict()
uniques = list()
for item in sequence:
if item not in item_counter:
item_counter[item] = 1
else:
item_counter[item] += 1
for item, item_count in item_counter.items():
if item_count == 1:
unique... | import collections
def find_unique(sequence):
counter_dict = collections.defaultdict(int)
uniques = []
for item in sequence:
counter_dict[item] += 1
for item, count in counter_dict.items():
if count == 1:
uniques.append(item)
return uniques
test_sequence_list = [2,'a... | Change logic to use defaultdict, lists initiate now with | Change logic to use defaultdict, lists initiate now with []
| Python | mit | erocs/2017Challenges,popcornanachronism/2017Challenges,erocs/2017Challenges,erocs/2017Challenges,popcornanachronism/2017Challenges,DakRomo/2017Challenges,popcornanachronism/2017Challenges,mindm/2017Challenges,erocs/2017Challenges,DakRomo/2017Challenges,popcornanachronism/2017Challenges,mindm/2017Challenges,DakRomo/2017... | def find_unique(sequence):
item_counter = dict()
uniques = list()
for item in sequence:
if item not in item_counter:
item_counter[item] = 1
else:
item_counter[item] += 1
for item, item_count in item_counter.items():
if item_count == 1:
unique... | import collections
def find_unique(sequence):
counter_dict = collections.defaultdict(int)
uniques = []
for item in sequence:
counter_dict[item] += 1
for item, count in counter_dict.items():
if count == 1:
uniques.append(item)
return uniques
test_sequence_list = [2,'a... | <commit_before>def find_unique(sequence):
item_counter = dict()
uniques = list()
for item in sequence:
if item not in item_counter:
item_counter[item] = 1
else:
item_counter[item] += 1
for item, item_count in item_counter.items():
if item_count == 1:
... | import collections
def find_unique(sequence):
counter_dict = collections.defaultdict(int)
uniques = []
for item in sequence:
counter_dict[item] += 1
for item, count in counter_dict.items():
if count == 1:
uniques.append(item)
return uniques
test_sequence_list = [2,'a... | def find_unique(sequence):
item_counter = dict()
uniques = list()
for item in sequence:
if item not in item_counter:
item_counter[item] = 1
else:
item_counter[item] += 1
for item, item_count in item_counter.items():
if item_count == 1:
unique... | <commit_before>def find_unique(sequence):
item_counter = dict()
uniques = list()
for item in sequence:
if item not in item_counter:
item_counter[item] = 1
else:
item_counter[item] += 1
for item, item_count in item_counter.items():
if item_count == 1:
... |
415c9bd14016453d474901fe16f2da8246b44e1b | dojango/__init__.py | dojango/__init__.py | VERSION = (0, 5, 3, 'final', 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = '%s %... | VERSION = (0, 5, 4, 'alpha', 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = '%s %... | Update to 0.5.4 pre-alpha (preparing next build version) | Update to 0.5.4 pre-alpha (preparing next build version)
| Python | bsd-3-clause | ofirr/dojango,ofirr/dojango,william-gr/dojango,ofirr/dojango,william-gr/dojango,ricard33/dojango,ricard33/dojango,klipstein/dojango,ricard33/dojango,william-gr/dojango,klipstein/dojango | VERSION = (0, 5, 3, 'final', 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = '%s %... | VERSION = (0, 5, 4, 'alpha', 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = '%s %... | <commit_before>VERSION = (0, 5, 3, 'final', 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
... | VERSION = (0, 5, 4, 'alpha', 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = '%s %... | VERSION = (0, 5, 3, 'final', 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = '%s %... | <commit_before>VERSION = (0, 5, 3, 'final', 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
... |
bd850668e2c599abcf110c5e3ebb65b79ee91e22 | xpserver_web/models.py | xpserver_web/models.py | from django.db import models
from django.contrib.auth.models import User
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True)
activation_code = models.CharField(max_length=255, default="0000")
fcm_registration_id = models.CharField(max_length=255,... | from django.db import models
from django.contrib.auth.models import User
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True)
activation_code = models.CharField(max_length=255, default="0000")
fcm_registration_id = models.CharField(max_length=255,... | Change str method for unknow user | Change str method for unknow user
| Python | mit | xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server | from django.db import models
from django.contrib.auth.models import User
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True)
activation_code = models.CharField(max_length=255, default="0000")
fcm_registration_id = models.CharField(max_length=255,... | from django.db import models
from django.contrib.auth.models import User
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True)
activation_code = models.CharField(max_length=255, default="0000")
fcm_registration_id = models.CharField(max_length=255,... | <commit_before>from django.db import models
from django.contrib.auth.models import User
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True)
activation_code = models.CharField(max_length=255, default="0000")
fcm_registration_id = models.CharField(... | from django.db import models
from django.contrib.auth.models import User
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True)
activation_code = models.CharField(max_length=255, default="0000")
fcm_registration_id = models.CharField(max_length=255,... | from django.db import models
from django.contrib.auth.models import User
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True)
activation_code = models.CharField(max_length=255, default="0000")
fcm_registration_id = models.CharField(max_length=255,... | <commit_before>from django.db import models
from django.contrib.auth.models import User
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True)
activation_code = models.CharField(max_length=255, default="0000")
fcm_registration_id = models.CharField(... |
49f3d4d168fa62b545aa308684667c355db5c9d8 | examples/write_avi.py | examples/write_avi.py | #!/usr/bin/env python
# Here we use the camhd module to write a single-frame AVI file, only
# downloading data from the moov atom and one frame. This AVI file can
# easily be converted to a PNG or losslessly to a raw YUV using ffmpeg.
#
# Timothy Crone (tjcrone@gmail.com)
import camhd
# remote file
filename = 'https:... | #!/usr/bin/env python
# Here we use the camhd module to write a single-frame AVI file, only
# downloading data from the moov atom and one frame. This AVI file can
# easily be converted to a PNG or losslessly to a raw YUV using ffmpeg.
#
# Timothy Crone (tjcrone@gmail.com)
import camhd
# remote file
filename = 'https:... | Fix minor bug in example program | Fix minor bug in example program
| Python | mit | tjcrone/pycamhd | #!/usr/bin/env python
# Here we use the camhd module to write a single-frame AVI file, only
# downloading data from the moov atom and one frame. This AVI file can
# easily be converted to a PNG or losslessly to a raw YUV using ffmpeg.
#
# Timothy Crone (tjcrone@gmail.com)
import camhd
# remote file
filename = 'https:... | #!/usr/bin/env python
# Here we use the camhd module to write a single-frame AVI file, only
# downloading data from the moov atom and one frame. This AVI file can
# easily be converted to a PNG or losslessly to a raw YUV using ffmpeg.
#
# Timothy Crone (tjcrone@gmail.com)
import camhd
# remote file
filename = 'https:... | <commit_before>#!/usr/bin/env python
# Here we use the camhd module to write a single-frame AVI file, only
# downloading data from the moov atom and one frame. This AVI file can
# easily be converted to a PNG or losslessly to a raw YUV using ffmpeg.
#
# Timothy Crone (tjcrone@gmail.com)
import camhd
# remote file
fil... | #!/usr/bin/env python
# Here we use the camhd module to write a single-frame AVI file, only
# downloading data from the moov atom and one frame. This AVI file can
# easily be converted to a PNG or losslessly to a raw YUV using ffmpeg.
#
# Timothy Crone (tjcrone@gmail.com)
import camhd
# remote file
filename = 'https:... | #!/usr/bin/env python
# Here we use the camhd module to write a single-frame AVI file, only
# downloading data from the moov atom and one frame. This AVI file can
# easily be converted to a PNG or losslessly to a raw YUV using ffmpeg.
#
# Timothy Crone (tjcrone@gmail.com)
import camhd
# remote file
filename = 'https:... | <commit_before>#!/usr/bin/env python
# Here we use the camhd module to write a single-frame AVI file, only
# downloading data from the moov atom and one frame. This AVI file can
# easily be converted to a PNG or losslessly to a raw YUV using ffmpeg.
#
# Timothy Crone (tjcrone@gmail.com)
import camhd
# remote file
fil... |
4f70897d5a85f1822a93df9bc91979ea79594901 | nose2/tests/unit/test_generators_plugin.py | nose2/tests/unit/test_generators_plugin.py | from nose2.plugins.loader import functions
from nose2.tests._common import TestCase
class TestGeneratorUnpack(TestCase):
tags = ['unit']
def setUp(self):
self.expect = [(0, ('call', (0, 1))),
(1, ('call', (1, 2))),
(2, ('call', (2, 3))),]
def test_un... | from nose2 import events, loader, session
from nose2.plugins.loader import generators
from nose2.tests._common import TestCase
class TestGeneratorUnpack(TestCase):
tags = ['unit']
def setUp(self):
self.session = session.Session()
self.loader = loader.PluggableTestLoader(self.session)
... | Add initial tests for generators plugin | Add initial tests for generators plugin
| Python | bsd-2-clause | ojengwa/nose2,ojengwa/nose2,leth/nose2,little-dude/nose2,ptthiem/nose2,ezigman/nose2,ezigman/nose2,ptthiem/nose2,leth/nose2,little-dude/nose2 | from nose2.plugins.loader import functions
from nose2.tests._common import TestCase
class TestGeneratorUnpack(TestCase):
tags = ['unit']
def setUp(self):
self.expect = [(0, ('call', (0, 1))),
(1, ('call', (1, 2))),
(2, ('call', (2, 3))),]
def test_un... | from nose2 import events, loader, session
from nose2.plugins.loader import generators
from nose2.tests._common import TestCase
class TestGeneratorUnpack(TestCase):
tags = ['unit']
def setUp(self):
self.session = session.Session()
self.loader = loader.PluggableTestLoader(self.session)
... | <commit_before>from nose2.plugins.loader import functions
from nose2.tests._common import TestCase
class TestGeneratorUnpack(TestCase):
tags = ['unit']
def setUp(self):
self.expect = [(0, ('call', (0, 1))),
(1, ('call', (1, 2))),
(2, ('call', (2, 3))),]
... | from nose2 import events, loader, session
from nose2.plugins.loader import generators
from nose2.tests._common import TestCase
class TestGeneratorUnpack(TestCase):
tags = ['unit']
def setUp(self):
self.session = session.Session()
self.loader = loader.PluggableTestLoader(self.session)
... | from nose2.plugins.loader import functions
from nose2.tests._common import TestCase
class TestGeneratorUnpack(TestCase):
tags = ['unit']
def setUp(self):
self.expect = [(0, ('call', (0, 1))),
(1, ('call', (1, 2))),
(2, ('call', (2, 3))),]
def test_un... | <commit_before>from nose2.plugins.loader import functions
from nose2.tests._common import TestCase
class TestGeneratorUnpack(TestCase):
tags = ['unit']
def setUp(self):
self.expect = [(0, ('call', (0, 1))),
(1, ('call', (1, 2))),
(2, ('call', (2, 3))),]
... |
8aa02a12883d058b498ac56673079c1e9b53fdf7 | src/libcask/network.py | src/libcask/network.py | import subprocess
class SetupNetworkMixin(object):
def _setup_hostname(self):
with self.get_attachment().attach():
subprocess.check_call(['hostname', self.hostname])
def _setup_virtual_ethernet(self):
# Setup virtual ethernet interface on the host
# TODO - Need to allocate... | import subprocess
class SetupNetworkMixin(object):
def _setup_hostname(self):
with self.get_attachment().attach():
subprocess.check_call(['hostname', self.hostname])
def _setup_virtual_ethernet(self):
veth_name = 'veth-{hostname}'.format(hostname=self.hostname)
veth_host_n... | Set up separate veth interfaces for each container with a global bridge | Set up separate veth interfaces for each container with a global bridge
| Python | mit | ianpreston/cask,ianpreston/cask | import subprocess
class SetupNetworkMixin(object):
def _setup_hostname(self):
with self.get_attachment().attach():
subprocess.check_call(['hostname', self.hostname])
def _setup_virtual_ethernet(self):
# Setup virtual ethernet interface on the host
# TODO - Need to allocate... | import subprocess
class SetupNetworkMixin(object):
def _setup_hostname(self):
with self.get_attachment().attach():
subprocess.check_call(['hostname', self.hostname])
def _setup_virtual_ethernet(self):
veth_name = 'veth-{hostname}'.format(hostname=self.hostname)
veth_host_n... | <commit_before>import subprocess
class SetupNetworkMixin(object):
def _setup_hostname(self):
with self.get_attachment().attach():
subprocess.check_call(['hostname', self.hostname])
def _setup_virtual_ethernet(self):
# Setup virtual ethernet interface on the host
# TODO - N... | import subprocess
class SetupNetworkMixin(object):
def _setup_hostname(self):
with self.get_attachment().attach():
subprocess.check_call(['hostname', self.hostname])
def _setup_virtual_ethernet(self):
veth_name = 'veth-{hostname}'.format(hostname=self.hostname)
veth_host_n... | import subprocess
class SetupNetworkMixin(object):
def _setup_hostname(self):
with self.get_attachment().attach():
subprocess.check_call(['hostname', self.hostname])
def _setup_virtual_ethernet(self):
# Setup virtual ethernet interface on the host
# TODO - Need to allocate... | <commit_before>import subprocess
class SetupNetworkMixin(object):
def _setup_hostname(self):
with self.get_attachment().attach():
subprocess.check_call(['hostname', self.hostname])
def _setup_virtual_ethernet(self):
# Setup virtual ethernet interface on the host
# TODO - N... |
afdab20403a360508bced14f4750dd6ef4e6aa57 | flask_apidoc/utils.py | flask_apidoc/utils.py | """
Helpers.
"""
def cached(f):
"""
Cache decorator for functions taking one or more arguments.
:param f: The function to be cached.
:return: The cached value.
"""
class CachedDict(dict):
def __init__(self, f):
self.f = f
def __call__(self, *args):
retu... | """
Helpers.
"""
import functools
def cached(f):
"""
Cache decorator for functions taking one or more arguments.
:param f: The function to be cached.
:return: The cached value.
"""
cache = f.cache = {}
@functools.wraps(f)
def decorator(*args, **kwargs):
key = str(args) + str... | Improve cached decorator to support class based methods | Improve cached decorator to support class based methods
| Python | mit | viniciuschiele/flask-apidoc | """
Helpers.
"""
def cached(f):
"""
Cache decorator for functions taking one or more arguments.
:param f: The function to be cached.
:return: The cached value.
"""
class CachedDict(dict):
def __init__(self, f):
self.f = f
def __call__(self, *args):
retu... | """
Helpers.
"""
import functools
def cached(f):
"""
Cache decorator for functions taking one or more arguments.
:param f: The function to be cached.
:return: The cached value.
"""
cache = f.cache = {}
@functools.wraps(f)
def decorator(*args, **kwargs):
key = str(args) + str... | <commit_before>"""
Helpers.
"""
def cached(f):
"""
Cache decorator for functions taking one or more arguments.
:param f: The function to be cached.
:return: The cached value.
"""
class CachedDict(dict):
def __init__(self, f):
self.f = f
def __call__(self, *args):
... | """
Helpers.
"""
import functools
def cached(f):
"""
Cache decorator for functions taking one or more arguments.
:param f: The function to be cached.
:return: The cached value.
"""
cache = f.cache = {}
@functools.wraps(f)
def decorator(*args, **kwargs):
key = str(args) + str... | """
Helpers.
"""
def cached(f):
"""
Cache decorator for functions taking one or more arguments.
:param f: The function to be cached.
:return: The cached value.
"""
class CachedDict(dict):
def __init__(self, f):
self.f = f
def __call__(self, *args):
retu... | <commit_before>"""
Helpers.
"""
def cached(f):
"""
Cache decorator for functions taking one or more arguments.
:param f: The function to be cached.
:return: The cached value.
"""
class CachedDict(dict):
def __init__(self, f):
self.f = f
def __call__(self, *args):
... |
540b7cbcf51745e7a7eddb5f0030bc9f52dab35a | Demo/scripts/makedir.py | Demo/scripts/makedir.py | #! /usr/bin/env python
# Like mkdir, but also make intermediate directories if necessary.
# It is not an error if the given directory already exists (as long
# as it is a directory).
# Errors are not treated specially -- you just get a Python exception.
import sys, os
def main():
for p in sys.argv[1:]:
makedirs(p... | #! /usr/bin/env python
# Like mkdir, but also make intermediate directories if necessary.
# It is not an error if the given directory already exists (as long
# as it is a directory).
# Errors are not treated specially -- you just get a Python exception.
import sys, os
def main():
for p in sys.argv[1:]:
makedirs(p... | Fix bug discovered by Klaus-Juergen Wolf -- it runs into infinite recursion! | Fix bug discovered by Klaus-Juergen Wolf -- it runs into infinite recursion!
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | #! /usr/bin/env python
# Like mkdir, but also make intermediate directories if necessary.
# It is not an error if the given directory already exists (as long
# as it is a directory).
# Errors are not treated specially -- you just get a Python exception.
import sys, os
def main():
for p in sys.argv[1:]:
makedirs(p... | #! /usr/bin/env python
# Like mkdir, but also make intermediate directories if necessary.
# It is not an error if the given directory already exists (as long
# as it is a directory).
# Errors are not treated specially -- you just get a Python exception.
import sys, os
def main():
for p in sys.argv[1:]:
makedirs(p... | <commit_before>#! /usr/bin/env python
# Like mkdir, but also make intermediate directories if necessary.
# It is not an error if the given directory already exists (as long
# as it is a directory).
# Errors are not treated specially -- you just get a Python exception.
import sys, os
def main():
for p in sys.argv[1:... | #! /usr/bin/env python
# Like mkdir, but also make intermediate directories if necessary.
# It is not an error if the given directory already exists (as long
# as it is a directory).
# Errors are not treated specially -- you just get a Python exception.
import sys, os
def main():
for p in sys.argv[1:]:
makedirs(p... | #! /usr/bin/env python
# Like mkdir, but also make intermediate directories if necessary.
# It is not an error if the given directory already exists (as long
# as it is a directory).
# Errors are not treated specially -- you just get a Python exception.
import sys, os
def main():
for p in sys.argv[1:]:
makedirs(p... | <commit_before>#! /usr/bin/env python
# Like mkdir, but also make intermediate directories if necessary.
# It is not an error if the given directory already exists (as long
# as it is a directory).
# Errors are not treated specially -- you just get a Python exception.
import sys, os
def main():
for p in sys.argv[1:... |
d66e44fa9fd9b8e8944907b2490d32102c3fba82 | keystoneclient/hacking/checks.py | keystoneclient/hacking/checks.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | Change hacking check to verify all oslo imports | Change hacking check to verify all oslo imports
The hacking check was verifying that specific oslo imports
weren't using the oslo-namespaced package. Since all the oslo
libraries used by keystoneclient are now changed to use the
new package name the hacking check can be simplified.
bp drop-namespace-packages
Change-... | Python | apache-2.0 | Mercador/python-keystoneclient,Mercador/python-keystoneclient,sdpp/python-keystoneclient,magic0704/python-keystoneclient,ging/python-keystoneclient,darren-wang/ksc,magic0704/python-keystoneclient,klmitch/python-keystoneclient,darren-wang/ksc,klmitch/python-keystoneclient,sdpp/python-keystoneclient,ging/python-keystonec... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | <commit_before># 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
# dist... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | <commit_before># 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
# dist... |
36e0821fcd871935e48ae10926be7594d42f13b8 | knowledge_repo/converters/pdf.py | knowledge_repo/converters/pdf.py | from ..converter import KnowledgePostConverter
from .html import HTMLConverter
class PDFConverter(KnowledgePostConverter):
'''
Use this as a template for new KnowledgePostConverters.
'''
_registry_keys = ['pdf']
@property
def dependencies(self):
# Dependencies required for this conve... | from ..converter import KnowledgePostConverter
from .html import HTMLConverter
class PDFConverter(KnowledgePostConverter):
'''
Use this as a template for new KnowledgePostConverters.
'''
_registry_keys = ['pdf']
@property
def dependencies(self):
# Dependencies required for this conve... | Change PDF font to Helvetica | Change PDF font to Helvetica
Changing the PDF font from the default to Helvetica | Python | apache-2.0 | airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo | from ..converter import KnowledgePostConverter
from .html import HTMLConverter
class PDFConverter(KnowledgePostConverter):
'''
Use this as a template for new KnowledgePostConverters.
'''
_registry_keys = ['pdf']
@property
def dependencies(self):
# Dependencies required for this conve... | from ..converter import KnowledgePostConverter
from .html import HTMLConverter
class PDFConverter(KnowledgePostConverter):
'''
Use this as a template for new KnowledgePostConverters.
'''
_registry_keys = ['pdf']
@property
def dependencies(self):
# Dependencies required for this conve... | <commit_before>from ..converter import KnowledgePostConverter
from .html import HTMLConverter
class PDFConverter(KnowledgePostConverter):
'''
Use this as a template for new KnowledgePostConverters.
'''
_registry_keys = ['pdf']
@property
def dependencies(self):
# Dependencies required... | from ..converter import KnowledgePostConverter
from .html import HTMLConverter
class PDFConverter(KnowledgePostConverter):
'''
Use this as a template for new KnowledgePostConverters.
'''
_registry_keys = ['pdf']
@property
def dependencies(self):
# Dependencies required for this conve... | from ..converter import KnowledgePostConverter
from .html import HTMLConverter
class PDFConverter(KnowledgePostConverter):
'''
Use this as a template for new KnowledgePostConverters.
'''
_registry_keys = ['pdf']
@property
def dependencies(self):
# Dependencies required for this conve... | <commit_before>from ..converter import KnowledgePostConverter
from .html import HTMLConverter
class PDFConverter(KnowledgePostConverter):
'''
Use this as a template for new KnowledgePostConverters.
'''
_registry_keys = ['pdf']
@property
def dependencies(self):
# Dependencies required... |
985198a9ea569cc6f418c5b337632b91cdda7e37 | lib/rapidsms/backends/backend.py | lib/rapidsms/backends/backend.py | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
class Backend(object):
def log(self, level, message):
self.router.log(level, message)
def start(self):
raise NotImplementedError
def stop(self):
raise NotImplementedError
def send(self):
raise NotImpleme... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
class Backend(object):
def __init__ (self, router):
self.router = router
def log(self, level, message):
self.router.log(level, message)
def start(self):
raise NotImplementedError
def stop(self):
raise NotImple... | Add a constructor method for Backend | Add a constructor method for Backend
| Python | bsd-3-clause | dimagi/rapidsms-core-dev,peterayeni/rapidsms,rapidsms/rapidsms-core-dev,lsgunth/rapidsms,catalpainternational/rapidsms,ken-muturi/rapidsms,ehealthafrica-ci/rapidsms,eHealthAfrica/rapidsms,unicefuganda/edtrac,unicefuganda/edtrac,eHealthAfrica/rapidsms,catalpainternational/rapidsms,catalpainternational/rapidsms,eHealthAf... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
class Backend(object):
def log(self, level, message):
self.router.log(level, message)
def start(self):
raise NotImplementedError
def stop(self):
raise NotImplementedError
def send(self):
raise NotImpleme... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
class Backend(object):
def __init__ (self, router):
self.router = router
def log(self, level, message):
self.router.log(level, message)
def start(self):
raise NotImplementedError
def stop(self):
raise NotImple... | <commit_before>#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
class Backend(object):
def log(self, level, message):
self.router.log(level, message)
def start(self):
raise NotImplementedError
def stop(self):
raise NotImplementedError
def send(self):
r... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
class Backend(object):
def __init__ (self, router):
self.router = router
def log(self, level, message):
self.router.log(level, message)
def start(self):
raise NotImplementedError
def stop(self):
raise NotImple... | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
class Backend(object):
def log(self, level, message):
self.router.log(level, message)
def start(self):
raise NotImplementedError
def stop(self):
raise NotImplementedError
def send(self):
raise NotImpleme... | <commit_before>#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
class Backend(object):
def log(self, level, message):
self.router.log(level, message)
def start(self):
raise NotImplementedError
def stop(self):
raise NotImplementedError
def send(self):
r... |
7d574570ad831a86758352ef98bf6192f7d3e6fa | setup.py | setup.py | import os
from setuptools import setup
install_requires = [
'mysql-python>=1.2.3',
'psycopg2>=2.4.2',
'pyyaml>=3.10.0',
'argparse',
'pytz',
]
if os.name == 'posix':
install_requires.append('termcolor>=1.1.0')
setup(
name='py-mysql2pgsql',
version='0.1.6',
description='Tool fo... | import os
from setuptools import setup
install_requires = [
'mysql-python>=1.2.3',
'psycopg2>=2.4.2',
'pyyaml>=3.10.0',
'pytz',
]
if os.name == 'posix':
install_requires.append('termcolor>=1.1.0')
if version < (2,7) or (3,0) <= version <= (3,1):
install_requires += ['argparse']
setup(
... | Correct argparse dependency - argparse already is a part of base python as of 2.7 and 3.2. | Correct argparse dependency - argparse already is a part of base python as of 2.7 and 3.2. | Python | mit | Varsha-Arun/py-mysql2pgsql,philipsoutham/py-mysql2pgsql,EdNeg/DB-Project,leture/py-mysql2pgsql,mr-tron/py-mysql2pgsql,EdNeg/DB-Project,emailgregn/py-mysql2pgsql,kevgathuku/py-mysql2pgsql,andela-kndungu/py-mysql2pgsql,EdNeg/DB-Project,SpootDev/py-mysql2pgsql,edwardsamuel/py-mysql2pgsql | import os
from setuptools import setup
install_requires = [
'mysql-python>=1.2.3',
'psycopg2>=2.4.2',
'pyyaml>=3.10.0',
'argparse',
'pytz',
]
if os.name == 'posix':
install_requires.append('termcolor>=1.1.0')
setup(
name='py-mysql2pgsql',
version='0.1.6',
description='Tool fo... | import os
from setuptools import setup
install_requires = [
'mysql-python>=1.2.3',
'psycopg2>=2.4.2',
'pyyaml>=3.10.0',
'pytz',
]
if os.name == 'posix':
install_requires.append('termcolor>=1.1.0')
if version < (2,7) or (3,0) <= version <= (3,1):
install_requires += ['argparse']
setup(
... | <commit_before>import os
from setuptools import setup
install_requires = [
'mysql-python>=1.2.3',
'psycopg2>=2.4.2',
'pyyaml>=3.10.0',
'argparse',
'pytz',
]
if os.name == 'posix':
install_requires.append('termcolor>=1.1.0')
setup(
name='py-mysql2pgsql',
version='0.1.6',
descr... | import os
from setuptools import setup
install_requires = [
'mysql-python>=1.2.3',
'psycopg2>=2.4.2',
'pyyaml>=3.10.0',
'pytz',
]
if os.name == 'posix':
install_requires.append('termcolor>=1.1.0')
if version < (2,7) or (3,0) <= version <= (3,1):
install_requires += ['argparse']
setup(
... | import os
from setuptools import setup
install_requires = [
'mysql-python>=1.2.3',
'psycopg2>=2.4.2',
'pyyaml>=3.10.0',
'argparse',
'pytz',
]
if os.name == 'posix':
install_requires.append('termcolor>=1.1.0')
setup(
name='py-mysql2pgsql',
version='0.1.6',
description='Tool fo... | <commit_before>import os
from setuptools import setup
install_requires = [
'mysql-python>=1.2.3',
'psycopg2>=2.4.2',
'pyyaml>=3.10.0',
'argparse',
'pytz',
]
if os.name == 'posix':
install_requires.append('termcolor>=1.1.0')
setup(
name='py-mysql2pgsql',
version='0.1.6',
descr... |
329fedb27fe54d593f192912beda56588faec214 | tests/__init__.py | tests/__init__.py | from django.conf import settings
from mock import Mock, patch
from unittest2 import TestCase
settings.configure()
# Need to import this after configure()
from django.db.models import ForeignKey
class TestPreference(object):
_meta = Mock(fields=[ForeignKey('user', name='user')])
objects = Mock()
def __... | from django.conf import settings
from mock import Mock, patch
from unittest2 import TestCase
settings.configure()
# Need to import this after configure()
from django.db.models import ForeignKey
class TestPreference(object):
_meta = Mock(fields=[ForeignKey('user', name='user')])
objects = Mock()
def __... | Extend mocking to run validation | Extend mocking to run validation
| Python | mit | yola/drf-madprops | from django.conf import settings
from mock import Mock, patch
from unittest2 import TestCase
settings.configure()
# Need to import this after configure()
from django.db.models import ForeignKey
class TestPreference(object):
_meta = Mock(fields=[ForeignKey('user', name='user')])
objects = Mock()
def __... | from django.conf import settings
from mock import Mock, patch
from unittest2 import TestCase
settings.configure()
# Need to import this after configure()
from django.db.models import ForeignKey
class TestPreference(object):
_meta = Mock(fields=[ForeignKey('user', name='user')])
objects = Mock()
def __... | <commit_before>from django.conf import settings
from mock import Mock, patch
from unittest2 import TestCase
settings.configure()
# Need to import this after configure()
from django.db.models import ForeignKey
class TestPreference(object):
_meta = Mock(fields=[ForeignKey('user', name='user')])
objects = Moc... | from django.conf import settings
from mock import Mock, patch
from unittest2 import TestCase
settings.configure()
# Need to import this after configure()
from django.db.models import ForeignKey
class TestPreference(object):
_meta = Mock(fields=[ForeignKey('user', name='user')])
objects = Mock()
def __... | from django.conf import settings
from mock import Mock, patch
from unittest2 import TestCase
settings.configure()
# Need to import this after configure()
from django.db.models import ForeignKey
class TestPreference(object):
_meta = Mock(fields=[ForeignKey('user', name='user')])
objects = Mock()
def __... | <commit_before>from django.conf import settings
from mock import Mock, patch
from unittest2 import TestCase
settings.configure()
# Need to import this after configure()
from django.db.models import ForeignKey
class TestPreference(object):
_meta = Mock(fields=[ForeignKey('user', name='user')])
objects = Moc... |
6d90adebbcd9085de4f0af503b7e0b55dc9424b2 | tests/conftest.py | tests/conftest.py | import numpy
import pytest
@pytest.fixture(scope="module")
def rgen():
return numpy.random.RandomState(seed=52973992)
| import numpy
import pytest
@pytest.fixture(scope="module")
def rgen():
return numpy.random.RandomState(seed=3476583865)
| Fix test by questionable means :) | Fix test by questionable means :)
| Python | bsd-3-clause | dseuss/mpnum,dseuss/mpnum | import numpy
import pytest
@pytest.fixture(scope="module")
def rgen():
return numpy.random.RandomState(seed=52973992)
Fix test by questionable means :) | import numpy
import pytest
@pytest.fixture(scope="module")
def rgen():
return numpy.random.RandomState(seed=3476583865)
| <commit_before>import numpy
import pytest
@pytest.fixture(scope="module")
def rgen():
return numpy.random.RandomState(seed=52973992)
<commit_msg>Fix test by questionable means :)<commit_after> | import numpy
import pytest
@pytest.fixture(scope="module")
def rgen():
return numpy.random.RandomState(seed=3476583865)
| import numpy
import pytest
@pytest.fixture(scope="module")
def rgen():
return numpy.random.RandomState(seed=52973992)
Fix test by questionable means :)import numpy
import pytest
@pytest.fixture(scope="module")
def rgen():
return numpy.random.RandomState(seed=3476583865)
| <commit_before>import numpy
import pytest
@pytest.fixture(scope="module")
def rgen():
return numpy.random.RandomState(seed=52973992)
<commit_msg>Fix test by questionable means :)<commit_after>import numpy
import pytest
@pytest.fixture(scope="module")
def rgen():
return numpy.random.RandomState(seed=34765838... |
817976878b584086bedc296e5fd6d264006c8dcd | tests/conftest.py | tests/conftest.py | from __future__ import absolute_import
from __future__ import unicode_literals
import os
import subprocess
import mock
import pytest
@pytest.yield_fixture
def in_tmpdir(tmpdir):
pwd = os.getcwd()
os.chdir(tmpdir.strpath)
try:
yield
finally:
os.chdir(pwd)
@pytest.yield_fixture
def c... | from __future__ import absolute_import
from __future__ import unicode_literals
import os
import subprocess
import mock
import pytest
@pytest.fixture
def in_tmpdir(tmpdir):
pwd = os.getcwd()
os.chdir(tmpdir.strpath)
try:
yield
finally:
os.chdir(pwd)
@pytest.fixture
def check_call_mo... | Replace deprecated yield_fixture with fixture | Replace deprecated yield_fixture with fixture
Committed via https://github.com/asottile/all-repos
| Python | mit | asottile/css-explore | from __future__ import absolute_import
from __future__ import unicode_literals
import os
import subprocess
import mock
import pytest
@pytest.yield_fixture
def in_tmpdir(tmpdir):
pwd = os.getcwd()
os.chdir(tmpdir.strpath)
try:
yield
finally:
os.chdir(pwd)
@pytest.yield_fixture
def c... | from __future__ import absolute_import
from __future__ import unicode_literals
import os
import subprocess
import mock
import pytest
@pytest.fixture
def in_tmpdir(tmpdir):
pwd = os.getcwd()
os.chdir(tmpdir.strpath)
try:
yield
finally:
os.chdir(pwd)
@pytest.fixture
def check_call_mo... | <commit_before>from __future__ import absolute_import
from __future__ import unicode_literals
import os
import subprocess
import mock
import pytest
@pytest.yield_fixture
def in_tmpdir(tmpdir):
pwd = os.getcwd()
os.chdir(tmpdir.strpath)
try:
yield
finally:
os.chdir(pwd)
@pytest.yiel... | from __future__ import absolute_import
from __future__ import unicode_literals
import os
import subprocess
import mock
import pytest
@pytest.fixture
def in_tmpdir(tmpdir):
pwd = os.getcwd()
os.chdir(tmpdir.strpath)
try:
yield
finally:
os.chdir(pwd)
@pytest.fixture
def check_call_mo... | from __future__ import absolute_import
from __future__ import unicode_literals
import os
import subprocess
import mock
import pytest
@pytest.yield_fixture
def in_tmpdir(tmpdir):
pwd = os.getcwd()
os.chdir(tmpdir.strpath)
try:
yield
finally:
os.chdir(pwd)
@pytest.yield_fixture
def c... | <commit_before>from __future__ import absolute_import
from __future__ import unicode_literals
import os
import subprocess
import mock
import pytest
@pytest.yield_fixture
def in_tmpdir(tmpdir):
pwd = os.getcwd()
os.chdir(tmpdir.strpath)
try:
yield
finally:
os.chdir(pwd)
@pytest.yiel... |
b778c0192cabc652fc06daf99f6b890b3297f83f | Lib/test/test_sqlite.py | Lib/test/test_sqlite.py | from test.support import run_unittest, import_module, verbose
# Skip test if _sqlite3 module not installed
import_module('_sqlite3')
import sqlite3
from sqlite3.test import (dbapi, types, userfunctions,
factory, transactions, hooks, regression,
dump)
de... | import test.support
# Skip test if _sqlite3 module not installed
test.support.import_module('_sqlite3')
import sqlite3
from sqlite3.test import (dbapi, types, userfunctions,
factory, transactions, hooks, regression,
dump)
def test_main():
if test.su... | Make the printing of sqlite version in verbose mode work with regrtest -w. | Make the printing of sqlite version in verbose mode work with regrtest -w.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | from test.support import run_unittest, import_module, verbose
# Skip test if _sqlite3 module not installed
import_module('_sqlite3')
import sqlite3
from sqlite3.test import (dbapi, types, userfunctions,
factory, transactions, hooks, regression,
dump)
de... | import test.support
# Skip test if _sqlite3 module not installed
test.support.import_module('_sqlite3')
import sqlite3
from sqlite3.test import (dbapi, types, userfunctions,
factory, transactions, hooks, regression,
dump)
def test_main():
if test.su... | <commit_before>from test.support import run_unittest, import_module, verbose
# Skip test if _sqlite3 module not installed
import_module('_sqlite3')
import sqlite3
from sqlite3.test import (dbapi, types, userfunctions,
factory, transactions, hooks, regression,
... | import test.support
# Skip test if _sqlite3 module not installed
test.support.import_module('_sqlite3')
import sqlite3
from sqlite3.test import (dbapi, types, userfunctions,
factory, transactions, hooks, regression,
dump)
def test_main():
if test.su... | from test.support import run_unittest, import_module, verbose
# Skip test if _sqlite3 module not installed
import_module('_sqlite3')
import sqlite3
from sqlite3.test import (dbapi, types, userfunctions,
factory, transactions, hooks, regression,
dump)
de... | <commit_before>from test.support import run_unittest, import_module, verbose
# Skip test if _sqlite3 module not installed
import_module('_sqlite3')
import sqlite3
from sqlite3.test import (dbapi, types, userfunctions,
factory, transactions, hooks, regression,
... |
d8e9201c627840c72a540a77425ec0c13ac48a22 | tests/test_cmd.py | tests/test_cmd.py | import unittest
from click.testing import CliRunner
from scuevals_api.cmd import cli
class CmdsTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.runner = CliRunner()
def cli_run(self, *cmds):
return self.runner.invoke(cli, cmds)
cls.cli_run = cli_run
... | import unittest
from click.testing import CliRunner
from scuevals_api.cmd import cli
class CmdsTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.runner = CliRunner()
def cli_run(self, *cmds):
return self.runner.invoke(cli, cmds)
cls.cli_run = cli_run
... | Add detailed error for CLI test failure | Add detailed error for CLI test failure
| Python | agpl-3.0 | SCUEvals/scuevals-api,SCUEvals/scuevals-api | import unittest
from click.testing import CliRunner
from scuevals_api.cmd import cli
class CmdsTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.runner = CliRunner()
def cli_run(self, *cmds):
return self.runner.invoke(cli, cmds)
cls.cli_run = cli_run
... | import unittest
from click.testing import CliRunner
from scuevals_api.cmd import cli
class CmdsTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.runner = CliRunner()
def cli_run(self, *cmds):
return self.runner.invoke(cli, cmds)
cls.cli_run = cli_run
... | <commit_before>import unittest
from click.testing import CliRunner
from scuevals_api.cmd import cli
class CmdsTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.runner = CliRunner()
def cli_run(self, *cmds):
return self.runner.invoke(cli, cmds)
cls.cli_r... | import unittest
from click.testing import CliRunner
from scuevals_api.cmd import cli
class CmdsTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.runner = CliRunner()
def cli_run(self, *cmds):
return self.runner.invoke(cli, cmds)
cls.cli_run = cli_run
... | import unittest
from click.testing import CliRunner
from scuevals_api.cmd import cli
class CmdsTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.runner = CliRunner()
def cli_run(self, *cmds):
return self.runner.invoke(cli, cmds)
cls.cli_run = cli_run
... | <commit_before>import unittest
from click.testing import CliRunner
from scuevals_api.cmd import cli
class CmdsTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.runner = CliRunner()
def cli_run(self, *cmds):
return self.runner.invoke(cli, cmds)
cls.cli_r... |
e7d42847284ae73befad8bdf2fa035a6f95a82bb | tests/test_dow.py | tests/test_dow.py | from datetime import datetime
import pycron
def test_parser():
now = datetime(2015, 6, 18, 16, 7)
assert pycron.is_now('* * * * *', now)
assert pycron.is_now('* * * * 4', now)
assert pycron.is_now('* * * * */4', now)
assert pycron.is_now('* * * * 0,3,4', now)
assert pycron.is_now('* * * * 3', ... | from datetime import datetime, timedelta
import pycron
def test_parser():
now = datetime(2015, 6, 18, 16, 7)
assert pycron.is_now('* * * * *', now)
assert pycron.is_now('* * * * 4', now)
assert pycron.is_now('* * * * */4', now)
assert pycron.is_now('* * * * 0,3,4', now)
assert pycron.is_now('*... | Add more thorough testing of day of week. | Add more thorough testing of day of week.
| Python | mit | kipe/pycron | from datetime import datetime
import pycron
def test_parser():
now = datetime(2015, 6, 18, 16, 7)
assert pycron.is_now('* * * * *', now)
assert pycron.is_now('* * * * 4', now)
assert pycron.is_now('* * * * */4', now)
assert pycron.is_now('* * * * 0,3,4', now)
assert pycron.is_now('* * * * 3', ... | from datetime import datetime, timedelta
import pycron
def test_parser():
now = datetime(2015, 6, 18, 16, 7)
assert pycron.is_now('* * * * *', now)
assert pycron.is_now('* * * * 4', now)
assert pycron.is_now('* * * * */4', now)
assert pycron.is_now('* * * * 0,3,4', now)
assert pycron.is_now('*... | <commit_before>from datetime import datetime
import pycron
def test_parser():
now = datetime(2015, 6, 18, 16, 7)
assert pycron.is_now('* * * * *', now)
assert pycron.is_now('* * * * 4', now)
assert pycron.is_now('* * * * */4', now)
assert pycron.is_now('* * * * 0,3,4', now)
assert pycron.is_no... | from datetime import datetime, timedelta
import pycron
def test_parser():
now = datetime(2015, 6, 18, 16, 7)
assert pycron.is_now('* * * * *', now)
assert pycron.is_now('* * * * 4', now)
assert pycron.is_now('* * * * */4', now)
assert pycron.is_now('* * * * 0,3,4', now)
assert pycron.is_now('*... | from datetime import datetime
import pycron
def test_parser():
now = datetime(2015, 6, 18, 16, 7)
assert pycron.is_now('* * * * *', now)
assert pycron.is_now('* * * * 4', now)
assert pycron.is_now('* * * * */4', now)
assert pycron.is_now('* * * * 0,3,4', now)
assert pycron.is_now('* * * * 3', ... | <commit_before>from datetime import datetime
import pycron
def test_parser():
now = datetime(2015, 6, 18, 16, 7)
assert pycron.is_now('* * * * *', now)
assert pycron.is_now('* * * * 4', now)
assert pycron.is_now('* * * * */4', now)
assert pycron.is_now('* * * * 0,3,4', now)
assert pycron.is_no... |
a89e7f9f625427d558300eb5e5cbc2881cdcc207 | get_a_job/__init__.py | get_a_job/__init__.py | from flask import Flask
from flask.ext.restful import Api
from .models import db
from .api import configure_api
def create_app(object_name):
app = Flask(object_name)
app.config.from_object(object_name)
db.init_app(app)
configure_api(app)
return app
| from flask import Flask
from flask.ext.restful import Api
from .models import db
from .api import configure_api
def create_app(object_name, **kwargs):
app = Flask(object_name)
app.config.from_object(object_name)
app.config.update(kwargs)
db.init_app(app)
configure_api(app)
return app
| Add optional configuration customization of app. | Add optional configuration customization of app.
| Python | mit | smoynes/get_a_job | from flask import Flask
from flask.ext.restful import Api
from .models import db
from .api import configure_api
def create_app(object_name):
app = Flask(object_name)
app.config.from_object(object_name)
db.init_app(app)
configure_api(app)
return app
Add optional configuration customization of app... | from flask import Flask
from flask.ext.restful import Api
from .models import db
from .api import configure_api
def create_app(object_name, **kwargs):
app = Flask(object_name)
app.config.from_object(object_name)
app.config.update(kwargs)
db.init_app(app)
configure_api(app)
return app
| <commit_before>from flask import Flask
from flask.ext.restful import Api
from .models import db
from .api import configure_api
def create_app(object_name):
app = Flask(object_name)
app.config.from_object(object_name)
db.init_app(app)
configure_api(app)
return app
<commit_msg>Add optional configu... | from flask import Flask
from flask.ext.restful import Api
from .models import db
from .api import configure_api
def create_app(object_name, **kwargs):
app = Flask(object_name)
app.config.from_object(object_name)
app.config.update(kwargs)
db.init_app(app)
configure_api(app)
return app
| from flask import Flask
from flask.ext.restful import Api
from .models import db
from .api import configure_api
def create_app(object_name):
app = Flask(object_name)
app.config.from_object(object_name)
db.init_app(app)
configure_api(app)
return app
Add optional configuration customization of app... | <commit_before>from flask import Flask
from flask.ext.restful import Api
from .models import db
from .api import configure_api
def create_app(object_name):
app = Flask(object_name)
app.config.from_object(object_name)
db.init_app(app)
configure_api(app)
return app
<commit_msg>Add optional configu... |
d8cde079d6e8dd0dcd5a13a36a0bca9685ba7b1c | api/BucketListAPI.py | api/BucketListAPI.py | from flask import Flask, jsonify
from modals.modals import User, Bucket, Item
from api.__init__ import create_app, db
app = create_app('DevelopmentEnv')
@app.errorhandler(404)
def page_not_found(e):
response = jsonify({'error': 'The request can not be completed'})
response.status_code = 404
return respon... | from flask import Flask, jsonify
from modals.modals import User, Bucket, Item
from api.__init__ import create_app, db
app = create_app('DevelopmentEnv')
@app.errorhandler(404)
def page_not_found(e):
response = jsonify({'error': 'The request can not be completed'})
response.status_code = 404
return respon... | Add error handler for invalid token | Add error handler for invalid token
| Python | mit | patlub/BucketListAPI,patlub/BucketListAPI | from flask import Flask, jsonify
from modals.modals import User, Bucket, Item
from api.__init__ import create_app, db
app = create_app('DevelopmentEnv')
@app.errorhandler(404)
def page_not_found(e):
response = jsonify({'error': 'The request can not be completed'})
response.status_code = 404
return respon... | from flask import Flask, jsonify
from modals.modals import User, Bucket, Item
from api.__init__ import create_app, db
app = create_app('DevelopmentEnv')
@app.errorhandler(404)
def page_not_found(e):
response = jsonify({'error': 'The request can not be completed'})
response.status_code = 404
return respon... | <commit_before>from flask import Flask, jsonify
from modals.modals import User, Bucket, Item
from api.__init__ import create_app, db
app = create_app('DevelopmentEnv')
@app.errorhandler(404)
def page_not_found(e):
response = jsonify({'error': 'The request can not be completed'})
response.status_code = 404
... | from flask import Flask, jsonify
from modals.modals import User, Bucket, Item
from api.__init__ import create_app, db
app = create_app('DevelopmentEnv')
@app.errorhandler(404)
def page_not_found(e):
response = jsonify({'error': 'The request can not be completed'})
response.status_code = 404
return respon... | from flask import Flask, jsonify
from modals.modals import User, Bucket, Item
from api.__init__ import create_app, db
app = create_app('DevelopmentEnv')
@app.errorhandler(404)
def page_not_found(e):
response = jsonify({'error': 'The request can not be completed'})
response.status_code = 404
return respon... | <commit_before>from flask import Flask, jsonify
from modals.modals import User, Bucket, Item
from api.__init__ import create_app, db
app = create_app('DevelopmentEnv')
@app.errorhandler(404)
def page_not_found(e):
response = jsonify({'error': 'The request can not be completed'})
response.status_code = 404
... |
45254f3a7401b4b63d829f38c426c0635485f1e0 | PRESUBMIT.py | PRESUBMIT.py | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit... | # Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built... | Fix the license header regex. | Fix the license header regex.
Most of the files are attributed to Google Inc so I used this instead of
Chromium Authors.
R=mark@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/7108074
git-svn-id: e7e1075985beda50ea81ac4472467b4f6e91fc78@936 78cadc50-ecff-11dd-a971-7dbc132099af
| Python | bsd-3-clause | enkripsi/gyp,mistydemeo/gyp,cysp/gyp,IllusionRom-deprecated/android_platform_external_chromium_org_tools_gyp,LazyCodingCat/gyp,IllusionRom-deprecated/android_platform_external_chromium_org_tools_gyp,ttyangf/gyp,saghul/gyn,ttyangf/pdfium_gyp,lukeweber/gyp-override,carlTLR/gyp,amoikevin/gyp,erikge/watch_gyp,LazyCodingCat... | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit... | # Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built... | <commit_before># Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details abou... | # Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built... | # Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit... | <commit_before># Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details abou... |
ac3c855583a023fc76b8720aa7e38419b28a26d4 | falcom/api/hathi.py | falcom/api/hathi.py | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
import json
def get_counts_from_item_list (items, htid):
a = len([x for x in items if x["htid"] == htid])
b = len(items) - a
ret... | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
import json
class HathiItems:
def __init__ (self):
pass
def __len__ (self):
return 0
def get_counts_from_item_list... | Refactor empty tuple into empty object with len() | Refactor empty tuple into empty object with len()
| Python | bsd-3-clause | mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
import json
def get_counts_from_item_list (items, htid):
a = len([x for x in items if x["htid"] == htid])
b = len(items) - a
ret... | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
import json
class HathiItems:
def __init__ (self):
pass
def __len__ (self):
return 0
def get_counts_from_item_list... | <commit_before># Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
import json
def get_counts_from_item_list (items, htid):
a = len([x for x in items if x["htid"] == htid])
b = len(item... | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
import json
class HathiItems:
def __init__ (self):
pass
def __len__ (self):
return 0
def get_counts_from_item_list... | # Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
import json
def get_counts_from_item_list (items, htid):
a = len([x for x in items if x["htid"] == htid])
b = len(items) - a
ret... | <commit_before># Copyright (c) 2017 The Regents of the University of Michigan.
# All Rights Reserved. Licensed according to the terms of the Revised
# BSD License. See LICENSE.txt for details.
import json
def get_counts_from_item_list (items, htid):
a = len([x for x in items if x["htid"] == htid])
b = len(item... |
7872a2327f9dea7d4c1f5a3054b6be6bba25fdd4 | scripts/migration/migrate_deleted_wikis.py | scripts/migration/migrate_deleted_wikis.py | import logging
import sys
from modularodm import Q
from framework.transactions.context import TokuTransaction
from website.app import init_app
from website.models import NodeLog
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def get_targets():
return NodeLog.find(Q('action', 'eq'... | import logging
import sys
from modularodm import Q
from framework.transactions.context import TokuTransaction
from website.app import init_app
from website.models import NodeLog
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def get_targets():
return NodeLog.find(Q('action', 'eq'... | Remove TokuTransaction in migrate function | Remove TokuTransaction in migrate function
| Python | apache-2.0 | hmoco/osf.io,samchrisinger/osf.io,hmoco/osf.io,icereval/osf.io,caneruguz/osf.io,cwisecarver/osf.io,chrisseto/osf.io,erinspace/osf.io,SSJohns/osf.io,monikagrabowska/osf.io,crcresearch/osf.io,crcresearch/osf.io,laurenrevere/osf.io,leb2dg/osf.io,crcresearch/osf.io,baylee-d/osf.io,leb2dg/osf.io,saradbowman/osf.io,sloria/os... | import logging
import sys
from modularodm import Q
from framework.transactions.context import TokuTransaction
from website.app import init_app
from website.models import NodeLog
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def get_targets():
return NodeLog.find(Q('action', 'eq'... | import logging
import sys
from modularodm import Q
from framework.transactions.context import TokuTransaction
from website.app import init_app
from website.models import NodeLog
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def get_targets():
return NodeLog.find(Q('action', 'eq'... | <commit_before>import logging
import sys
from modularodm import Q
from framework.transactions.context import TokuTransaction
from website.app import init_app
from website.models import NodeLog
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def get_targets():
return NodeLog.find(Q... | import logging
import sys
from modularodm import Q
from framework.transactions.context import TokuTransaction
from website.app import init_app
from website.models import NodeLog
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def get_targets():
return NodeLog.find(Q('action', 'eq'... | import logging
import sys
from modularodm import Q
from framework.transactions.context import TokuTransaction
from website.app import init_app
from website.models import NodeLog
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def get_targets():
return NodeLog.find(Q('action', 'eq'... | <commit_before>import logging
import sys
from modularodm import Q
from framework.transactions.context import TokuTransaction
from website.app import init_app
from website.models import NodeLog
from scripts import utils as script_utils
logger = logging.getLogger(__name__)
def get_targets():
return NodeLog.find(Q... |
c69d99ff9c102926d94d8bd2d55c5de40f5e2072 | application/senic/nuimo_hub/subprocess_run.py | application/senic/nuimo_hub/subprocess_run.py | """Provides `subprocess.run()` from Python 3.5+ if available. Otherwise falls back to `subprocess.check_output()`."""
try:
from subprocess import run
except ImportError:
from collections import namedtuple
from subprocess import check_output
def run(args, *, stdin=None, input=None, stdout=None, stderr=N... | """Provides `subprocess.run()` from Python 3.5+ if available. Otherwise falls back to `subprocess.check_output()`."""
try:
from subprocess import run
except ImportError:
from collections import namedtuple
from subprocess import check_output
def run(args, *, stdin=None, input=None, stdout=None, stderr=N... | Remove parameters that are not supported | Remove parameters that are not supported
Apparently Python 3.4 doesn't have encoding and errors parameters
| Python | mit | grunskis/nuimo-hub-backend,grunskis/senic-hub,grunskis/senic-hub,getsenic/senic-hub,grunskis/senic-hub,grunskis/senic-hub,grunskis/nuimo-hub-backend,grunskis/nuimo-hub-backend,grunskis/senic-hub,getsenic/senic-hub,grunskis/nuimo-hub-backend,grunskis/senic-hub,grunskis/nuimo-hub-backend | """Provides `subprocess.run()` from Python 3.5+ if available. Otherwise falls back to `subprocess.check_output()`."""
try:
from subprocess import run
except ImportError:
from collections import namedtuple
from subprocess import check_output
def run(args, *, stdin=None, input=None, stdout=None, stderr=N... | """Provides `subprocess.run()` from Python 3.5+ if available. Otherwise falls back to `subprocess.check_output()`."""
try:
from subprocess import run
except ImportError:
from collections import namedtuple
from subprocess import check_output
def run(args, *, stdin=None, input=None, stdout=None, stderr=N... | <commit_before>"""Provides `subprocess.run()` from Python 3.5+ if available. Otherwise falls back to `subprocess.check_output()`."""
try:
from subprocess import run
except ImportError:
from collections import namedtuple
from subprocess import check_output
def run(args, *, stdin=None, input=None, stdout... | """Provides `subprocess.run()` from Python 3.5+ if available. Otherwise falls back to `subprocess.check_output()`."""
try:
from subprocess import run
except ImportError:
from collections import namedtuple
from subprocess import check_output
def run(args, *, stdin=None, input=None, stdout=None, stderr=N... | """Provides `subprocess.run()` from Python 3.5+ if available. Otherwise falls back to `subprocess.check_output()`."""
try:
from subprocess import run
except ImportError:
from collections import namedtuple
from subprocess import check_output
def run(args, *, stdin=None, input=None, stdout=None, stderr=N... | <commit_before>"""Provides `subprocess.run()` from Python 3.5+ if available. Otherwise falls back to `subprocess.check_output()`."""
try:
from subprocess import run
except ImportError:
from collections import namedtuple
from subprocess import check_output
def run(args, *, stdin=None, input=None, stdout... |
7894b066cde13eca75479921531e9d005970e9c3 | go/billing/views.py | go/billing/views.py | # Create your views here.
| import os
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from django.template import RequestContext, loader
from xhtml2pdf import pisa
from go.billing.models import Statement
@login_requi... | Add basic PDF view for billing | Add basic PDF view for billing
| Python | bsd-3-clause | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | # Create your views here.
Add basic PDF view for billing | import os
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from django.template import RequestContext, loader
from xhtml2pdf import pisa
from go.billing.models import Statement
@login_requi... | <commit_before># Create your views here.
<commit_msg>Add basic PDF view for billing<commit_after> | import os
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from django.template import RequestContext, loader
from xhtml2pdf import pisa
from go.billing.models import Statement
@login_requi... | # Create your views here.
Add basic PDF view for billingimport os
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from django.template import RequestContext, loader
from xhtml2pdf import pisa
... | <commit_before># Create your views here.
<commit_msg>Add basic PDF view for billing<commit_after>import os
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from django.template import RequestCo... |
a3b6aa273900c9d9c98a6ad9c9735a323086c64f | user_clipboard/urls.py | user_clipboard/urls.py | from django.conf.urls import url
from .views import ClipboardFileAPIView, ClipboardImageAPIView
urlpatterns = [
url(r'^images/(?P<pk>\d+)/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^images/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^(?P<pk>\d+)$', Clipbo... | from django.conf.urls import url
from .views import ClipboardFileAPIView, ClipboardImageAPIView
urlpatterns = [
url(r'^images/(?P<pk>\d+)/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^images/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^(?P<pk>\d+)$', Clipbo... | Fix clipboard URLs to not be greedy | Fix clipboard URLs to not be greedy
| Python | mit | MagicSolutions/django-user-clipboard,IndustriaTech/django-user-clipboard,MagicSolutions/django-user-clipboard,IndustriaTech/django-user-clipboard | from django.conf.urls import url
from .views import ClipboardFileAPIView, ClipboardImageAPIView
urlpatterns = [
url(r'^images/(?P<pk>\d+)/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^images/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^(?P<pk>\d+)$', Clipbo... | from django.conf.urls import url
from .views import ClipboardFileAPIView, ClipboardImageAPIView
urlpatterns = [
url(r'^images/(?P<pk>\d+)/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^images/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^(?P<pk>\d+)$', Clipbo... | <commit_before>from django.conf.urls import url
from .views import ClipboardFileAPIView, ClipboardImageAPIView
urlpatterns = [
url(r'^images/(?P<pk>\d+)/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^images/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^(?P<pk... | from django.conf.urls import url
from .views import ClipboardFileAPIView, ClipboardImageAPIView
urlpatterns = [
url(r'^images/(?P<pk>\d+)/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^images/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^(?P<pk>\d+)$', Clipbo... | from django.conf.urls import url
from .views import ClipboardFileAPIView, ClipboardImageAPIView
urlpatterns = [
url(r'^images/(?P<pk>\d+)/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^images/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^(?P<pk>\d+)$', Clipbo... | <commit_before>from django.conf.urls import url
from .views import ClipboardFileAPIView, ClipboardImageAPIView
urlpatterns = [
url(r'^images/(?P<pk>\d+)/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^images/$', ClipboardImageAPIView.as_view(), name="clipboard_images"),
url(r'^(?P<pk... |
9a1a05c33258461c5d474b014654464892cd7b90 | bake/bakedefaults.py | bake/bakedefaults.py | #!/usr/bin/env python
LABEL_KEY = 'label'
KEY_START = '@'
KEY_END = '@'
CFGFILE = 'bake.cfg'
| #!/usr/bin/env python
LABEL_KEY = 'label'
KEY_START = '@'
KEY_END = '@'
| Remove mention of bake.cfg file | Remove mention of bake.cfg file
| Python | mit | AlexSzatmary/bake | #!/usr/bin/env python
LABEL_KEY = 'label'
KEY_START = '@'
KEY_END = '@'
CFGFILE = 'bake.cfg'
Remove mention of bake.cfg file | #!/usr/bin/env python
LABEL_KEY = 'label'
KEY_START = '@'
KEY_END = '@'
| <commit_before>#!/usr/bin/env python
LABEL_KEY = 'label'
KEY_START = '@'
KEY_END = '@'
CFGFILE = 'bake.cfg'
<commit_msg>Remove mention of bake.cfg file<commit_after> | #!/usr/bin/env python
LABEL_KEY = 'label'
KEY_START = '@'
KEY_END = '@'
| #!/usr/bin/env python
LABEL_KEY = 'label'
KEY_START = '@'
KEY_END = '@'
CFGFILE = 'bake.cfg'
Remove mention of bake.cfg file#!/usr/bin/env python
LABEL_KEY = 'label'
KEY_START = '@'
KEY_END = '@'
| <commit_before>#!/usr/bin/env python
LABEL_KEY = 'label'
KEY_START = '@'
KEY_END = '@'
CFGFILE = 'bake.cfg'
<commit_msg>Remove mention of bake.cfg file<commit_after>#!/usr/bin/env python
LABEL_KEY = 'label'
KEY_START = '@'
KEY_END = '@'
|
c859416d2d35aab83fc9e8f400e00f8f07c0b8a9 | test/parser_test.py | test/parser_test.py | import socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(("localhost", 5002))
with open("resources/Matrix.java", "r") as java_file:
source = java_file.read() + "\nEOS_BITSHIFT"
client_socket.send("%d\n%s" % (len(source), source));
data = ''
while True:
data = ... | import socket, sys
file_name = 'resources/<name>.c'
server_socket_number = 5001
if __name__ == '__main__':
if len(sys.argv) == 1:
print "Please input a parser to test."
elif len(sys.argv) > 2:
print "Too many arguments."
else:
if sys.argv[1] == 'c':
pass
elif... | Change test file to support different parsers | Change test file to support different parsers
| Python | mit | earwig/bitshift,earwig/bitshift,earwig/bitshift,earwig/bitshift,earwig/bitshift,earwig/bitshift | import socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(("localhost", 5002))
with open("resources/Matrix.java", "r") as java_file:
source = java_file.read() + "\nEOS_BITSHIFT"
client_socket.send("%d\n%s" % (len(source), source));
data = ''
while True:
data = ... | import socket, sys
file_name = 'resources/<name>.c'
server_socket_number = 5001
if __name__ == '__main__':
if len(sys.argv) == 1:
print "Please input a parser to test."
elif len(sys.argv) > 2:
print "Too many arguments."
else:
if sys.argv[1] == 'c':
pass
elif... | <commit_before>import socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(("localhost", 5002))
with open("resources/Matrix.java", "r") as java_file:
source = java_file.read() + "\nEOS_BITSHIFT"
client_socket.send("%d\n%s" % (len(source), source));
data = ''
while Tr... | import socket, sys
file_name = 'resources/<name>.c'
server_socket_number = 5001
if __name__ == '__main__':
if len(sys.argv) == 1:
print "Please input a parser to test."
elif len(sys.argv) > 2:
print "Too many arguments."
else:
if sys.argv[1] == 'c':
pass
elif... | import socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(("localhost", 5002))
with open("resources/Matrix.java", "r") as java_file:
source = java_file.read() + "\nEOS_BITSHIFT"
client_socket.send("%d\n%s" % (len(source), source));
data = ''
while True:
data = ... | <commit_before>import socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(("localhost", 5002))
with open("resources/Matrix.java", "r") as java_file:
source = java_file.read() + "\nEOS_BITSHIFT"
client_socket.send("%d\n%s" % (len(source), source));
data = ''
while Tr... |
6603d277eb84712a907008bad8bc8156ed9bdf40 | setup.py | setup.py | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'DESCRIPTION.rst'),... | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'DESCRIPTION.rst'),... | Fix license MIT to BSD | Fix license MIT to BSD
| Python | bsd-3-clause | graphistry/pygraphistry,kcompher/pygraphistry,graphistry/pygraphistry | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'DESCRIPTION.rst'),... | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'DESCRIPTION.rst'),... | <commit_before>"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'DES... | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'DESCRIPTION.rst'),... | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'DESCRIPTION.rst'),... | <commit_before>"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'DES... |
0db9b203dddefa6576bbcf357453587f05403180 | setup.py | setup.py | #!/usr/bin/env python
# coding=utf-8
from setuptools import setup
setup(
name='alfred-workflow-packager',
version='0.8b',
description='A CLI utility for packaging and exporting Alfred workflows',
url='https://github.com/caleb531/alfred-workflow-packager',
author='Caleb Evans',
author_email='ca... | #!/usr/bin/env python
# coding=utf-8
from setuptools import setup
setup(
name='alfred-workflow-packager',
version='0.9',
description='A CLI utility for packaging and exporting Alfred workflows',
url='https://github.com/caleb531/alfred-workflow-packager',
author='Caleb Evans',
author_email='cal... | Change initial version to 0.9 | Change initial version to 0.9
| Python | mit | caleb531/alfred-workflow-packager | #!/usr/bin/env python
# coding=utf-8
from setuptools import setup
setup(
name='alfred-workflow-packager',
version='0.8b',
description='A CLI utility for packaging and exporting Alfred workflows',
url='https://github.com/caleb531/alfred-workflow-packager',
author='Caleb Evans',
author_email='ca... | #!/usr/bin/env python
# coding=utf-8
from setuptools import setup
setup(
name='alfred-workflow-packager',
version='0.9',
description='A CLI utility for packaging and exporting Alfred workflows',
url='https://github.com/caleb531/alfred-workflow-packager',
author='Caleb Evans',
author_email='cal... | <commit_before>#!/usr/bin/env python
# coding=utf-8
from setuptools import setup
setup(
name='alfred-workflow-packager',
version='0.8b',
description='A CLI utility for packaging and exporting Alfred workflows',
url='https://github.com/caleb531/alfred-workflow-packager',
author='Caleb Evans',
a... | #!/usr/bin/env python
# coding=utf-8
from setuptools import setup
setup(
name='alfred-workflow-packager',
version='0.9',
description='A CLI utility for packaging and exporting Alfred workflows',
url='https://github.com/caleb531/alfred-workflow-packager',
author='Caleb Evans',
author_email='cal... | #!/usr/bin/env python
# coding=utf-8
from setuptools import setup
setup(
name='alfred-workflow-packager',
version='0.8b',
description='A CLI utility for packaging and exporting Alfred workflows',
url='https://github.com/caleb531/alfred-workflow-packager',
author='Caleb Evans',
author_email='ca... | <commit_before>#!/usr/bin/env python
# coding=utf-8
from setuptools import setup
setup(
name='alfred-workflow-packager',
version='0.8b',
description='A CLI utility for packaging and exporting Alfred workflows',
url='https://github.com/caleb531/alfred-workflow-packager',
author='Caleb Evans',
a... |
41de24fa992939d8cf3daf762bd7c3235faeb5d0 | setup.py | setup.py | import os
from setuptools import setup # type: ignore
VERSION = '4.5'
setup(
name='conllu',
packages=["conllu"],
python_requires=">=3.6",
package_data={
"": ["py.typed"]
},
version=VERSION,
license='MIT License',
description='CoNLL-U Parser parses a CoNLL-U formatted string i... | import os
from setuptools import setup # type: ignore
VERSION = '4.5'
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as f:
description = f.read()
setup(
name='conllu',
packages=["conllu"],
python_requires=">=3.6",
package_data={
"": ["py.typed"]
},
version=VERSI... | Make sure file is closed properly. | Make sure file is closed properly.
| Python | mit | EmilStenstrom/conllu | import os
from setuptools import setup # type: ignore
VERSION = '4.5'
setup(
name='conllu',
packages=["conllu"],
python_requires=">=3.6",
package_data={
"": ["py.typed"]
},
version=VERSION,
license='MIT License',
description='CoNLL-U Parser parses a CoNLL-U formatted string i... | import os
from setuptools import setup # type: ignore
VERSION = '4.5'
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as f:
description = f.read()
setup(
name='conllu',
packages=["conllu"],
python_requires=">=3.6",
package_data={
"": ["py.typed"]
},
version=VERSI... | <commit_before>import os
from setuptools import setup # type: ignore
VERSION = '4.5'
setup(
name='conllu',
packages=["conllu"],
python_requires=">=3.6",
package_data={
"": ["py.typed"]
},
version=VERSION,
license='MIT License',
description='CoNLL-U Parser parses a CoNLL-U for... | import os
from setuptools import setup # type: ignore
VERSION = '4.5'
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as f:
description = f.read()
setup(
name='conllu',
packages=["conllu"],
python_requires=">=3.6",
package_data={
"": ["py.typed"]
},
version=VERSI... | import os
from setuptools import setup # type: ignore
VERSION = '4.5'
setup(
name='conllu',
packages=["conllu"],
python_requires=">=3.6",
package_data={
"": ["py.typed"]
},
version=VERSION,
license='MIT License',
description='CoNLL-U Parser parses a CoNLL-U formatted string i... | <commit_before>import os
from setuptools import setup # type: ignore
VERSION = '4.5'
setup(
name='conllu',
packages=["conllu"],
python_requires=">=3.6",
package_data={
"": ["py.typed"]
},
version=VERSION,
license='MIT License',
description='CoNLL-U Parser parses a CoNLL-U for... |
857133125fe5a633f209887b1b739f6f82c80f43 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
setup(
name='learnregex',
version='0.4.2',
description='A pyschool story for lear... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
setup(
name='learnregex',
version='0.4.2',
description='A pyschool story for lear... | Update mininum story version required. | Update mininum story version required.
| Python | mit | sophilabs/learnregex | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
setup(
name='learnregex',
version='0.4.2',
description='A pyschool story for lear... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
setup(
name='learnregex',
version='0.4.2',
description='A pyschool story for lear... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
setup(
name='learnregex',
version='0.4.2',
description='A pyschool... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
setup(
name='learnregex',
version='0.4.2',
description='A pyschool story for lear... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
setup(
name='learnregex',
version='0.4.2',
description='A pyschool story for lear... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
setup(
name='learnregex',
version='0.4.2',
description='A pyschool... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.