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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0483563fd08063e856915099075b203379e61e7c | bejmy/categories/admin.py | bejmy/categories/admin.py | from django.contrib import admin
from bejmy.categories.models import Category
@admin.register(Category)
class CategoryAdmin(admin.ModelAdmin):
list_display = (
'name',
'user',
'transaction_type',
)
list_filter = (
'user',
'transaction_type',
)
search_fields... | from django.contrib import admin
from bejmy.categories.models import Category
from mptt.admin import MPTTModelAdmin
@admin.register(Category)
class CategoryAdmin(MPTTModelAdmin):
list_display = (
'name',
'user',
'transaction_type',
)
list_filter = (
'user',
'trans... | Access to all accounts only for superusers | Access to all accounts only for superusers
| Python | mit | bejmy/backend,bejmy/backend | from django.contrib import admin
from bejmy.categories.models import Category
@admin.register(Category)
class CategoryAdmin(admin.ModelAdmin):
list_display = (
'name',
'user',
'transaction_type',
)
list_filter = (
'user',
'transaction_type',
)
search_fields... | from django.contrib import admin
from bejmy.categories.models import Category
from mptt.admin import MPTTModelAdmin
@admin.register(Category)
class CategoryAdmin(MPTTModelAdmin):
list_display = (
'name',
'user',
'transaction_type',
)
list_filter = (
'user',
'trans... | <commit_before>from django.contrib import admin
from bejmy.categories.models import Category
@admin.register(Category)
class CategoryAdmin(admin.ModelAdmin):
list_display = (
'name',
'user',
'transaction_type',
)
list_filter = (
'user',
'transaction_type',
)
... | from django.contrib import admin
from bejmy.categories.models import Category
from mptt.admin import MPTTModelAdmin
@admin.register(Category)
class CategoryAdmin(MPTTModelAdmin):
list_display = (
'name',
'user',
'transaction_type',
)
list_filter = (
'user',
'trans... | from django.contrib import admin
from bejmy.categories.models import Category
@admin.register(Category)
class CategoryAdmin(admin.ModelAdmin):
list_display = (
'name',
'user',
'transaction_type',
)
list_filter = (
'user',
'transaction_type',
)
search_fields... | <commit_before>from django.contrib import admin
from bejmy.categories.models import Category
@admin.register(Category)
class CategoryAdmin(admin.ModelAdmin):
list_display = (
'name',
'user',
'transaction_type',
)
list_filter = (
'user',
'transaction_type',
)
... |
c0c7222f4ab1c39dadd78c9bde40d882780ce741 | benchexec/tools/legion.py | benchexec/tools/legion.py | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | Add some files to Legion | Add some files to Legion
| Python | apache-2.0 | ultimate-pa/benchexec,dbeyer/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,sosy-lab/benchexec,dbeyer/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | <commit_before>"""
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the ... | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | <commit_before>"""
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the ... |
4636fc514b0ebf7b16e82cc3eb7de6b69431cd43 | site_analytics.py | site_analytics.py | #!/usr/local/bin/python3.6
# read nginx access log
# parse and get the ip addresses and times
# match ip addresses to geoip
# possibly ignore bots
import re
def get_log_lines(path):
"""Return a list of regex matched log lines from the passed nginx access log path"""
lines = []
with open(path) as f:
r = re... | #!/usr/local/bin/python3.6
# read nginx access log
# parse and get the ip addresses and times
# match ip addresses to geoip
# possibly ignore bots
import re
def get_log_lines(path):
"""Return a list of regex matched log lines from the passed nginx access log path"""
lines = []
with open(path) as f:
... | Fix tab spacing from 2 to 4 spaces | Fix tab spacing from 2 to 4 spaces
| Python | mit | mouhtasi/basic_site_analytics | #!/usr/local/bin/python3.6
# read nginx access log
# parse and get the ip addresses and times
# match ip addresses to geoip
# possibly ignore bots
import re
def get_log_lines(path):
"""Return a list of regex matched log lines from the passed nginx access log path"""
lines = []
with open(path) as f:
r = re... | #!/usr/local/bin/python3.6
# read nginx access log
# parse and get the ip addresses and times
# match ip addresses to geoip
# possibly ignore bots
import re
def get_log_lines(path):
"""Return a list of regex matched log lines from the passed nginx access log path"""
lines = []
with open(path) as f:
... | <commit_before>#!/usr/local/bin/python3.6
# read nginx access log
# parse and get the ip addresses and times
# match ip addresses to geoip
# possibly ignore bots
import re
def get_log_lines(path):
"""Return a list of regex matched log lines from the passed nginx access log path"""
lines = []
with open(path) a... | #!/usr/local/bin/python3.6
# read nginx access log
# parse and get the ip addresses and times
# match ip addresses to geoip
# possibly ignore bots
import re
def get_log_lines(path):
"""Return a list of regex matched log lines from the passed nginx access log path"""
lines = []
with open(path) as f:
... | #!/usr/local/bin/python3.6
# read nginx access log
# parse and get the ip addresses and times
# match ip addresses to geoip
# possibly ignore bots
import re
def get_log_lines(path):
"""Return a list of regex matched log lines from the passed nginx access log path"""
lines = []
with open(path) as f:
r = re... | <commit_before>#!/usr/local/bin/python3.6
# read nginx access log
# parse and get the ip addresses and times
# match ip addresses to geoip
# possibly ignore bots
import re
def get_log_lines(path):
"""Return a list of regex matched log lines from the passed nginx access log path"""
lines = []
with open(path) a... |
2264e4195e873760b922e6d346eb56d8e1ec6e09 | examples/marshmallow/main.py | examples/marshmallow/main.py | import uplink
# Local imports
import github
BASE_URL = "https://api.github.com/"
if __name__ == "__main__":
# Create a client that uses the marshmallow converter
gh = github.GitHub(
base_url=BASE_URL, converter=uplink.MarshmallowConverter()
)
# Get all public repositories
repos = gh.get_... | # Standard library imports
from pprint import pformat
# Local imports
import github
BASE_URL = "https://api.github.com/"
if __name__ == "__main__":
# Create a GitHub API client
gh = github.GitHub(base_url=BASE_URL)
# Get all public repositories
repos = gh.get_repos()
# Shorten to first 10 res... | Remove needless creation of MarshmallowConverter | Remove needless creation of MarshmallowConverter
| Python | mit | prkumar/uplink | import uplink
# Local imports
import github
BASE_URL = "https://api.github.com/"
if __name__ == "__main__":
# Create a client that uses the marshmallow converter
gh = github.GitHub(
base_url=BASE_URL, converter=uplink.MarshmallowConverter()
)
# Get all public repositories
repos = gh.get_... | # Standard library imports
from pprint import pformat
# Local imports
import github
BASE_URL = "https://api.github.com/"
if __name__ == "__main__":
# Create a GitHub API client
gh = github.GitHub(base_url=BASE_URL)
# Get all public repositories
repos = gh.get_repos()
# Shorten to first 10 res... | <commit_before>import uplink
# Local imports
import github
BASE_URL = "https://api.github.com/"
if __name__ == "__main__":
# Create a client that uses the marshmallow converter
gh = github.GitHub(
base_url=BASE_URL, converter=uplink.MarshmallowConverter()
)
# Get all public repositories
... | # Standard library imports
from pprint import pformat
# Local imports
import github
BASE_URL = "https://api.github.com/"
if __name__ == "__main__":
# Create a GitHub API client
gh = github.GitHub(base_url=BASE_URL)
# Get all public repositories
repos = gh.get_repos()
# Shorten to first 10 res... | import uplink
# Local imports
import github
BASE_URL = "https://api.github.com/"
if __name__ == "__main__":
# Create a client that uses the marshmallow converter
gh = github.GitHub(
base_url=BASE_URL, converter=uplink.MarshmallowConverter()
)
# Get all public repositories
repos = gh.get_... | <commit_before>import uplink
# Local imports
import github
BASE_URL = "https://api.github.com/"
if __name__ == "__main__":
# Create a client that uses the marshmallow converter
gh = github.GitHub(
base_url=BASE_URL, converter=uplink.MarshmallowConverter()
)
# Get all public repositories
... |
4a7ef27e895ec0f22890062931a2ed68f17a1398 | BadTranslator.py | BadTranslator.py | from translate import Translator
translator= Translator(to_lang="ru")
translation = translator.translate("Hello, world!")
print translation
| from translate import Translator
import random
langs = ["af", "ach", "ak", "am", "ar", "az", "be", "bem", "bg", "bh", "bn", "br", "bs", "ca", "chr", "ckb", "co", "crs", "cs", "cy", "da", "de", "ee", "el", "en", "eo", "es", "es-419", "et", "eu", "fa", "fi", "fo", "fr", "fy", "ga", "gaa", "gd", "gl", "gn", "gu", "ha", "h... | Add langs list, add random lang | Add langs list, add random lang
Add langs list that includes all supported google translate languages.
Add random language selector.
| Python | mit | powderblock/PyBad-Translator | from translate import Translator
translator= Translator(to_lang="ru")
translation = translator.translate("Hello, world!")
print translation
Add langs list, add random lang
Add langs list that includes all supported google translate languages.
Add random language selector. | from translate import Translator
import random
langs = ["af", "ach", "ak", "am", "ar", "az", "be", "bem", "bg", "bh", "bn", "br", "bs", "ca", "chr", "ckb", "co", "crs", "cs", "cy", "da", "de", "ee", "el", "en", "eo", "es", "es-419", "et", "eu", "fa", "fi", "fo", "fr", "fy", "ga", "gaa", "gd", "gl", "gn", "gu", "ha", "h... | <commit_before>from translate import Translator
translator= Translator(to_lang="ru")
translation = translator.translate("Hello, world!")
print translation
<commit_msg>Add langs list, add random lang
Add langs list that includes all supported google translate languages.
Add random language selector.<commit_after> | from translate import Translator
import random
langs = ["af", "ach", "ak", "am", "ar", "az", "be", "bem", "bg", "bh", "bn", "br", "bs", "ca", "chr", "ckb", "co", "crs", "cs", "cy", "da", "de", "ee", "el", "en", "eo", "es", "es-419", "et", "eu", "fa", "fi", "fo", "fr", "fy", "ga", "gaa", "gd", "gl", "gn", "gu", "ha", "h... | from translate import Translator
translator= Translator(to_lang="ru")
translation = translator.translate("Hello, world!")
print translation
Add langs list, add random lang
Add langs list that includes all supported google translate languages.
Add random language selector.from translate import Translator
import random
... | <commit_before>from translate import Translator
translator= Translator(to_lang="ru")
translation = translator.translate("Hello, world!")
print translation
<commit_msg>Add langs list, add random lang
Add langs list that includes all supported google translate languages.
Add random language selector.<commit_after>from t... |
ed36889bbac47015722d50e0253f72a609203c5e | cellardoor/serializers/msgpack_serializer.py | cellardoor/serializers/msgpack_serializer.py | import msgpack
from datetime import datetime
from . import Serializer
def default_handler(obj):
try:
iterable = iter(obj)
except TypeError:
pass
else:
return list(iterable)
if isinstance(obj, datetime):
return obj.isoformat()
raise ValueError, "Can't pack object of type %s" % type(obj).__name__
c... | import msgpack
from datetime import datetime
import collections
from . import Serializer
def default_handler(obj):
if isinstance(obj, collections.Iterable):
return list(obj)
if isinstance(obj, datetime):
return obj.isoformat()
raise ValueError, "Can't pack object of type %s" % type(obj).__name__
class ... | Use more reliable method of detecting iterables in msgpack serializer | Use more reliable method of detecting iterables in msgpack serializer
| Python | mit | cooper-software/cellardoor | import msgpack
from datetime import datetime
from . import Serializer
def default_handler(obj):
try:
iterable = iter(obj)
except TypeError:
pass
else:
return list(iterable)
if isinstance(obj, datetime):
return obj.isoformat()
raise ValueError, "Can't pack object of type %s" % type(obj).__name__
c... | import msgpack
from datetime import datetime
import collections
from . import Serializer
def default_handler(obj):
if isinstance(obj, collections.Iterable):
return list(obj)
if isinstance(obj, datetime):
return obj.isoformat()
raise ValueError, "Can't pack object of type %s" % type(obj).__name__
class ... | <commit_before>import msgpack
from datetime import datetime
from . import Serializer
def default_handler(obj):
try:
iterable = iter(obj)
except TypeError:
pass
else:
return list(iterable)
if isinstance(obj, datetime):
return obj.isoformat()
raise ValueError, "Can't pack object of type %s" % type(obj)... | import msgpack
from datetime import datetime
import collections
from . import Serializer
def default_handler(obj):
if isinstance(obj, collections.Iterable):
return list(obj)
if isinstance(obj, datetime):
return obj.isoformat()
raise ValueError, "Can't pack object of type %s" % type(obj).__name__
class ... | import msgpack
from datetime import datetime
from . import Serializer
def default_handler(obj):
try:
iterable = iter(obj)
except TypeError:
pass
else:
return list(iterable)
if isinstance(obj, datetime):
return obj.isoformat()
raise ValueError, "Can't pack object of type %s" % type(obj).__name__
c... | <commit_before>import msgpack
from datetime import datetime
from . import Serializer
def default_handler(obj):
try:
iterable = iter(obj)
except TypeError:
pass
else:
return list(iterable)
if isinstance(obj, datetime):
return obj.isoformat()
raise ValueError, "Can't pack object of type %s" % type(obj)... |
215fba180eee818b123e31a15e4b9d6a6a895c79 | scripts/overhead.py | scripts/overhead.py | #!/usr/bin/env python
import sys
if sys.argv.__len__() < 3:
print "Usage : Enter time needed for each portion of the code"
print " % overhead <advance> <exchange> <regrid>"
sys.exit();
a = float(sys.argv[1])
e = float(sys.argv[2])
r = float(sys.argv[3])
o = r + e
print " "
# print "%40s %6.1f%%" % (... | #!/usr/bin/env python
import sys
if sys.argv.__len__() < 3:
print "Usage : Enter time needed for each portion of the code"
print " % overhead <advance> <exchange> <regrid>"
sys.exit();
a = float(sys.argv[1])
e = float(sys.argv[2])
r = float(sys.argv[3])
o = r + e + a
print " "
# print "%40s %6.1f%%"... | Make everything a percentage of the total | Make everything a percentage of the total
| Python | bsd-2-clause | ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw | #!/usr/bin/env python
import sys
if sys.argv.__len__() < 3:
print "Usage : Enter time needed for each portion of the code"
print " % overhead <advance> <exchange> <regrid>"
sys.exit();
a = float(sys.argv[1])
e = float(sys.argv[2])
r = float(sys.argv[3])
o = r + e
print " "
# print "%40s %6.1f%%" % (... | #!/usr/bin/env python
import sys
if sys.argv.__len__() < 3:
print "Usage : Enter time needed for each portion of the code"
print " % overhead <advance> <exchange> <regrid>"
sys.exit();
a = float(sys.argv[1])
e = float(sys.argv[2])
r = float(sys.argv[3])
o = r + e + a
print " "
# print "%40s %6.1f%%"... | <commit_before>#!/usr/bin/env python
import sys
if sys.argv.__len__() < 3:
print "Usage : Enter time needed for each portion of the code"
print " % overhead <advance> <exchange> <regrid>"
sys.exit();
a = float(sys.argv[1])
e = float(sys.argv[2])
r = float(sys.argv[3])
o = r + e
print " "
# print "%4... | #!/usr/bin/env python
import sys
if sys.argv.__len__() < 3:
print "Usage : Enter time needed for each portion of the code"
print " % overhead <advance> <exchange> <regrid>"
sys.exit();
a = float(sys.argv[1])
e = float(sys.argv[2])
r = float(sys.argv[3])
o = r + e + a
print " "
# print "%40s %6.1f%%"... | #!/usr/bin/env python
import sys
if sys.argv.__len__() < 3:
print "Usage : Enter time needed for each portion of the code"
print " % overhead <advance> <exchange> <regrid>"
sys.exit();
a = float(sys.argv[1])
e = float(sys.argv[2])
r = float(sys.argv[3])
o = r + e
print " "
# print "%40s %6.1f%%" % (... | <commit_before>#!/usr/bin/env python
import sys
if sys.argv.__len__() < 3:
print "Usage : Enter time needed for each portion of the code"
print " % overhead <advance> <exchange> <regrid>"
sys.exit();
a = float(sys.argv[1])
e = float(sys.argv[2])
r = float(sys.argv[3])
o = r + e
print " "
# print "%4... |
b4fdec74ac1af2b50ab5c79f6127d87033a9d297 | wagtail/wagtailsearch/signal_handlers.py | wagtail/wagtailsearch/signal_handlers.py | from django.db.models.signals import post_save, post_delete
from django.db import models
from wagtail.wagtailsearch.index import Indexed
from wagtail.wagtailsearch.backends import get_search_backends
def post_save_signal_handler(instance, **kwargs):
for backend in get_search_backends():
backend.add(insta... | from django.db.models.signals import post_save, post_delete
from django.db import models
from wagtail.wagtailsearch.index import Indexed
from wagtail.wagtailsearch.backends import get_search_backends
def post_save_signal_handler(instance, **kwargs):
if instance not in type(instance).get_indexed_objects():
... | Make search signal handlers use get_indexed_objects | Make search signal handlers use get_indexed_objects
| Python | bsd-3-clause | rv816/wagtail,serzans/wagtail,serzans/wagtail,FlipperPA/wagtail,iansprice/wagtail,nrsimha/wagtail,Toshakins/wagtail,kurtrwall/wagtail,jorge-marques/wagtail,stevenewey/wagtail,darith27/wagtail,kaedroho/wagtail,iho/wagtail,WQuanfeng/wagtail,nealtodd/wagtail,quru/wagtail,mikedingjan/wagtail,timorieber/wagtail,timorieber/w... | from django.db.models.signals import post_save, post_delete
from django.db import models
from wagtail.wagtailsearch.index import Indexed
from wagtail.wagtailsearch.backends import get_search_backends
def post_save_signal_handler(instance, **kwargs):
for backend in get_search_backends():
backend.add(insta... | from django.db.models.signals import post_save, post_delete
from django.db import models
from wagtail.wagtailsearch.index import Indexed
from wagtail.wagtailsearch.backends import get_search_backends
def post_save_signal_handler(instance, **kwargs):
if instance not in type(instance).get_indexed_objects():
... | <commit_before>from django.db.models.signals import post_save, post_delete
from django.db import models
from wagtail.wagtailsearch.index import Indexed
from wagtail.wagtailsearch.backends import get_search_backends
def post_save_signal_handler(instance, **kwargs):
for backend in get_search_backends():
ba... | from django.db.models.signals import post_save, post_delete
from django.db import models
from wagtail.wagtailsearch.index import Indexed
from wagtail.wagtailsearch.backends import get_search_backends
def post_save_signal_handler(instance, **kwargs):
if instance not in type(instance).get_indexed_objects():
... | from django.db.models.signals import post_save, post_delete
from django.db import models
from wagtail.wagtailsearch.index import Indexed
from wagtail.wagtailsearch.backends import get_search_backends
def post_save_signal_handler(instance, **kwargs):
for backend in get_search_backends():
backend.add(insta... | <commit_before>from django.db.models.signals import post_save, post_delete
from django.db import models
from wagtail.wagtailsearch.index import Indexed
from wagtail.wagtailsearch.backends import get_search_backends
def post_save_signal_handler(instance, **kwargs):
for backend in get_search_backends():
ba... |
87707340ac82f852937dae546380b5d5327f5bc7 | txlege84/core/views.py | txlege84/core/views.py | from django.views.generic import ListView
from bills.mixins import AllSubjectsMixin
from core.mixins import ConveneTimeMixin
from legislators.mixins import AllLegislatorsMixin, ChambersMixin
from explainers.models import Explainer
from topics.models import Topic
class LandingView(AllSubjectsMixin, AllLegislatorsMix... | from django.views.generic import ListView
from core.mixins import ConveneTimeMixin
from explainers.models import Explainer
from topics.models import Topic
class LandingView(ConveneTimeMixin, ListView):
model = Topic
template_name = 'landing.html'
def get_context_data(self, **kwargs):
context = ... | Remove unneeded mixins from LandingView | Remove unneeded mixins from LandingView
| Python | mit | texastribune/txlege84,texastribune/txlege84,texastribune/txlege84,texastribune/txlege84 | from django.views.generic import ListView
from bills.mixins import AllSubjectsMixin
from core.mixins import ConveneTimeMixin
from legislators.mixins import AllLegislatorsMixin, ChambersMixin
from explainers.models import Explainer
from topics.models import Topic
class LandingView(AllSubjectsMixin, AllLegislatorsMix... | from django.views.generic import ListView
from core.mixins import ConveneTimeMixin
from explainers.models import Explainer
from topics.models import Topic
class LandingView(ConveneTimeMixin, ListView):
model = Topic
template_name = 'landing.html'
def get_context_data(self, **kwargs):
context = ... | <commit_before>from django.views.generic import ListView
from bills.mixins import AllSubjectsMixin
from core.mixins import ConveneTimeMixin
from legislators.mixins import AllLegislatorsMixin, ChambersMixin
from explainers.models import Explainer
from topics.models import Topic
class LandingView(AllSubjectsMixin, Al... | from django.views.generic import ListView
from core.mixins import ConveneTimeMixin
from explainers.models import Explainer
from topics.models import Topic
class LandingView(ConveneTimeMixin, ListView):
model = Topic
template_name = 'landing.html'
def get_context_data(self, **kwargs):
context = ... | from django.views.generic import ListView
from bills.mixins import AllSubjectsMixin
from core.mixins import ConveneTimeMixin
from legislators.mixins import AllLegislatorsMixin, ChambersMixin
from explainers.models import Explainer
from topics.models import Topic
class LandingView(AllSubjectsMixin, AllLegislatorsMix... | <commit_before>from django.views.generic import ListView
from bills.mixins import AllSubjectsMixin
from core.mixins import ConveneTimeMixin
from legislators.mixins import AllLegislatorsMixin, ChambersMixin
from explainers.models import Explainer
from topics.models import Topic
class LandingView(AllSubjectsMixin, Al... |
47d507bdc4dc0ecd54e9956a40741f3b75664ab2 | events/models.py | events/models.py | from django.db import models
# Create your models here.
class Calendar(models.Model):
name = models.CharField(max_length=30, unique=True)
remote_id = models.CharField(max_length=60)
css_class = models.CharField(max_length=10)
def __str__(self):
return self.name
| from django.db import models
# Create your models here.
class Calendar(models.Model):
name = models.CharField(max_length=30, unique=True)
remote_id = models.CharField(max_length=60)
css_class = models.CharField(max_length=10)
def __str__(self):
return self.name
class Meta:
orderin... | Set default ordering of Calendars | Set default ordering of Calendars
| Python | mit | Kromey/fbxnano,Kromey/akwriters,Kromey/akwriters,Kromey/fbxnano,Kromey/akwriters,Kromey/fbxnano,Kromey/akwriters,Kromey/fbxnano | from django.db import models
# Create your models here.
class Calendar(models.Model):
name = models.CharField(max_length=30, unique=True)
remote_id = models.CharField(max_length=60)
css_class = models.CharField(max_length=10)
def __str__(self):
return self.name
Set default ordering of Calenda... | from django.db import models
# Create your models here.
class Calendar(models.Model):
name = models.CharField(max_length=30, unique=True)
remote_id = models.CharField(max_length=60)
css_class = models.CharField(max_length=10)
def __str__(self):
return self.name
class Meta:
orderin... | <commit_before>from django.db import models
# Create your models here.
class Calendar(models.Model):
name = models.CharField(max_length=30, unique=True)
remote_id = models.CharField(max_length=60)
css_class = models.CharField(max_length=10)
def __str__(self):
return self.name
<commit_msg>Set ... | from django.db import models
# Create your models here.
class Calendar(models.Model):
name = models.CharField(max_length=30, unique=True)
remote_id = models.CharField(max_length=60)
css_class = models.CharField(max_length=10)
def __str__(self):
return self.name
class Meta:
orderin... | from django.db import models
# Create your models here.
class Calendar(models.Model):
name = models.CharField(max_length=30, unique=True)
remote_id = models.CharField(max_length=60)
css_class = models.CharField(max_length=10)
def __str__(self):
return self.name
Set default ordering of Calenda... | <commit_before>from django.db import models
# Create your models here.
class Calendar(models.Model):
name = models.CharField(max_length=30, unique=True)
remote_id = models.CharField(max_length=60)
css_class = models.CharField(max_length=10)
def __str__(self):
return self.name
<commit_msg>Set ... |
311c6caae6275cebd820aab9607adefc6b125c92 | utils/celery_worker.py | utils/celery_worker.py | import os
import sys
# Append .. to sys path
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import multiscanner
from celery import Celery
app = Celery('celery_worker', broker='pyamqp://guest@localhost//')
@app.task
def multiscanner_celery(filelist, config=multiscanner.CONFIG):
'''
... | import os
import sys
# Append .. to sys path
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import multiscanner
from celery import Celery
RABBIT_USER = 'guest'
RABBIT_HOST = 'localhost'
app = Celery('celery_worker', broker='pyamqp://%s@%s//' % (RABBIT_USER, RABBIT_HOST))
@app.task
def ... | Move rabbit vars to globals | Move rabbit vars to globals
| Python | mpl-2.0 | mitre/multiscanner,jmlong1027/multiscanner,awest1339/multiscanner,jmlong1027/multiscanner,awest1339/multiscanner,jmlong1027/multiscanner,awest1339/multiscanner,mitre/multiscanner,awest1339/multiscanner,mitre/multiscanner,MITRECND/multiscanner,jmlong1027/multiscanner,MITRECND/multiscanner | import os
import sys
# Append .. to sys path
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import multiscanner
from celery import Celery
app = Celery('celery_worker', broker='pyamqp://guest@localhost//')
@app.task
def multiscanner_celery(filelist, config=multiscanner.CONFIG):
'''
... | import os
import sys
# Append .. to sys path
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import multiscanner
from celery import Celery
RABBIT_USER = 'guest'
RABBIT_HOST = 'localhost'
app = Celery('celery_worker', broker='pyamqp://%s@%s//' % (RABBIT_USER, RABBIT_HOST))
@app.task
def ... | <commit_before>import os
import sys
# Append .. to sys path
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import multiscanner
from celery import Celery
app = Celery('celery_worker', broker='pyamqp://guest@localhost//')
@app.task
def multiscanner_celery(filelist, config=multiscanner.CON... | import os
import sys
# Append .. to sys path
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import multiscanner
from celery import Celery
RABBIT_USER = 'guest'
RABBIT_HOST = 'localhost'
app = Celery('celery_worker', broker='pyamqp://%s@%s//' % (RABBIT_USER, RABBIT_HOST))
@app.task
def ... | import os
import sys
# Append .. to sys path
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import multiscanner
from celery import Celery
app = Celery('celery_worker', broker='pyamqp://guest@localhost//')
@app.task
def multiscanner_celery(filelist, config=multiscanner.CONFIG):
'''
... | <commit_before>import os
import sys
# Append .. to sys path
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import multiscanner
from celery import Celery
app = Celery('celery_worker', broker='pyamqp://guest@localhost//')
@app.task
def multiscanner_celery(filelist, config=multiscanner.CON... |
4c69a59f99fd5f425c31e3fdcbf6e3f78d82d9e4 | vex_via_wrapper.py | vex_via_wrapper.py | import requests
MATCH_LIST_URL = "http://data.vexvia.dwabtech.net/mobile/events/csv"
DIVISION_URL = "http://data.vexvia.dwabtech.net/mobile/{}/divisions/csv"
MATCH_URL = "http://data.vexvia.dwabtech.net/mobile/{}/{}/matches/csv"
def get_events(iq=False):
data = requests.get(MATCH_LIST_URL).text.split("\r\n")[1:-1... | import requests
MATCH_LIST_URL = "http://data.vexvia.dwabtech.net/mobile/events/csv"
DIVISION_URL = "http://data.vexvia.dwabtech.net/mobile/{}/divisions/csv"
MATCH_URL = "http://data.vexvia.dwabtech.net/mobile/{}/{}/matches/csv"
def get_events(is_iq: bool=False) -> list:
"""Get a list of iq events or edr events.
... | Add comments to vex via wrapper | Add comments to vex via wrapper
| Python | mit | DLProgram/Project_Snake_Sort,DLProgram/Project_Snake_Sort | import requests
MATCH_LIST_URL = "http://data.vexvia.dwabtech.net/mobile/events/csv"
DIVISION_URL = "http://data.vexvia.dwabtech.net/mobile/{}/divisions/csv"
MATCH_URL = "http://data.vexvia.dwabtech.net/mobile/{}/{}/matches/csv"
def get_events(iq=False):
data = requests.get(MATCH_LIST_URL).text.split("\r\n")[1:-1... | import requests
MATCH_LIST_URL = "http://data.vexvia.dwabtech.net/mobile/events/csv"
DIVISION_URL = "http://data.vexvia.dwabtech.net/mobile/{}/divisions/csv"
MATCH_URL = "http://data.vexvia.dwabtech.net/mobile/{}/{}/matches/csv"
def get_events(is_iq: bool=False) -> list:
"""Get a list of iq events or edr events.
... | <commit_before>import requests
MATCH_LIST_URL = "http://data.vexvia.dwabtech.net/mobile/events/csv"
DIVISION_URL = "http://data.vexvia.dwabtech.net/mobile/{}/divisions/csv"
MATCH_URL = "http://data.vexvia.dwabtech.net/mobile/{}/{}/matches/csv"
def get_events(iq=False):
data = requests.get(MATCH_LIST_URL).text.spl... | import requests
MATCH_LIST_URL = "http://data.vexvia.dwabtech.net/mobile/events/csv"
DIVISION_URL = "http://data.vexvia.dwabtech.net/mobile/{}/divisions/csv"
MATCH_URL = "http://data.vexvia.dwabtech.net/mobile/{}/{}/matches/csv"
def get_events(is_iq: bool=False) -> list:
"""Get a list of iq events or edr events.
... | import requests
MATCH_LIST_URL = "http://data.vexvia.dwabtech.net/mobile/events/csv"
DIVISION_URL = "http://data.vexvia.dwabtech.net/mobile/{}/divisions/csv"
MATCH_URL = "http://data.vexvia.dwabtech.net/mobile/{}/{}/matches/csv"
def get_events(iq=False):
data = requests.get(MATCH_LIST_URL).text.split("\r\n")[1:-1... | <commit_before>import requests
MATCH_LIST_URL = "http://data.vexvia.dwabtech.net/mobile/events/csv"
DIVISION_URL = "http://data.vexvia.dwabtech.net/mobile/{}/divisions/csv"
MATCH_URL = "http://data.vexvia.dwabtech.net/mobile/{}/{}/matches/csv"
def get_events(iq=False):
data = requests.get(MATCH_LIST_URL).text.spl... |
f9d17e97115d914c9ed231630d01a6d724378f15 | zou/app/blueprints/source/csv/persons.py | zou/app/blueprints/source/csv/persons.py | from zou.app.blueprints.source.csv.base import BaseCsvImportResource
from zou.app.models.person import Person
from zou.app.utils import auth, permissions
from sqlalchemy.exc import IntegrityError
class PersonsCsvImportResource(BaseCsvImportResource):
def check_permissions(self):
return permissions.chec... | from zou.app.blueprints.source.csv.base import BaseCsvImportResource
from zou.app.models.person import Person
from zou.app.utils import auth, permissions
from sqlalchemy.exc import IntegrityError
class PersonsCsvImportResource(BaseCsvImportResource):
def check_permissions(self):
return permissions.chec... | Allow to import roles when importing people | Allow to import roles when importing people
| Python | agpl-3.0 | cgwire/zou | from zou.app.blueprints.source.csv.base import BaseCsvImportResource
from zou.app.models.person import Person
from zou.app.utils import auth, permissions
from sqlalchemy.exc import IntegrityError
class PersonsCsvImportResource(BaseCsvImportResource):
def check_permissions(self):
return permissions.chec... | from zou.app.blueprints.source.csv.base import BaseCsvImportResource
from zou.app.models.person import Person
from zou.app.utils import auth, permissions
from sqlalchemy.exc import IntegrityError
class PersonsCsvImportResource(BaseCsvImportResource):
def check_permissions(self):
return permissions.chec... | <commit_before>from zou.app.blueprints.source.csv.base import BaseCsvImportResource
from zou.app.models.person import Person
from zou.app.utils import auth, permissions
from sqlalchemy.exc import IntegrityError
class PersonsCsvImportResource(BaseCsvImportResource):
def check_permissions(self):
return p... | from zou.app.blueprints.source.csv.base import BaseCsvImportResource
from zou.app.models.person import Person
from zou.app.utils import auth, permissions
from sqlalchemy.exc import IntegrityError
class PersonsCsvImportResource(BaseCsvImportResource):
def check_permissions(self):
return permissions.chec... | from zou.app.blueprints.source.csv.base import BaseCsvImportResource
from zou.app.models.person import Person
from zou.app.utils import auth, permissions
from sqlalchemy.exc import IntegrityError
class PersonsCsvImportResource(BaseCsvImportResource):
def check_permissions(self):
return permissions.chec... | <commit_before>from zou.app.blueprints.source.csv.base import BaseCsvImportResource
from zou.app.models.person import Person
from zou.app.utils import auth, permissions
from sqlalchemy.exc import IntegrityError
class PersonsCsvImportResource(BaseCsvImportResource):
def check_permissions(self):
return p... |
f47c5e3d5ef32f1d02b78c1de9737c26754404b2 | src/main/webapp/AMI-Scripts/ubuntu-init.py | src/main/webapp/AMI-Scripts/ubuntu-init.py | #!/usr/bin/python
import os
import httplib
import string
# To install run:
# sudo wget http://$JENKINS_URL/plugin/ec2/AMI-Scripts/ubuntu-init.py -O /usr/bin/userdata
# sudo chmod +x /etc/init.d/userdata
# add the following line to /etc/rc.local "python /usr/bin/userdata"
# If java is installed it will be zero
# If ja... | #!/usr/bin/python
import os
import httplib
import string
# To install run:
# sudo wget http://$JENKINS_URL/plugin/ec2/AMI-Scripts/ubuntu-init.py -O /usr/bin/userdata
# sudo chmod +x /etc/init.d/userdata
# add the following line to /etc/rc.local "python /usr/bin/userdata"
# If java is installed it will be zero
# If ja... | Fix trailing spaces/tabs in Python code | Fix trailing spaces/tabs in Python code
| Python | mit | mkozell/ec2-plugin,jenkinsci/ec2-plugin,jenkinsci/ec2-plugin,jenkinsci/ec2-plugin,jenkinsci/ec2-plugin,mkozell/ec2-plugin,mkozell/ec2-plugin,mkozell/ec2-plugin | #!/usr/bin/python
import os
import httplib
import string
# To install run:
# sudo wget http://$JENKINS_URL/plugin/ec2/AMI-Scripts/ubuntu-init.py -O /usr/bin/userdata
# sudo chmod +x /etc/init.d/userdata
# add the following line to /etc/rc.local "python /usr/bin/userdata"
# If java is installed it will be zero
# If ja... | #!/usr/bin/python
import os
import httplib
import string
# To install run:
# sudo wget http://$JENKINS_URL/plugin/ec2/AMI-Scripts/ubuntu-init.py -O /usr/bin/userdata
# sudo chmod +x /etc/init.d/userdata
# add the following line to /etc/rc.local "python /usr/bin/userdata"
# If java is installed it will be zero
# If ja... | <commit_before>#!/usr/bin/python
import os
import httplib
import string
# To install run:
# sudo wget http://$JENKINS_URL/plugin/ec2/AMI-Scripts/ubuntu-init.py -O /usr/bin/userdata
# sudo chmod +x /etc/init.d/userdata
# add the following line to /etc/rc.local "python /usr/bin/userdata"
# If java is installed it will ... | #!/usr/bin/python
import os
import httplib
import string
# To install run:
# sudo wget http://$JENKINS_URL/plugin/ec2/AMI-Scripts/ubuntu-init.py -O /usr/bin/userdata
# sudo chmod +x /etc/init.d/userdata
# add the following line to /etc/rc.local "python /usr/bin/userdata"
# If java is installed it will be zero
# If ja... | #!/usr/bin/python
import os
import httplib
import string
# To install run:
# sudo wget http://$JENKINS_URL/plugin/ec2/AMI-Scripts/ubuntu-init.py -O /usr/bin/userdata
# sudo chmod +x /etc/init.d/userdata
# add the following line to /etc/rc.local "python /usr/bin/userdata"
# If java is installed it will be zero
# If ja... | <commit_before>#!/usr/bin/python
import os
import httplib
import string
# To install run:
# sudo wget http://$JENKINS_URL/plugin/ec2/AMI-Scripts/ubuntu-init.py -O /usr/bin/userdata
# sudo chmod +x /etc/init.d/userdata
# add the following line to /etc/rc.local "python /usr/bin/userdata"
# If java is installed it will ... |
6a71271ed00ba164cf2755f728f0dbf2ed310f6b | zsi/setup.py | zsi/setup.py | #! /usr/bin/env python
# $Header$
import sys
from distutils.core import setup
_url = "http://www.zolera.com/resources/opensrc/zsi"
import ConfigParser
cf = ConfigParser.ConfigParser()
cf.read('setup.cfg')
_version = "%d.%d" % \
( cf.getint('version', 'major'), cf.getint('version', 'minor') )
try:
open('ZSI/v... | #! /usr/bin/env python
# $Header$
import sys
from distutils.core import setup
_url = "http://pywebsvcs.sf.net/"
import ConfigParser
cf = ConfigParser.ConfigParser()
cf.read('setup.cfg')
_version = "%d.%d" % \
( cf.getint('version', 'major'), cf.getint('version', 'minor') )
try:
open('ZSI/version.py', 'r').cl... | Change URL from Zolera (sob, snif, sigh :) to SF | Change URL from Zolera (sob, snif, sigh :) to SF
git-svn-id: c4afb4e777bcbfe9afa898413b708b5abcd43877@123 7150bf37-e60d-0410-b93f-83e91ef0e581
| Python | mit | acigna/pywez,acigna/pywez,acigna/pywez | #! /usr/bin/env python
# $Header$
import sys
from distutils.core import setup
_url = "http://www.zolera.com/resources/opensrc/zsi"
import ConfigParser
cf = ConfigParser.ConfigParser()
cf.read('setup.cfg')
_version = "%d.%d" % \
( cf.getint('version', 'major'), cf.getint('version', 'minor') )
try:
open('ZSI/v... | #! /usr/bin/env python
# $Header$
import sys
from distutils.core import setup
_url = "http://pywebsvcs.sf.net/"
import ConfigParser
cf = ConfigParser.ConfigParser()
cf.read('setup.cfg')
_version = "%d.%d" % \
( cf.getint('version', 'major'), cf.getint('version', 'minor') )
try:
open('ZSI/version.py', 'r').cl... | <commit_before>#! /usr/bin/env python
# $Header$
import sys
from distutils.core import setup
_url = "http://www.zolera.com/resources/opensrc/zsi"
import ConfigParser
cf = ConfigParser.ConfigParser()
cf.read('setup.cfg')
_version = "%d.%d" % \
( cf.getint('version', 'major'), cf.getint('version', 'minor') )
try:
... | #! /usr/bin/env python
# $Header$
import sys
from distutils.core import setup
_url = "http://pywebsvcs.sf.net/"
import ConfigParser
cf = ConfigParser.ConfigParser()
cf.read('setup.cfg')
_version = "%d.%d" % \
( cf.getint('version', 'major'), cf.getint('version', 'minor') )
try:
open('ZSI/version.py', 'r').cl... | #! /usr/bin/env python
# $Header$
import sys
from distutils.core import setup
_url = "http://www.zolera.com/resources/opensrc/zsi"
import ConfigParser
cf = ConfigParser.ConfigParser()
cf.read('setup.cfg')
_version = "%d.%d" % \
( cf.getint('version', 'major'), cf.getint('version', 'minor') )
try:
open('ZSI/v... | <commit_before>#! /usr/bin/env python
# $Header$
import sys
from distutils.core import setup
_url = "http://www.zolera.com/resources/opensrc/zsi"
import ConfigParser
cf = ConfigParser.ConfigParser()
cf.read('setup.cfg')
_version = "%d.%d" % \
( cf.getint('version', 'major'), cf.getint('version', 'minor') )
try:
... |
960436b17211a225a729805a528653f2aff675d7 | src/sentry/utils/social_auth.py | src/sentry/utils/social_auth.py | """
sentry.utils.social_auth
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.conf import settings
from social_auth.backends.pipeline.user import create_user
from so... | """
sentry.utils.social_auth
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.conf import settings
from social_auth.backends.pipeline.user import create_user
from so... | Call to create_user fails because django-social-auth module requires 5 parameters now for create_user now. | Call to create_user fails because django-social-auth module requires 5 parameters now for create_user now.
The exception is quietly suppressed in social_auth/backends/__init__.py:143 in the pipeline
stage for this module since TypeErrors in general are try/except in the authenticate()
stage.
It can be repro'd by putt... | Python | bsd-3-clause | BuildingLink/sentry,gg7/sentry,kevinlondon/sentry,zenefits/sentry,ewdurbin/sentry,daevaorn/sentry,looker/sentry,zenefits/sentry,BuildingLink/sentry,1tush/sentry,wujuguang/sentry,ewdurbin/sentry,rdio/sentry,pauloschilling/sentry,songyi199111/sentry,argonemyth/sentry,wong2/sentry,jokey2k/sentry,zenefits/sentry,beeftornad... | """
sentry.utils.social_auth
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.conf import settings
from social_auth.backends.pipeline.user import create_user
from so... | """
sentry.utils.social_auth
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.conf import settings
from social_auth.backends.pipeline.user import create_user
from so... | <commit_before>"""
sentry.utils.social_auth
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.conf import settings
from social_auth.backends.pipeline.user import crea... | """
sentry.utils.social_auth
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.conf import settings
from social_auth.backends.pipeline.user import create_user
from so... | """
sentry.utils.social_auth
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.conf import settings
from social_auth.backends.pipeline.user import create_user
from so... | <commit_before>"""
sentry.utils.social_auth
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.conf import settings
from social_auth.backends.pipeline.user import crea... |
b6941b35f5bb20dbc2c7e05bbf6100bf0879be3f | foyer/tests/test_plugin.py | foyer/tests/test_plugin.py | import pytest
def test_basic_import():
import foyer
assert 'forcefields' in dir(foyer)
import foyer.forcefields.forcefields
| import pytest
import foyer
def test_basic_import():
assert 'forcefields' in dir(foyer)
@pytest.mark.parametrize('ff_name', ['OPLSAA', 'TRAPPE_UA'])
def test_forcefields_exist(ff_name):
ff_name in dir(foyer.forcefields)
def test_load_forcefield():
OPLSAA = foyer.forcefields.get_forcefield(name='oplsaa'... | Update test to check more internals | Update test to check more internals
| Python | mit | mosdef-hub/foyer,iModels/foyer,iModels/foyer,mosdef-hub/foyer | import pytest
def test_basic_import():
import foyer
assert 'forcefields' in dir(foyer)
import foyer.forcefields.forcefields
Update test to check more internals | import pytest
import foyer
def test_basic_import():
assert 'forcefields' in dir(foyer)
@pytest.mark.parametrize('ff_name', ['OPLSAA', 'TRAPPE_UA'])
def test_forcefields_exist(ff_name):
ff_name in dir(foyer.forcefields)
def test_load_forcefield():
OPLSAA = foyer.forcefields.get_forcefield(name='oplsaa'... | <commit_before>import pytest
def test_basic_import():
import foyer
assert 'forcefields' in dir(foyer)
import foyer.forcefields.forcefields
<commit_msg>Update test to check more internals<commit_after> | import pytest
import foyer
def test_basic_import():
assert 'forcefields' in dir(foyer)
@pytest.mark.parametrize('ff_name', ['OPLSAA', 'TRAPPE_UA'])
def test_forcefields_exist(ff_name):
ff_name in dir(foyer.forcefields)
def test_load_forcefield():
OPLSAA = foyer.forcefields.get_forcefield(name='oplsaa'... | import pytest
def test_basic_import():
import foyer
assert 'forcefields' in dir(foyer)
import foyer.forcefields.forcefields
Update test to check more internalsimport pytest
import foyer
def test_basic_import():
assert 'forcefields' in dir(foyer)
@pytest.mark.parametrize('ff_name', ['OPLSAA', 'TRAP... | <commit_before>import pytest
def test_basic_import():
import foyer
assert 'forcefields' in dir(foyer)
import foyer.forcefields.forcefields
<commit_msg>Update test to check more internals<commit_after>import pytest
import foyer
def test_basic_import():
assert 'forcefields' in dir(foyer)
@pytest.mar... |
ec613fe1df31dd65d8a52351a29482b54ce007b3 | skvideo/__init__.py | skvideo/__init__.py | from skvideo.stuff import *
from skvideo.version import __version__
# If you want to use Numpy's testing framerwork, use the following.
# Tests go under directory tests/, benchmarks under directory benchmarks/
from numpy.testing import Tester
test = Tester().test
bench = Tester().bench
| from skvideo.version import __version__
# If you want to use Numpy's testing framerwork, use the following.
# Tests go under directory tests/, benchmarks under directory benchmarks/
from numpy.testing import Tester
test = Tester().test
bench = Tester().bench
| Remove some unused parts of skeleton | Remove some unused parts of skeleton
| Python | bsd-3-clause | aizvorski/scikit-video | from skvideo.stuff import *
from skvideo.version import __version__
# If you want to use Numpy's testing framerwork, use the following.
# Tests go under directory tests/, benchmarks under directory benchmarks/
from numpy.testing import Tester
test = Tester().test
bench = Tester().bench
Remove some unused parts of skel... | from skvideo.version import __version__
# If you want to use Numpy's testing framerwork, use the following.
# Tests go under directory tests/, benchmarks under directory benchmarks/
from numpy.testing import Tester
test = Tester().test
bench = Tester().bench
| <commit_before>from skvideo.stuff import *
from skvideo.version import __version__
# If you want to use Numpy's testing framerwork, use the following.
# Tests go under directory tests/, benchmarks under directory benchmarks/
from numpy.testing import Tester
test = Tester().test
bench = Tester().bench
<commit_msg>Remov... | from skvideo.version import __version__
# If you want to use Numpy's testing framerwork, use the following.
# Tests go under directory tests/, benchmarks under directory benchmarks/
from numpy.testing import Tester
test = Tester().test
bench = Tester().bench
| from skvideo.stuff import *
from skvideo.version import __version__
# If you want to use Numpy's testing framerwork, use the following.
# Tests go under directory tests/, benchmarks under directory benchmarks/
from numpy.testing import Tester
test = Tester().test
bench = Tester().bench
Remove some unused parts of skel... | <commit_before>from skvideo.stuff import *
from skvideo.version import __version__
# If you want to use Numpy's testing framerwork, use the following.
# Tests go under directory tests/, benchmarks under directory benchmarks/
from numpy.testing import Tester
test = Tester().test
bench = Tester().bench
<commit_msg>Remov... |
682010eafe28eed1eeb32ba9d34e213b4f2d7d4b | sourcer/__init__.py | sourcer/__init__.py | from .compiler import ParseResult
from .expressions import (
Alt,
And,
Any,
Backtrack,
Bind,
End,
Expect,
Fail,
ForwardRef,
Left,
List,
Literal,
Not,
Opt,
Or,
Require,
Return,
Right,
Some,
Start,
Struct,
Term,
Transform,
Wh... | from .compiler import ParseResult
from .expressions import (
Alt,
And,
Any,
AnyOf,
Backtrack,
Bind,
End,
Expect,
Fail,
ForwardRef,
Left,
List,
Literal,
Not,
Opt,
Or,
Require,
Return,
Right,
Some,
Start,
Struct,
Term,
Transf... | Add "AnyOf" to public API. | Add "AnyOf" to public API.
| Python | mit | jvs/sourcer | from .compiler import ParseResult
from .expressions import (
Alt,
And,
Any,
Backtrack,
Bind,
End,
Expect,
Fail,
ForwardRef,
Left,
List,
Literal,
Not,
Opt,
Or,
Require,
Return,
Right,
Some,
Start,
Struct,
Term,
Transform,
Wh... | from .compiler import ParseResult
from .expressions import (
Alt,
And,
Any,
AnyOf,
Backtrack,
Bind,
End,
Expect,
Fail,
ForwardRef,
Left,
List,
Literal,
Not,
Opt,
Or,
Require,
Return,
Right,
Some,
Start,
Struct,
Term,
Transf... | <commit_before>from .compiler import ParseResult
from .expressions import (
Alt,
And,
Any,
Backtrack,
Bind,
End,
Expect,
Fail,
ForwardRef,
Left,
List,
Literal,
Not,
Opt,
Or,
Require,
Return,
Right,
Some,
Start,
Struct,
Term,
Tr... | from .compiler import ParseResult
from .expressions import (
Alt,
And,
Any,
AnyOf,
Backtrack,
Bind,
End,
Expect,
Fail,
ForwardRef,
Left,
List,
Literal,
Not,
Opt,
Or,
Require,
Return,
Right,
Some,
Start,
Struct,
Term,
Transf... | from .compiler import ParseResult
from .expressions import (
Alt,
And,
Any,
Backtrack,
Bind,
End,
Expect,
Fail,
ForwardRef,
Left,
List,
Literal,
Not,
Opt,
Or,
Require,
Return,
Right,
Some,
Start,
Struct,
Term,
Transform,
Wh... | <commit_before>from .compiler import ParseResult
from .expressions import (
Alt,
And,
Any,
Backtrack,
Bind,
End,
Expect,
Fail,
ForwardRef,
Left,
List,
Literal,
Not,
Opt,
Or,
Require,
Return,
Right,
Some,
Start,
Struct,
Term,
Tr... |
9e07a21df955b599d27eb8b98b53395fa7170257 | spoj/00005/palin.py | spoj/00005/palin.py | #!/usr/bin/env python3
def next_palindrome(k):
palin = list(k)
n = len(k)
mid = n // 2
# case 1: forward right
just_copy = False
for i in range(mid, n):
mirrored = n - 1 - i
if k[i] < k[mirrored]:
just_copy = True
if just_copy:
palin[i] = palin[mirrored]
# case 2: backward left
if not just_copy:... | #!/usr/bin/env python3
def next_palindrome(k):
palin = list(k)
n = len(k)
mid = n // 2
# case 1: forward right
just_copy = False
for i in range(mid, n):
mirrored = n - 1 - i
if k[i] < k[mirrored]:
just_copy = True
if just_copy:
palin[i] = palin[mirrored]
# case 2: backward left
if not just_copy:... | Fix off-by-1 bug for `mid` | Fix off-by-1 bug for `mid`
- in SPOJ palin
Signed-off-by: Karel Ha <70f8965fdfb04f1fc0e708a55d9e822c449f57d3@gmail.com>
| Python | mit | mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming,mathemage/CompetitiveProgramming | #!/usr/bin/env python3
def next_palindrome(k):
palin = list(k)
n = len(k)
mid = n // 2
# case 1: forward right
just_copy = False
for i in range(mid, n):
mirrored = n - 1 - i
if k[i] < k[mirrored]:
just_copy = True
if just_copy:
palin[i] = palin[mirrored]
# case 2: backward left
if not just_copy:... | #!/usr/bin/env python3
def next_palindrome(k):
palin = list(k)
n = len(k)
mid = n // 2
# case 1: forward right
just_copy = False
for i in range(mid, n):
mirrored = n - 1 - i
if k[i] < k[mirrored]:
just_copy = True
if just_copy:
palin[i] = palin[mirrored]
# case 2: backward left
if not just_copy:... | <commit_before>#!/usr/bin/env python3
def next_palindrome(k):
palin = list(k)
n = len(k)
mid = n // 2
# case 1: forward right
just_copy = False
for i in range(mid, n):
mirrored = n - 1 - i
if k[i] < k[mirrored]:
just_copy = True
if just_copy:
palin[i] = palin[mirrored]
# case 2: backward left
if... | #!/usr/bin/env python3
def next_palindrome(k):
palin = list(k)
n = len(k)
mid = n // 2
# case 1: forward right
just_copy = False
for i in range(mid, n):
mirrored = n - 1 - i
if k[i] < k[mirrored]:
just_copy = True
if just_copy:
palin[i] = palin[mirrored]
# case 2: backward left
if not just_copy:... | #!/usr/bin/env python3
def next_palindrome(k):
palin = list(k)
n = len(k)
mid = n // 2
# case 1: forward right
just_copy = False
for i in range(mid, n):
mirrored = n - 1 - i
if k[i] < k[mirrored]:
just_copy = True
if just_copy:
palin[i] = palin[mirrored]
# case 2: backward left
if not just_copy:... | <commit_before>#!/usr/bin/env python3
def next_palindrome(k):
palin = list(k)
n = len(k)
mid = n // 2
# case 1: forward right
just_copy = False
for i in range(mid, n):
mirrored = n - 1 - i
if k[i] < k[mirrored]:
just_copy = True
if just_copy:
palin[i] = palin[mirrored]
# case 2: backward left
if... |
74d668cb8291822a167d1ddd0fecf7e580375377 | serv/rcompserv/serv.py | serv/rcompserv/serv.py | from aiohttp import web
from . import __version__
class Server:
def __init__(self, host='127.0.0.1', port=8080):
self._host = host
self._port = port
self.app = web.Application()
self.app.router.add_get('/', self.index)
self.known_commands = ['version']
self.app.rou... | import uuid
from datetime import datetime
from aiohttp import web
import redis
from . import __version__
class Server:
def __init__(self, host='127.0.0.1', port=8080):
self._host = host
self._port = port
self.app = web.Application()
self.app.on_startup.append(self.start_redis)
... | Add route for `trivial` (vacuous) command | Add route for `trivial` (vacuous) command
| Python | bsd-3-clause | slivingston/rcomp,slivingston/rcomp,slivingston/rcomp | from aiohttp import web
from . import __version__
class Server:
def __init__(self, host='127.0.0.1', port=8080):
self._host = host
self._port = port
self.app = web.Application()
self.app.router.add_get('/', self.index)
self.known_commands = ['version']
self.app.rou... | import uuid
from datetime import datetime
from aiohttp import web
import redis
from . import __version__
class Server:
def __init__(self, host='127.0.0.1', port=8080):
self._host = host
self._port = port
self.app = web.Application()
self.app.on_startup.append(self.start_redis)
... | <commit_before>from aiohttp import web
from . import __version__
class Server:
def __init__(self, host='127.0.0.1', port=8080):
self._host = host
self._port = port
self.app = web.Application()
self.app.router.add_get('/', self.index)
self.known_commands = ['version']
... | import uuid
from datetime import datetime
from aiohttp import web
import redis
from . import __version__
class Server:
def __init__(self, host='127.0.0.1', port=8080):
self._host = host
self._port = port
self.app = web.Application()
self.app.on_startup.append(self.start_redis)
... | from aiohttp import web
from . import __version__
class Server:
def __init__(self, host='127.0.0.1', port=8080):
self._host = host
self._port = port
self.app = web.Application()
self.app.router.add_get('/', self.index)
self.known_commands = ['version']
self.app.rou... | <commit_before>from aiohttp import web
from . import __version__
class Server:
def __init__(self, host='127.0.0.1', port=8080):
self._host = host
self._port = port
self.app = web.Application()
self.app.router.add_get('/', self.index)
self.known_commands = ['version']
... |
c8100c89298091179c9ad7f84452328e28efaa03 | crawler/CrawlerExample.py | crawler/CrawlerExample.py | __author__ = 'pascal'
from crawler.Crawler import Crawler
from utils.path import RessourceUtil
# _____ _
# | ____|_ ____ _ _ __ ___ _ __ | | ___
# | _| \ \/ / _` | '_ ` _ \| '_ \| |/ _ \
# | |___ > < (_| | | | | | | |_) | | __/
# |_____/_/\_\__,_|_| |_| |_| .__/|_|\___|
# ... | __author__ = 'pascal'
from crawler.Crawler import Crawler
from indexer.indexer import Indexer
from utils.path import RessourceUtil
# _____ _
# | ____|_ ____ _ _ __ ___ _ __ | | ___
# | _| \ \/ / _` | '_ ` _ \| '_ \| |/ _ \
# | |___ > < (_| | | | | | | |_) | | __/
# |_____/_/\_\__,_|_| ... | Add an example for building and printing the index. | Add an example for building and printing the index.
You can find the example inside the CrawlerExample.py.
| Python | cc0-1.0 | pascalweiss/SearchEngine,yveskaufmann/SearchEngine,yveskaufmann/SearchEngine | __author__ = 'pascal'
from crawler.Crawler import Crawler
from utils.path import RessourceUtil
# _____ _
# | ____|_ ____ _ _ __ ___ _ __ | | ___
# | _| \ \/ / _` | '_ ` _ \| '_ \| |/ _ \
# | |___ > < (_| | | | | | | |_) | | __/
# |_____/_/\_\__,_|_| |_| |_| .__/|_|\___|
# ... | __author__ = 'pascal'
from crawler.Crawler import Crawler
from indexer.indexer import Indexer
from utils.path import RessourceUtil
# _____ _
# | ____|_ ____ _ _ __ ___ _ __ | | ___
# | _| \ \/ / _` | '_ ` _ \| '_ \| |/ _ \
# | |___ > < (_| | | | | | | |_) | | __/
# |_____/_/\_\__,_|_| ... | <commit_before>__author__ = 'pascal'
from crawler.Crawler import Crawler
from utils.path import RessourceUtil
# _____ _
# | ____|_ ____ _ _ __ ___ _ __ | | ___
# | _| \ \/ / _` | '_ ` _ \| '_ \| |/ _ \
# | |___ > < (_| | | | | | | |_) | | __/
# |_____/_/\_\__,_|_| |_| |_| .__/|_|\___|
... | __author__ = 'pascal'
from crawler.Crawler import Crawler
from indexer.indexer import Indexer
from utils.path import RessourceUtil
# _____ _
# | ____|_ ____ _ _ __ ___ _ __ | | ___
# | _| \ \/ / _` | '_ ` _ \| '_ \| |/ _ \
# | |___ > < (_| | | | | | | |_) | | __/
# |_____/_/\_\__,_|_| ... | __author__ = 'pascal'
from crawler.Crawler import Crawler
from utils.path import RessourceUtil
# _____ _
# | ____|_ ____ _ _ __ ___ _ __ | | ___
# | _| \ \/ / _` | '_ ` _ \| '_ \| |/ _ \
# | |___ > < (_| | | | | | | |_) | | __/
# |_____/_/\_\__,_|_| |_| |_| .__/|_|\___|
# ... | <commit_before>__author__ = 'pascal'
from crawler.Crawler import Crawler
from utils.path import RessourceUtil
# _____ _
# | ____|_ ____ _ _ __ ___ _ __ | | ___
# | _| \ \/ / _` | '_ ` _ \| '_ \| |/ _ \
# | |___ > < (_| | | | | | | |_) | | __/
# |_____/_/\_\__,_|_| |_| |_| .__/|_|\___|
... |
708b519e066b8d443ed4768293db4517021d68fc | thinglang/__init__.py | thinglang/__init__.py | import os
from thinglang import utils
from thinglang.execution.execution import ExecutionEngine
from thinglang.lexer.lexer import lexer
from thinglang.parser.analyzer import Analyzer
from thinglang.parser.parser import parse
from thinglang.parser.simplifier import Simplifier
BASE_DIR = os.path.join(os.path.dirname(os... | import os
from thinglang import utils
from thinglang.execution.execution import ExecutionEngine
from thinglang.lexer.lexer import lexer
from thinglang.parser.analyzer import Analyzer
from thinglang.parser.parser import parse
from thinglang.parser.simplifier import Simplifier
BASE_DIR = os.path.join(os.path.dirname(os... | Split compiler and execution steps | Split compiler and execution steps
| Python | mit | ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang | import os
from thinglang import utils
from thinglang.execution.execution import ExecutionEngine
from thinglang.lexer.lexer import lexer
from thinglang.parser.analyzer import Analyzer
from thinglang.parser.parser import parse
from thinglang.parser.simplifier import Simplifier
BASE_DIR = os.path.join(os.path.dirname(os... | import os
from thinglang import utils
from thinglang.execution.execution import ExecutionEngine
from thinglang.lexer.lexer import lexer
from thinglang.parser.analyzer import Analyzer
from thinglang.parser.parser import parse
from thinglang.parser.simplifier import Simplifier
BASE_DIR = os.path.join(os.path.dirname(os... | <commit_before>import os
from thinglang import utils
from thinglang.execution.execution import ExecutionEngine
from thinglang.lexer.lexer import lexer
from thinglang.parser.analyzer import Analyzer
from thinglang.parser.parser import parse
from thinglang.parser.simplifier import Simplifier
BASE_DIR = os.path.join(os.... | import os
from thinglang import utils
from thinglang.execution.execution import ExecutionEngine
from thinglang.lexer.lexer import lexer
from thinglang.parser.analyzer import Analyzer
from thinglang.parser.parser import parse
from thinglang.parser.simplifier import Simplifier
BASE_DIR = os.path.join(os.path.dirname(os... | import os
from thinglang import utils
from thinglang.execution.execution import ExecutionEngine
from thinglang.lexer.lexer import lexer
from thinglang.parser.analyzer import Analyzer
from thinglang.parser.parser import parse
from thinglang.parser.simplifier import Simplifier
BASE_DIR = os.path.join(os.path.dirname(os... | <commit_before>import os
from thinglang import utils
from thinglang.execution.execution import ExecutionEngine
from thinglang.lexer.lexer import lexer
from thinglang.parser.analyzer import Analyzer
from thinglang.parser.parser import parse
from thinglang.parser.simplifier import Simplifier
BASE_DIR = os.path.join(os.... |
f7a9f65e68b2fe78a0180acb1b2bef552e9633f3 | media/collector.py | media/collector.py | import feedparser
import pickle
import requests
hub = "http://feeds.feedburner.com/ampparit-politiikka" ## collect from ampparit all politics related sites
feed = feedparser.parse( hub )
stored = []
try:
stored = pickle.load( open( '.history' , 'r' ) )
except:
pass
stored = []
out = open( 'urls.txt' , 'a'... | import feedparser
import pickle
import requests
import sys
hub = "http://feeds.feedburner.com/ampparit-politiikka" ## collect from ampparit all politics related sites
feed = feedparser.parse( hub )
stored = []
path = sys.argv[0]
try:
stored = pickle.load( open( path + '/.history' , 'r' ) )
except:
pass
... | Make path variable working for server side | Make path variable working for server side
| Python | mit | HIIT/digivaalit-2015,HIIT/digivaalit-2015,HIIT/digivaalit-2015 | import feedparser
import pickle
import requests
hub = "http://feeds.feedburner.com/ampparit-politiikka" ## collect from ampparit all politics related sites
feed = feedparser.parse( hub )
stored = []
try:
stored = pickle.load( open( '.history' , 'r' ) )
except:
pass
stored = []
out = open( 'urls.txt' , 'a'... | import feedparser
import pickle
import requests
import sys
hub = "http://feeds.feedburner.com/ampparit-politiikka" ## collect from ampparit all politics related sites
feed = feedparser.parse( hub )
stored = []
path = sys.argv[0]
try:
stored = pickle.load( open( path + '/.history' , 'r' ) )
except:
pass
... | <commit_before>import feedparser
import pickle
import requests
hub = "http://feeds.feedburner.com/ampparit-politiikka" ## collect from ampparit all politics related sites
feed = feedparser.parse( hub )
stored = []
try:
stored = pickle.load( open( '.history' , 'r' ) )
except:
pass
stored = []
out = open( '... | import feedparser
import pickle
import requests
import sys
hub = "http://feeds.feedburner.com/ampparit-politiikka" ## collect from ampparit all politics related sites
feed = feedparser.parse( hub )
stored = []
path = sys.argv[0]
try:
stored = pickle.load( open( path + '/.history' , 'r' ) )
except:
pass
... | import feedparser
import pickle
import requests
hub = "http://feeds.feedburner.com/ampparit-politiikka" ## collect from ampparit all politics related sites
feed = feedparser.parse( hub )
stored = []
try:
stored = pickle.load( open( '.history' , 'r' ) )
except:
pass
stored = []
out = open( 'urls.txt' , 'a'... | <commit_before>import feedparser
import pickle
import requests
hub = "http://feeds.feedburner.com/ampparit-politiikka" ## collect from ampparit all politics related sites
feed = feedparser.parse( hub )
stored = []
try:
stored = pickle.load( open( '.history' , 'r' ) )
except:
pass
stored = []
out = open( '... |
19a8a0e2f85b7ab01cbd3e2dd283e8e1e9b97373 | example/example/tasksapp/run_tasks.py | example/example/tasksapp/run_tasks.py | import time
from dj_experiment.tasks.tasks import longtime_add
if __name__ == '__main__':
result = longtime_add.delay(1, 2)
# at this time, our task is not finished, so it will return False
print 'Task finished? ', result.ready()
print 'Task result: ', result.result
# sleep 10 seconds to ensure th... | import time
from dj_experiment.tasks.tasks import longtime_add, netcdf_save
if __name__ == '__main__':
result = longtime_add.delay(1, 2)
# at this time, our task is not finished, so it will return False
print 'Task finished? ', result.ready()
print 'Task result: ', result.result
# sleep 10 seconds... | Add the use of task to the example app | Add the use of task to the example app
| Python | mit | francbartoli/dj-experiment,francbartoli/dj-experiment | import time
from dj_experiment.tasks.tasks import longtime_add
if __name__ == '__main__':
result = longtime_add.delay(1, 2)
# at this time, our task is not finished, so it will return False
print 'Task finished? ', result.ready()
print 'Task result: ', result.result
# sleep 10 seconds to ensure th... | import time
from dj_experiment.tasks.tasks import longtime_add, netcdf_save
if __name__ == '__main__':
result = longtime_add.delay(1, 2)
# at this time, our task is not finished, so it will return False
print 'Task finished? ', result.ready()
print 'Task result: ', result.result
# sleep 10 seconds... | <commit_before>import time
from dj_experiment.tasks.tasks import longtime_add
if __name__ == '__main__':
result = longtime_add.delay(1, 2)
# at this time, our task is not finished, so it will return False
print 'Task finished? ', result.ready()
print 'Task result: ', result.result
# sleep 10 secon... | import time
from dj_experiment.tasks.tasks import longtime_add, netcdf_save
if __name__ == '__main__':
result = longtime_add.delay(1, 2)
# at this time, our task is not finished, so it will return False
print 'Task finished? ', result.ready()
print 'Task result: ', result.result
# sleep 10 seconds... | import time
from dj_experiment.tasks.tasks import longtime_add
if __name__ == '__main__':
result = longtime_add.delay(1, 2)
# at this time, our task is not finished, so it will return False
print 'Task finished? ', result.ready()
print 'Task result: ', result.result
# sleep 10 seconds to ensure th... | <commit_before>import time
from dj_experiment.tasks.tasks import longtime_add
if __name__ == '__main__':
result = longtime_add.delay(1, 2)
# at this time, our task is not finished, so it will return False
print 'Task finished? ', result.ready()
print 'Task result: ', result.result
# sleep 10 secon... |
332f275b3ac4b93c523b474c94268bac834c180c | memorize/models.py | memorize/models.py | from datetime import datetime, timedelta
import datetime
from django.utils.timezone import utc
from django.db import models
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from .algorithm import interval
class Pra... | from datetime import datetime, timedelta
from django.utils.timezone import utc
from django.db import models
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from .algorithm import interval
class Practice(models.Mo... | Fix datetime usage in memorize model | Fix datetime usage in memorize model
| Python | mit | DummyDivision/Tsune,DummyDivision/Tsune,DummyDivision/Tsune | from datetime import datetime, timedelta
import datetime
from django.utils.timezone import utc
from django.db import models
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from .algorithm import interval
class Pra... | from datetime import datetime, timedelta
from django.utils.timezone import utc
from django.db import models
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from .algorithm import interval
class Practice(models.Mo... | <commit_before>from datetime import datetime, timedelta
import datetime
from django.utils.timezone import utc
from django.db import models
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from .algorithm import inter... | from datetime import datetime, timedelta
from django.utils.timezone import utc
from django.db import models
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from .algorithm import interval
class Practice(models.Mo... | from datetime import datetime, timedelta
import datetime
from django.utils.timezone import utc
from django.db import models
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from .algorithm import interval
class Pra... | <commit_before>from datetime import datetime, timedelta
import datetime
from django.utils.timezone import utc
from django.db import models
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from .algorithm import inter... |
8c7daf1c0e140cb68c425b34eb60d9b001fd7063 | fiduswriter/base/management/commands/jest.py | fiduswriter/base/management/commands/jest.py | from pathlib import Path
import shutil
from subprocess import call
from django.core.management.base import BaseCommand
from django.core.management import call_command
from django.conf import settings
BABEL_CONF = '''
module.exports = {
presets: [
[
'@babel/preset-env',
{
... | from pathlib import Path
import shutil
from subprocess import call
from django.core.management.base import BaseCommand
from django.core.management import call_command
from django.conf import settings
BABEL_CONF = '''
module.exports = {
presets: [
[
'@babel/preset-env',
{
... | Make test suite pass when there are no tests | Make test suite pass when there are no tests
| Python | agpl-3.0 | fiduswriter/fiduswriter,fiduswriter/fiduswriter,fiduswriter/fiduswriter,fiduswriter/fiduswriter | from pathlib import Path
import shutil
from subprocess import call
from django.core.management.base import BaseCommand
from django.core.management import call_command
from django.conf import settings
BABEL_CONF = '''
module.exports = {
presets: [
[
'@babel/preset-env',
{
... | from pathlib import Path
import shutil
from subprocess import call
from django.core.management.base import BaseCommand
from django.core.management import call_command
from django.conf import settings
BABEL_CONF = '''
module.exports = {
presets: [
[
'@babel/preset-env',
{
... | <commit_before>from pathlib import Path
import shutil
from subprocess import call
from django.core.management.base import BaseCommand
from django.core.management import call_command
from django.conf import settings
BABEL_CONF = '''
module.exports = {
presets: [
[
'@babel/preset-env',
... | from pathlib import Path
import shutil
from subprocess import call
from django.core.management.base import BaseCommand
from django.core.management import call_command
from django.conf import settings
BABEL_CONF = '''
module.exports = {
presets: [
[
'@babel/preset-env',
{
... | from pathlib import Path
import shutil
from subprocess import call
from django.core.management.base import BaseCommand
from django.core.management import call_command
from django.conf import settings
BABEL_CONF = '''
module.exports = {
presets: [
[
'@babel/preset-env',
{
... | <commit_before>from pathlib import Path
import shutil
from subprocess import call
from django.core.management.base import BaseCommand
from django.core.management import call_command
from django.conf import settings
BABEL_CONF = '''
module.exports = {
presets: [
[
'@babel/preset-env',
... |
d6500b3d9af37fb2cd0fa14c82f78b165f9d221b | test_framework/test_settings.py | test_framework/test_settings.py | from .settings import * # NOQA
# Django 1.8 still has INSTALLED_APPS as a tuple
INSTALLED_APPS = list(INSTALLED_APPS)
INSTALLED_APPS.append('djoyapp')
| from .settings import * # NOQA
INSTALLED_APPS.append('djoyapp')
| Remove handling of apps tuple, it is always list now | Remove handling of apps tuple, it is always list now
Since Django 1.11, app settings are lists by default
| Python | mit | jamescooke/factory_djoy | from .settings import * # NOQA
# Django 1.8 still has INSTALLED_APPS as a tuple
INSTALLED_APPS = list(INSTALLED_APPS)
INSTALLED_APPS.append('djoyapp')
Remove handling of apps tuple, it is always list now
Since Django 1.11, app settings are lists by default | from .settings import * # NOQA
INSTALLED_APPS.append('djoyapp')
| <commit_before>from .settings import * # NOQA
# Django 1.8 still has INSTALLED_APPS as a tuple
INSTALLED_APPS = list(INSTALLED_APPS)
INSTALLED_APPS.append('djoyapp')
<commit_msg>Remove handling of apps tuple, it is always list now
Since Django 1.11, app settings are lists by default<commit_after> | from .settings import * # NOQA
INSTALLED_APPS.append('djoyapp')
| from .settings import * # NOQA
# Django 1.8 still has INSTALLED_APPS as a tuple
INSTALLED_APPS = list(INSTALLED_APPS)
INSTALLED_APPS.append('djoyapp')
Remove handling of apps tuple, it is always list now
Since Django 1.11, app settings are lists by defaultfrom .settings import * # NOQA
INSTALLED_APPS.append('djo... | <commit_before>from .settings import * # NOQA
# Django 1.8 still has INSTALLED_APPS as a tuple
INSTALLED_APPS = list(INSTALLED_APPS)
INSTALLED_APPS.append('djoyapp')
<commit_msg>Remove handling of apps tuple, it is always list now
Since Django 1.11, app settings are lists by default<commit_after>from .settings impo... |
46af8faf699d893a95ecec402030ef74e07e77ed | recharges/tasks.py | recharges/tasks.py | import requests
from django.conf import settings
from celery.task import Task
from celery.utils.log import get_task_logger
from .models import Account
logger = get_task_logger(__name__)
class Hotsocket_Login(Task):
"""
Task to get the username and password varified then produce a token
"""
name = ... | import requests
from django.conf import settings
from celery.task import Task
from celery.utils.log import get_task_logger
from .models import Account
logger = get_task_logger(__name__)
class Hotsocket_Login(Task):
"""
Task to get the username and password varified then produce a token
"""
name = ... | Update login task to get username from settings | Update login task to get username from settings
| Python | bsd-3-clause | westerncapelabs/gopherairtime,westerncapelabs/gopherairtime | import requests
from django.conf import settings
from celery.task import Task
from celery.utils.log import get_task_logger
from .models import Account
logger = get_task_logger(__name__)
class Hotsocket_Login(Task):
"""
Task to get the username and password varified then produce a token
"""
name = ... | import requests
from django.conf import settings
from celery.task import Task
from celery.utils.log import get_task_logger
from .models import Account
logger = get_task_logger(__name__)
class Hotsocket_Login(Task):
"""
Task to get the username and password varified then produce a token
"""
name = ... | <commit_before>import requests
from django.conf import settings
from celery.task import Task
from celery.utils.log import get_task_logger
from .models import Account
logger = get_task_logger(__name__)
class Hotsocket_Login(Task):
"""
Task to get the username and password varified then produce a token
... | import requests
from django.conf import settings
from celery.task import Task
from celery.utils.log import get_task_logger
from .models import Account
logger = get_task_logger(__name__)
class Hotsocket_Login(Task):
"""
Task to get the username and password varified then produce a token
"""
name = ... | import requests
from django.conf import settings
from celery.task import Task
from celery.utils.log import get_task_logger
from .models import Account
logger = get_task_logger(__name__)
class Hotsocket_Login(Task):
"""
Task to get the username and password varified then produce a token
"""
name = ... | <commit_before>import requests
from django.conf import settings
from celery.task import Task
from celery.utils.log import get_task_logger
from .models import Account
logger = get_task_logger(__name__)
class Hotsocket_Login(Task):
"""
Task to get the username and password varified then produce a token
... |
2932698f81a17204b824763e648cd56dbab5f5b2 | hawkpost/settings/development.py | hawkpost/settings/development.py | from .common import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': "hawkpost_dev",
}
}
# Development App... | from .common import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': "hawkpost_dev",
}
}
# If the DB_HOST w... | Allow overriding database and mail_debug settings | Allow overriding database and mail_debug settings
Using environment variables to override default database connection
and mail_debug settings in development mode. This allows setting
the values needed by the Docker environment.
| Python | mit | whitesmith/hawkpost,whitesmith/hawkpost,whitesmith/hawkpost | from .common import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': "hawkpost_dev",
}
}
# Development App... | from .common import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': "hawkpost_dev",
}
}
# If the DB_HOST w... | <commit_before>from .common import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': "hawkpost_dev",
}
}
# ... | from .common import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': "hawkpost_dev",
}
}
# If the DB_HOST w... | from .common import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': "hawkpost_dev",
}
}
# Development App... | <commit_before>from .common import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': "hawkpost_dev",
}
}
# ... |
aeefef1f80ba92c7900c95c436b61b019d8ffb6a | src/waldur_mastermind/marketplace_openstack/migrations/0011_limit_components.py | src/waldur_mastermind/marketplace_openstack/migrations/0011_limit_components.py | from django.db import migrations
TENANT_TYPE = 'Packages.Template'
LIMIT = 'limit'
def process_components(apps, schema_editor):
OfferingComponent = apps.get_model('marketplace', 'OfferingComponent')
OfferingComponent.objects.filter(offering__type=TENANT_TYPE).update(
billing_type=LIMIT
)
class ... | from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('marketplace_openstack', '0010_split_invoice_items'),
]
| Remove invalid migration script: it has been superceded by 0052_limit_components | Remove invalid migration script: it has been superceded by 0052_limit_components
| Python | mit | opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur | from django.db import migrations
TENANT_TYPE = 'Packages.Template'
LIMIT = 'limit'
def process_components(apps, schema_editor):
OfferingComponent = apps.get_model('marketplace', 'OfferingComponent')
OfferingComponent.objects.filter(offering__type=TENANT_TYPE).update(
billing_type=LIMIT
)
class ... | from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('marketplace_openstack', '0010_split_invoice_items'),
]
| <commit_before>from django.db import migrations
TENANT_TYPE = 'Packages.Template'
LIMIT = 'limit'
def process_components(apps, schema_editor):
OfferingComponent = apps.get_model('marketplace', 'OfferingComponent')
OfferingComponent.objects.filter(offering__type=TENANT_TYPE).update(
billing_type=LIMIT... | from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('marketplace_openstack', '0010_split_invoice_items'),
]
| from django.db import migrations
TENANT_TYPE = 'Packages.Template'
LIMIT = 'limit'
def process_components(apps, schema_editor):
OfferingComponent = apps.get_model('marketplace', 'OfferingComponent')
OfferingComponent.objects.filter(offering__type=TENANT_TYPE).update(
billing_type=LIMIT
)
class ... | <commit_before>from django.db import migrations
TENANT_TYPE = 'Packages.Template'
LIMIT = 'limit'
def process_components(apps, schema_editor):
OfferingComponent = apps.get_model('marketplace', 'OfferingComponent')
OfferingComponent.objects.filter(offering__type=TENANT_TYPE).update(
billing_type=LIMIT... |
353ad2e4d03d5ad5a8c5a1e949e8cd3251c7d85b | holviapi/tests/test_api_idempotent.py | holviapi/tests/test_api_idempotent.py | # -*- coding: utf-8 -*-
import os
import pytest
import holviapi
@pytest.fixture
def connection():
pool = os.environ.get('HOLVI_POOL', None)
key = os.environ.get('HOLVI_KEY', None)
if not pool or not key:
raise RuntimeError("HOLVI_POOL and HOLVI_KEY must be in ENV for these tests")
cnc = holviap... | # -*- coding: utf-8 -*-
import os
import pytest
import holviapi
@pytest.fixture
def connection():
pool = os.environ.get('HOLVI_POOL', None)
key = os.environ.get('HOLVI_KEY', None)
if not pool or not key:
raise RuntimeError("HOLVI_POOL and HOLVI_KEY must be in ENV for these tests")
cnc = holviap... | Test getting invoice by code | Test getting invoice by code
| Python | mit | rambo/python-holviapi,rambo/python-holviapi | # -*- coding: utf-8 -*-
import os
import pytest
import holviapi
@pytest.fixture
def connection():
pool = os.environ.get('HOLVI_POOL', None)
key = os.environ.get('HOLVI_KEY', None)
if not pool or not key:
raise RuntimeError("HOLVI_POOL and HOLVI_KEY must be in ENV for these tests")
cnc = holviap... | # -*- coding: utf-8 -*-
import os
import pytest
import holviapi
@pytest.fixture
def connection():
pool = os.environ.get('HOLVI_POOL', None)
key = os.environ.get('HOLVI_KEY', None)
if not pool or not key:
raise RuntimeError("HOLVI_POOL and HOLVI_KEY must be in ENV for these tests")
cnc = holviap... | <commit_before># -*- coding: utf-8 -*-
import os
import pytest
import holviapi
@pytest.fixture
def connection():
pool = os.environ.get('HOLVI_POOL', None)
key = os.environ.get('HOLVI_KEY', None)
if not pool or not key:
raise RuntimeError("HOLVI_POOL and HOLVI_KEY must be in ENV for these tests")
... | # -*- coding: utf-8 -*-
import os
import pytest
import holviapi
@pytest.fixture
def connection():
pool = os.environ.get('HOLVI_POOL', None)
key = os.environ.get('HOLVI_KEY', None)
if not pool or not key:
raise RuntimeError("HOLVI_POOL and HOLVI_KEY must be in ENV for these tests")
cnc = holviap... | # -*- coding: utf-8 -*-
import os
import pytest
import holviapi
@pytest.fixture
def connection():
pool = os.environ.get('HOLVI_POOL', None)
key = os.environ.get('HOLVI_KEY', None)
if not pool or not key:
raise RuntimeError("HOLVI_POOL and HOLVI_KEY must be in ENV for these tests")
cnc = holviap... | <commit_before># -*- coding: utf-8 -*-
import os
import pytest
import holviapi
@pytest.fixture
def connection():
pool = os.environ.get('HOLVI_POOL', None)
key = os.environ.get('HOLVI_KEY', None)
if not pool or not key:
raise RuntimeError("HOLVI_POOL and HOLVI_KEY must be in ENV for these tests")
... |
745c03d3cc5ae31fb852ba7bfc9d0ad6a9ac4716 | unittests.py | unittests.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import const
import uniformdh
import obfsproxy.network.buffer as obfs_buf
class UniformDHTest( unittest.TestCase ):
def setUp( self ):
weAreServer = True
self.udh = uniformdh.new("A" * const.SHARED_SECRET_LENGTH, weAreServer)
de... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import const
import uniformdh
import obfsproxy.network.buffer as obfs_buf
class UniformDHTest( unittest.TestCase ):
def setUp( self ):
weAreServer = True
self.udh = uniformdh.new("A" * const.SHARED_SECRET_LENGTH, weAreServer)
de... | Add UniformDH unit test to test for invalid HMACs. | Add UniformDH unit test to test for invalid HMACs.
| Python | bsd-3-clause | isislovecruft/scramblesuit,isislovecruft/scramblesuit | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import const
import uniformdh
import obfsproxy.network.buffer as obfs_buf
class UniformDHTest( unittest.TestCase ):
def setUp( self ):
weAreServer = True
self.udh = uniformdh.new("A" * const.SHARED_SECRET_LENGTH, weAreServer)
de... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import const
import uniformdh
import obfsproxy.network.buffer as obfs_buf
class UniformDHTest( unittest.TestCase ):
def setUp( self ):
weAreServer = True
self.udh = uniformdh.new("A" * const.SHARED_SECRET_LENGTH, weAreServer)
de... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import const
import uniformdh
import obfsproxy.network.buffer as obfs_buf
class UniformDHTest( unittest.TestCase ):
def setUp( self ):
weAreServer = True
self.udh = uniformdh.new("A" * const.SHARED_SECRET_LENGTH, weAre... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import const
import uniformdh
import obfsproxy.network.buffer as obfs_buf
class UniformDHTest( unittest.TestCase ):
def setUp( self ):
weAreServer = True
self.udh = uniformdh.new("A" * const.SHARED_SECRET_LENGTH, weAreServer)
de... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import const
import uniformdh
import obfsproxy.network.buffer as obfs_buf
class UniformDHTest( unittest.TestCase ):
def setUp( self ):
weAreServer = True
self.udh = uniformdh.new("A" * const.SHARED_SECRET_LENGTH, weAreServer)
de... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import const
import uniformdh
import obfsproxy.network.buffer as obfs_buf
class UniformDHTest( unittest.TestCase ):
def setUp( self ):
weAreServer = True
self.udh = uniformdh.new("A" * const.SHARED_SECRET_LENGTH, weAre... |
da47bca1bbdffff536d240cafe780533ee79809e | mesh.py | mesh.py | #!/usr/bin/env python3
import os
import shutil
import sys
import readline
import traceback
readline.parse_and_bind('tab: complete')
readline.parse_and_bind('set editing-mode vi')
builtin_cmds = {'cd', 'pwd', 'exit',}
def prompt():
return '%s$ ' % os.getcwd()
def read_command():
line = input(prompt())
re... | #!/usr/bin/env python3
import os
import shutil
import sys
import readline
import traceback
readline.parse_and_bind('tab: complete')
readline.parse_and_bind('set editing-mode vi')
builtin_cmds = {'cd', 'pwd', 'exit',}
def prompt():
return '%s$ ' % os.getcwd()
def read_command():
line = input(prompt())
re... | Handle ctrl-c and ctrl-d properly | Handle ctrl-c and ctrl-d properly
| Python | mit | mmichie/mesh | #!/usr/bin/env python3
import os
import shutil
import sys
import readline
import traceback
readline.parse_and_bind('tab: complete')
readline.parse_and_bind('set editing-mode vi')
builtin_cmds = {'cd', 'pwd', 'exit',}
def prompt():
return '%s$ ' % os.getcwd()
def read_command():
line = input(prompt())
re... | #!/usr/bin/env python3
import os
import shutil
import sys
import readline
import traceback
readline.parse_and_bind('tab: complete')
readline.parse_and_bind('set editing-mode vi')
builtin_cmds = {'cd', 'pwd', 'exit',}
def prompt():
return '%s$ ' % os.getcwd()
def read_command():
line = input(prompt())
re... | <commit_before>#!/usr/bin/env python3
import os
import shutil
import sys
import readline
import traceback
readline.parse_and_bind('tab: complete')
readline.parse_and_bind('set editing-mode vi')
builtin_cmds = {'cd', 'pwd', 'exit',}
def prompt():
return '%s$ ' % os.getcwd()
def read_command():
line = input(p... | #!/usr/bin/env python3
import os
import shutil
import sys
import readline
import traceback
readline.parse_and_bind('tab: complete')
readline.parse_and_bind('set editing-mode vi')
builtin_cmds = {'cd', 'pwd', 'exit',}
def prompt():
return '%s$ ' % os.getcwd()
def read_command():
line = input(prompt())
re... | #!/usr/bin/env python3
import os
import shutil
import sys
import readline
import traceback
readline.parse_and_bind('tab: complete')
readline.parse_and_bind('set editing-mode vi')
builtin_cmds = {'cd', 'pwd', 'exit',}
def prompt():
return '%s$ ' % os.getcwd()
def read_command():
line = input(prompt())
re... | <commit_before>#!/usr/bin/env python3
import os
import shutil
import sys
import readline
import traceback
readline.parse_and_bind('tab: complete')
readline.parse_and_bind('set editing-mode vi')
builtin_cmds = {'cd', 'pwd', 'exit',}
def prompt():
return '%s$ ' % os.getcwd()
def read_command():
line = input(p... |
6c932dc133ca2e6608297a93489e5c57ad73d5c2 | models/fallahi_eval/evidence_sources.py | models/fallahi_eval/evidence_sources.py | from util import pklload
from collections import defaultdict
import indra.tools.assemble_corpus as ac
if __name__ == '__main__':
# Load cached Statements just before going into the model
stmts = pklload('pysb_stmts')
# Start a dictionary for source counts
sources_count = defaultdict(int)
# Count ... | from util import pklload
from collections import defaultdict
import indra.tools.assemble_corpus as ac
if __name__ == '__main__':
# Load cached Statements just before going into the model
stmts = pklload('pysb_stmts')
# Start a dictionary for source counts
sources_count = defaultdict(int)
# Count ... | Fix some things in evidence sources | Fix some things in evidence sources
| Python | bsd-2-clause | johnbachman/belpy,sorgerlab/indra,johnbachman/indra,johnbachman/belpy,sorgerlab/belpy,pvtodorov/indra,bgyori/indra,pvtodorov/indra,pvtodorov/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/belpy,sorgerlab/belpy,pvtodorov/indra,johnbachman/indra,sorgerlab/indra,bgyori/indra,johnbachman/indra,bgyori/indra | from util import pklload
from collections import defaultdict
import indra.tools.assemble_corpus as ac
if __name__ == '__main__':
# Load cached Statements just before going into the model
stmts = pklload('pysb_stmts')
# Start a dictionary for source counts
sources_count = defaultdict(int)
# Count ... | from util import pklload
from collections import defaultdict
import indra.tools.assemble_corpus as ac
if __name__ == '__main__':
# Load cached Statements just before going into the model
stmts = pklload('pysb_stmts')
# Start a dictionary for source counts
sources_count = defaultdict(int)
# Count ... | <commit_before>from util import pklload
from collections import defaultdict
import indra.tools.assemble_corpus as ac
if __name__ == '__main__':
# Load cached Statements just before going into the model
stmts = pklload('pysb_stmts')
# Start a dictionary for source counts
sources_count = defaultdict(in... | from util import pklload
from collections import defaultdict
import indra.tools.assemble_corpus as ac
if __name__ == '__main__':
# Load cached Statements just before going into the model
stmts = pklload('pysb_stmts')
# Start a dictionary for source counts
sources_count = defaultdict(int)
# Count ... | from util import pklload
from collections import defaultdict
import indra.tools.assemble_corpus as ac
if __name__ == '__main__':
# Load cached Statements just before going into the model
stmts = pklload('pysb_stmts')
# Start a dictionary for source counts
sources_count = defaultdict(int)
# Count ... | <commit_before>from util import pklload
from collections import defaultdict
import indra.tools.assemble_corpus as ac
if __name__ == '__main__':
# Load cached Statements just before going into the model
stmts = pklload('pysb_stmts')
# Start a dictionary for source counts
sources_count = defaultdict(in... |
ee485b086e66f6c423e6c9b728d43a6ace071d55 | Lib/test/test_frozen.py | Lib/test/test_frozen.py | # Test the frozen module defined in frozen.c.
from __future__ import with_statement
from test.test_support import captured_stdout, run_unittest
import unittest
import sys, os
class FrozenTests(unittest.TestCase):
def test_frozen(self):
with captured_stdout() as stdout:
try:
im... | # Test the frozen module defined in frozen.c.
from __future__ import with_statement
from test.test_support import captured_stdout, run_unittest
import unittest
import sys, os
class FrozenTests(unittest.TestCase):
def test_frozen(self):
with captured_stdout() as stdout:
try:
im... | Make it possible to run this test stand-alone. | Make it possible to run this test stand-alone.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | # Test the frozen module defined in frozen.c.
from __future__ import with_statement
from test.test_support import captured_stdout, run_unittest
import unittest
import sys, os
class FrozenTests(unittest.TestCase):
def test_frozen(self):
with captured_stdout() as stdout:
try:
im... | # Test the frozen module defined in frozen.c.
from __future__ import with_statement
from test.test_support import captured_stdout, run_unittest
import unittest
import sys, os
class FrozenTests(unittest.TestCase):
def test_frozen(self):
with captured_stdout() as stdout:
try:
im... | <commit_before># Test the frozen module defined in frozen.c.
from __future__ import with_statement
from test.test_support import captured_stdout, run_unittest
import unittest
import sys, os
class FrozenTests(unittest.TestCase):
def test_frozen(self):
with captured_stdout() as stdout:
try:
... | # Test the frozen module defined in frozen.c.
from __future__ import with_statement
from test.test_support import captured_stdout, run_unittest
import unittest
import sys, os
class FrozenTests(unittest.TestCase):
def test_frozen(self):
with captured_stdout() as stdout:
try:
im... | # Test the frozen module defined in frozen.c.
from __future__ import with_statement
from test.test_support import captured_stdout, run_unittest
import unittest
import sys, os
class FrozenTests(unittest.TestCase):
def test_frozen(self):
with captured_stdout() as stdout:
try:
im... | <commit_before># Test the frozen module defined in frozen.c.
from __future__ import with_statement
from test.test_support import captured_stdout, run_unittest
import unittest
import sys, os
class FrozenTests(unittest.TestCase):
def test_frozen(self):
with captured_stdout() as stdout:
try:
... |
61f710b64f32da26bd36c7c95a3f46e4d21c991a | modules/output_statistics.py | modules/output_statistics.py | from pysqlite2 import dbapi2 as sqlite
import sys, os.path
class Statistics:
def __init__(self):
self.total = 0
self.passed = 0
self.failed = 0
def register(self, manager, parser):
manager.register(instance=self, event='input', keyword='stats', callback=self.input, order=65535)... | import sys, os.path
has_sqlite = True
try:
from pysqlite2 import dbapi2 as sqlite
except:
has_sqlite = False
class Statistics:
def __init__(self):
self.total = 0
self.passed = 0
self.failed = 0
def register(self, manager, parser):
manager.register(instance=self, event=... | Check that python-sqlite2 is installed | Check that python-sqlite2 is installed
git-svn-id: ad91b9aa7ba7638d69f912c9f5d012e3326e9f74@147 3942dd89-8c5d-46d7-aeed-044bccf3e60c
| Python | mit | asm0dey/Flexget,gazpachoking/Flexget,vfrc2/Flexget,X-dark/Flexget,ianstalk/Flexget,patsissons/Flexget,tvcsantos/Flexget,ibrahimkarahan/Flexget,Flexget/Flexget,ibrahimkarahan/Flexget,lildadou/Flexget,LynxyssCZ/Flexget,antivirtel/Flexget,drwyrm/Flexget,jawilson/Flexget,offbyone/Flexget,ZefQ/Flexget,thalamus/Flexget,malka... | from pysqlite2 import dbapi2 as sqlite
import sys, os.path
class Statistics:
def __init__(self):
self.total = 0
self.passed = 0
self.failed = 0
def register(self, manager, parser):
manager.register(instance=self, event='input', keyword='stats', callback=self.input, order=65535)... | import sys, os.path
has_sqlite = True
try:
from pysqlite2 import dbapi2 as sqlite
except:
has_sqlite = False
class Statistics:
def __init__(self):
self.total = 0
self.passed = 0
self.failed = 0
def register(self, manager, parser):
manager.register(instance=self, event=... | <commit_before>from pysqlite2 import dbapi2 as sqlite
import sys, os.path
class Statistics:
def __init__(self):
self.total = 0
self.passed = 0
self.failed = 0
def register(self, manager, parser):
manager.register(instance=self, event='input', keyword='stats', callback=self.inpu... | import sys, os.path
has_sqlite = True
try:
from pysqlite2 import dbapi2 as sqlite
except:
has_sqlite = False
class Statistics:
def __init__(self):
self.total = 0
self.passed = 0
self.failed = 0
def register(self, manager, parser):
manager.register(instance=self, event=... | from pysqlite2 import dbapi2 as sqlite
import sys, os.path
class Statistics:
def __init__(self):
self.total = 0
self.passed = 0
self.failed = 0
def register(self, manager, parser):
manager.register(instance=self, event='input', keyword='stats', callback=self.input, order=65535)... | <commit_before>from pysqlite2 import dbapi2 as sqlite
import sys, os.path
class Statistics:
def __init__(self):
self.total = 0
self.passed = 0
self.failed = 0
def register(self, manager, parser):
manager.register(instance=self, event='input', keyword='stats', callback=self.inpu... |
62c5e911689555c62931692e0d6ff87ed7340559 | src/models/split.py | src/models/split.py | # Third-party modules
import numpy as np
import pandas as pd
from sklearn.model_selection import KFold
# Hand-made modules
from .base import BloscpackMixin
KWARGS_READ_CSV = {
"sep": "\t",
"header": 0,
"parse_dates": [0],
"index_col": 0
}
class ValidationSplitHandler(BloscpackMixin):
def __init__... | # Third-party modules
import numpy as np
import pandas as pd
from sklearn.model_selection import KFold
# Hand-made modules
from .base import PathHandlerBase, BloscpackMixin
KWARGS_READ_CSV = {
"sep": "\t",
"header": 0,
"parse_dates": [0],
"index_col": 0
}
KWARGS_TO_CSV = {
"sep": "\t"
}
OBJECTIVE_L... | Adjust to current serialization conditions | Adjust to current serialization conditions
+ blp -> tsv
| Python | mit | gciteam6/xgboost,gciteam6/xgboost | # Third-party modules
import numpy as np
import pandas as pd
from sklearn.model_selection import KFold
# Hand-made modules
from .base import BloscpackMixin
KWARGS_READ_CSV = {
"sep": "\t",
"header": 0,
"parse_dates": [0],
"index_col": 0
}
class ValidationSplitHandler(BloscpackMixin):
def __init__... | # Third-party modules
import numpy as np
import pandas as pd
from sklearn.model_selection import KFold
# Hand-made modules
from .base import PathHandlerBase, BloscpackMixin
KWARGS_READ_CSV = {
"sep": "\t",
"header": 0,
"parse_dates": [0],
"index_col": 0
}
KWARGS_TO_CSV = {
"sep": "\t"
}
OBJECTIVE_L... | <commit_before># Third-party modules
import numpy as np
import pandas as pd
from sklearn.model_selection import KFold
# Hand-made modules
from .base import BloscpackMixin
KWARGS_READ_CSV = {
"sep": "\t",
"header": 0,
"parse_dates": [0],
"index_col": 0
}
class ValidationSplitHandler(BloscpackMixin):
... | # Third-party modules
import numpy as np
import pandas as pd
from sklearn.model_selection import KFold
# Hand-made modules
from .base import PathHandlerBase, BloscpackMixin
KWARGS_READ_CSV = {
"sep": "\t",
"header": 0,
"parse_dates": [0],
"index_col": 0
}
KWARGS_TO_CSV = {
"sep": "\t"
}
OBJECTIVE_L... | # Third-party modules
import numpy as np
import pandas as pd
from sklearn.model_selection import KFold
# Hand-made modules
from .base import BloscpackMixin
KWARGS_READ_CSV = {
"sep": "\t",
"header": 0,
"parse_dates": [0],
"index_col": 0
}
class ValidationSplitHandler(BloscpackMixin):
def __init__... | <commit_before># Third-party modules
import numpy as np
import pandas as pd
from sklearn.model_selection import KFold
# Hand-made modules
from .base import BloscpackMixin
KWARGS_READ_CSV = {
"sep": "\t",
"header": 0,
"parse_dates": [0],
"index_col": 0
}
class ValidationSplitHandler(BloscpackMixin):
... |
47b751c5578d2419eaf1a7bb90c53b46eea80c9f | objectcube/settings.py | objectcube/settings.py | import os
# Database configurations.
DB_HOST = os.environ.get('OBJECTCUBE_DB_HOST', 'localhost')
DB_USER = os.environ.get('OBJECTCUBE_DB_USER', os.environ.get('LOGNAME'))
DB_PORT = int(os.environ.get('OBJECTCUBE_DB_PORT', 5432))
DB_DBNAME = os.environ.get('OBJECTCUBE_DB_NAME', os.environ.get('LOGNAME'))
DB_PASSWORD = ... | import os
# Database configurations.
DB_HOST = os.environ.get('OBJECTCUBE_DB_HOST', 'localhost')
DB_USER = os.environ.get('OBJECTCUBE_DB_USER', os.environ.get('LOGNAME'))
DB_PORT = int(os.environ.get('OBJECTCUBE_DB_PORT', 5432))
DB_DBNAME = os.environ.get('OBJECTCUBE_DB_NAME', os.environ.get('LOGNAME'))
DB_PASSWORD = ... | Correct the Object service after rename of object_service.py file to object.py | Correct the Object service after rename of object_service.py file to object.py
| Python | bsd-2-clause | rudatalab/python-objectcube,rudatalab/python-objectcube,rudatalab/python-objectcube | import os
# Database configurations.
DB_HOST = os.environ.get('OBJECTCUBE_DB_HOST', 'localhost')
DB_USER = os.environ.get('OBJECTCUBE_DB_USER', os.environ.get('LOGNAME'))
DB_PORT = int(os.environ.get('OBJECTCUBE_DB_PORT', 5432))
DB_DBNAME = os.environ.get('OBJECTCUBE_DB_NAME', os.environ.get('LOGNAME'))
DB_PASSWORD = ... | import os
# Database configurations.
DB_HOST = os.environ.get('OBJECTCUBE_DB_HOST', 'localhost')
DB_USER = os.environ.get('OBJECTCUBE_DB_USER', os.environ.get('LOGNAME'))
DB_PORT = int(os.environ.get('OBJECTCUBE_DB_PORT', 5432))
DB_DBNAME = os.environ.get('OBJECTCUBE_DB_NAME', os.environ.get('LOGNAME'))
DB_PASSWORD = ... | <commit_before>import os
# Database configurations.
DB_HOST = os.environ.get('OBJECTCUBE_DB_HOST', 'localhost')
DB_USER = os.environ.get('OBJECTCUBE_DB_USER', os.environ.get('LOGNAME'))
DB_PORT = int(os.environ.get('OBJECTCUBE_DB_PORT', 5432))
DB_DBNAME = os.environ.get('OBJECTCUBE_DB_NAME', os.environ.get('LOGNAME'))... | import os
# Database configurations.
DB_HOST = os.environ.get('OBJECTCUBE_DB_HOST', 'localhost')
DB_USER = os.environ.get('OBJECTCUBE_DB_USER', os.environ.get('LOGNAME'))
DB_PORT = int(os.environ.get('OBJECTCUBE_DB_PORT', 5432))
DB_DBNAME = os.environ.get('OBJECTCUBE_DB_NAME', os.environ.get('LOGNAME'))
DB_PASSWORD = ... | import os
# Database configurations.
DB_HOST = os.environ.get('OBJECTCUBE_DB_HOST', 'localhost')
DB_USER = os.environ.get('OBJECTCUBE_DB_USER', os.environ.get('LOGNAME'))
DB_PORT = int(os.environ.get('OBJECTCUBE_DB_PORT', 5432))
DB_DBNAME = os.environ.get('OBJECTCUBE_DB_NAME', os.environ.get('LOGNAME'))
DB_PASSWORD = ... | <commit_before>import os
# Database configurations.
DB_HOST = os.environ.get('OBJECTCUBE_DB_HOST', 'localhost')
DB_USER = os.environ.get('OBJECTCUBE_DB_USER', os.environ.get('LOGNAME'))
DB_PORT = int(os.environ.get('OBJECTCUBE_DB_PORT', 5432))
DB_DBNAME = os.environ.get('OBJECTCUBE_DB_NAME', os.environ.get('LOGNAME'))... |
f081906482bf080363dd494a6ab0ca6ed63b49f5 | loremipsum/tests/plugs_testpackage/plugin.py | loremipsum/tests/plugs_testpackage/plugin.py | """Test plugin."""
def load(*args, **kwargs):
pass
def dump(*args, **kwargs):
pass
def plugin():
import sys
return (__name__.split('.')[-1], sys.modules.get(__name__))
| """Test plugin.
def load(*args, **kwargs): pass
def dump(*args, **kwargs): pass
def plugin():
return (__name__.split('.')[-1], sys.modules.get(__name__))
"""
| Put useless module function into docstring | Put useless module function into docstring
| Python | bsd-3-clause | monkeython/loremipsum | """Test plugin."""
def load(*args, **kwargs):
pass
def dump(*args, **kwargs):
pass
def plugin():
import sys
return (__name__.split('.')[-1], sys.modules.get(__name__))
Put useless module function into docstring | """Test plugin.
def load(*args, **kwargs): pass
def dump(*args, **kwargs): pass
def plugin():
return (__name__.split('.')[-1], sys.modules.get(__name__))
"""
| <commit_before>"""Test plugin."""
def load(*args, **kwargs):
pass
def dump(*args, **kwargs):
pass
def plugin():
import sys
return (__name__.split('.')[-1], sys.modules.get(__name__))
<commit_msg>Put useless module function into docstring<commit_after> | """Test plugin.
def load(*args, **kwargs): pass
def dump(*args, **kwargs): pass
def plugin():
return (__name__.split('.')[-1], sys.modules.get(__name__))
"""
| """Test plugin."""
def load(*args, **kwargs):
pass
def dump(*args, **kwargs):
pass
def plugin():
import sys
return (__name__.split('.')[-1], sys.modules.get(__name__))
Put useless module function into docstring"""Test plugin.
def load(*args, **kwargs): pass
def dump(*args, **kwargs): pass
de... | <commit_before>"""Test plugin."""
def load(*args, **kwargs):
pass
def dump(*args, **kwargs):
pass
def plugin():
import sys
return (__name__.split('.')[-1], sys.modules.get(__name__))
<commit_msg>Put useless module function into docstring<commit_after>"""Test plugin.
def load(*args, **kwargs): pa... |
28252bbc3c5f784e5f6267788a7f4196473d7292 | tests/conftest.py | tests/conftest.py | # -*- coding: utf-8 -*-
import pytest
from cheetah_lint import five
@pytest.yield_fixture(autouse=True)
def no_warnings(recwarn):
yield
ret = len(tuple(
warning for warning in recwarn
# cheetah raises this warning when compiling a trivial file
if not (
isinstance(warning.m... | # -*- coding: utf-8 -*-
import pytest
from cheetah_lint import five
@pytest.fixture(autouse=True)
def no_warnings(recwarn):
yield
ret = len(tuple(
warning for warning in recwarn
# cheetah raises this warning when compiling a trivial file
if not (
isinstance(warning.message... | Replace deprecated yield_fixture with fixture | Replace deprecated yield_fixture with fixture
Committed via https://github.com/asottile/all-repos
| Python | mit | asottile/cheetah_lint | # -*- coding: utf-8 -*-
import pytest
from cheetah_lint import five
@pytest.yield_fixture(autouse=True)
def no_warnings(recwarn):
yield
ret = len(tuple(
warning for warning in recwarn
# cheetah raises this warning when compiling a trivial file
if not (
isinstance(warning.m... | # -*- coding: utf-8 -*-
import pytest
from cheetah_lint import five
@pytest.fixture(autouse=True)
def no_warnings(recwarn):
yield
ret = len(tuple(
warning for warning in recwarn
# cheetah raises this warning when compiling a trivial file
if not (
isinstance(warning.message... | <commit_before># -*- coding: utf-8 -*-
import pytest
from cheetah_lint import five
@pytest.yield_fixture(autouse=True)
def no_warnings(recwarn):
yield
ret = len(tuple(
warning for warning in recwarn
# cheetah raises this warning when compiling a trivial file
if not (
isins... | # -*- coding: utf-8 -*-
import pytest
from cheetah_lint import five
@pytest.fixture(autouse=True)
def no_warnings(recwarn):
yield
ret = len(tuple(
warning for warning in recwarn
# cheetah raises this warning when compiling a trivial file
if not (
isinstance(warning.message... | # -*- coding: utf-8 -*-
import pytest
from cheetah_lint import five
@pytest.yield_fixture(autouse=True)
def no_warnings(recwarn):
yield
ret = len(tuple(
warning for warning in recwarn
# cheetah raises this warning when compiling a trivial file
if not (
isinstance(warning.m... | <commit_before># -*- coding: utf-8 -*-
import pytest
from cheetah_lint import five
@pytest.yield_fixture(autouse=True)
def no_warnings(recwarn):
yield
ret = len(tuple(
warning for warning in recwarn
# cheetah raises this warning when compiling a trivial file
if not (
isins... |
2551eb35f2d5c5b95952b40c2583468a8deb5565 | pylib/djangoproj/binalerts/tests.py | pylib/djangoproj/binalerts/tests.py | """
Integration-style tests for binalerts. These tests think of things from the web
frontend point of view. They are designed to make sure the application behaves
as required to the user.
"""
# Various tips on testing forms:
# http://stackoverflow.com/questions/2257958/django-unit-testing-for-form-edit
from django.te... | """
Integration-style tests for binalerts. These tests think of things from the web
frontend point of view. They are designed to make sure the application behaves
as required to the user.
"""
# Various tips on testing forms:
# http://stackoverflow.com/questions/2257958/django-unit-testing-for-form-edit
from django.te... | Test for error if not a postcode. | Test for error if not a postcode.
| Python | agpl-3.0 | mysociety/binalerts,mysociety/binalerts,mysociety/binalerts | """
Integration-style tests for binalerts. These tests think of things from the web
frontend point of view. They are designed to make sure the application behaves
as required to the user.
"""
# Various tips on testing forms:
# http://stackoverflow.com/questions/2257958/django-unit-testing-for-form-edit
from django.te... | """
Integration-style tests for binalerts. These tests think of things from the web
frontend point of view. They are designed to make sure the application behaves
as required to the user.
"""
# Various tips on testing forms:
# http://stackoverflow.com/questions/2257958/django-unit-testing-for-form-edit
from django.te... | <commit_before>"""
Integration-style tests for binalerts. These tests think of things from the web
frontend point of view. They are designed to make sure the application behaves
as required to the user.
"""
# Various tips on testing forms:
# http://stackoverflow.com/questions/2257958/django-unit-testing-for-form-edit
... | """
Integration-style tests for binalerts. These tests think of things from the web
frontend point of view. They are designed to make sure the application behaves
as required to the user.
"""
# Various tips on testing forms:
# http://stackoverflow.com/questions/2257958/django-unit-testing-for-form-edit
from django.te... | """
Integration-style tests for binalerts. These tests think of things from the web
frontend point of view. They are designed to make sure the application behaves
as required to the user.
"""
# Various tips on testing forms:
# http://stackoverflow.com/questions/2257958/django-unit-testing-for-form-edit
from django.te... | <commit_before>"""
Integration-style tests for binalerts. These tests think of things from the web
frontend point of view. They are designed to make sure the application behaves
as required to the user.
"""
# Various tips on testing forms:
# http://stackoverflow.com/questions/2257958/django-unit-testing-for-form-edit
... |
f87008f6a8c3d4039ab69b558bae17f6ea006fca | skcode/__init__.py | skcode/__init__.py | """
SkCode (Python implementation of BBcode syntax) parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2015, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.6"
__maintainer__ = "Fabien Batteix"
__email__ = "fabie... | """
SkCode (Python implementation of BBcode syntax) parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2015, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.7"
__maintainer__ = "Fabien Batteix"
__email__ = "fabie... | Upgrade version from 1.0.6 to 1.0.7 | Upgrade version from 1.0.6 to 1.0.7
| Python | agpl-3.0 | TamiaLab/PySkCode | """
SkCode (Python implementation of BBcode syntax) parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2015, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.6"
__maintainer__ = "Fabien Batteix"
__email__ = "fabie... | """
SkCode (Python implementation of BBcode syntax) parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2015, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.7"
__maintainer__ = "Fabien Batteix"
__email__ = "fabie... | <commit_before>"""
SkCode (Python implementation of BBcode syntax) parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2015, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.6"
__maintainer__ = "Fabien Batteix"
__e... | """
SkCode (Python implementation of BBcode syntax) parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2015, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.7"
__maintainer__ = "Fabien Batteix"
__email__ = "fabie... | """
SkCode (Python implementation of BBcode syntax) parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2015, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.6"
__maintainer__ = "Fabien Batteix"
__email__ = "fabie... | <commit_before>"""
SkCode (Python implementation of BBcode syntax) parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2015, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.6"
__maintainer__ = "Fabien Batteix"
__e... |
b740490e49b775809cb99b4cf30e3b7cf259d8f6 | superdesk/io/__init__.py | superdesk/io/__init__.py | """Superdesk IO"""
from abc import ABCMeta, abstractmethod
import superdesk
import logging
from superdesk.celery_app import celery
providers = {}
allowed_providers = []
logger = logging.getLogger(__name__)
from .commands.update_ingest import UpdateIngest
from .commands.add_provider import AddProvider # NOQA
def ... | """Superdesk IO"""
from abc import ABCMeta, abstractmethod
import superdesk
import logging
from superdesk.celery_app import celery
providers = {}
allowed_providers = []
logger = logging.getLogger(__name__)
from .commands.remove_expired_content import RemoveExpiredContent
from .commands.update_ingest import UpdateIn... | Revert "fix(ingest) - disable expired content removal" | Revert "fix(ingest) - disable expired content removal"
This reverts commit 281e051344c9fe8e835941117e2d2068ecdabd87.
| Python | agpl-3.0 | mdhaman/superdesk,akintolga/superdesk-aap,ioanpocol/superdesk-ntb,marwoodandrew/superdesk,marwoodandrew/superdesk-aap,marwoodandrew/superdesk-aap,plamut/superdesk,darconny/superdesk,darconny/superdesk,superdesk/superdesk,amagdas/superdesk,hlmnrmr/superdesk,mdhaman/superdesk-aap,sivakuna-aap/superdesk,liveblog/superdesk... | """Superdesk IO"""
from abc import ABCMeta, abstractmethod
import superdesk
import logging
from superdesk.celery_app import celery
providers = {}
allowed_providers = []
logger = logging.getLogger(__name__)
from .commands.update_ingest import UpdateIngest
from .commands.add_provider import AddProvider # NOQA
def ... | """Superdesk IO"""
from abc import ABCMeta, abstractmethod
import superdesk
import logging
from superdesk.celery_app import celery
providers = {}
allowed_providers = []
logger = logging.getLogger(__name__)
from .commands.remove_expired_content import RemoveExpiredContent
from .commands.update_ingest import UpdateIn... | <commit_before>"""Superdesk IO"""
from abc import ABCMeta, abstractmethod
import superdesk
import logging
from superdesk.celery_app import celery
providers = {}
allowed_providers = []
logger = logging.getLogger(__name__)
from .commands.update_ingest import UpdateIngest
from .commands.add_provider import AddProvider... | """Superdesk IO"""
from abc import ABCMeta, abstractmethod
import superdesk
import logging
from superdesk.celery_app import celery
providers = {}
allowed_providers = []
logger = logging.getLogger(__name__)
from .commands.remove_expired_content import RemoveExpiredContent
from .commands.update_ingest import UpdateIn... | """Superdesk IO"""
from abc import ABCMeta, abstractmethod
import superdesk
import logging
from superdesk.celery_app import celery
providers = {}
allowed_providers = []
logger = logging.getLogger(__name__)
from .commands.update_ingest import UpdateIngest
from .commands.add_provider import AddProvider # NOQA
def ... | <commit_before>"""Superdesk IO"""
from abc import ABCMeta, abstractmethod
import superdesk
import logging
from superdesk.celery_app import celery
providers = {}
allowed_providers = []
logger = logging.getLogger(__name__)
from .commands.update_ingest import UpdateIngest
from .commands.add_provider import AddProvider... |
23075e994d081a90a1b3ed48b7e30b82c4614854 | tests/test_acf.py | tests/test_acf.py | import pytest
from steamfiles import acf
@pytest.yield_fixture
def acf_data():
with open('tests/test_data/appmanifest_202970.acf', 'rt') as f:
yield f.read()
@pytest.mark.usefixtures('acf_data')
def test_loads_dumps(acf_data):
assert acf.dumps(acf.loads(acf_data)) == acf_data
| import io
import pytest
from steamfiles import acf
test_file_name = 'tests/test_data/appmanifest_202970.acf'
@pytest.yield_fixture
def acf_data():
with open(test_file_name, 'rt') as f:
yield f.read()
@pytest.mark.usefixtures('acf_data')
def test_loads_dumps(acf_data):
assert acf.dumps(acf.loads(acf... | Add more tests for ACF format | Add more tests for ACF format
| Python | mit | leovp/steamfiles | import pytest
from steamfiles import acf
@pytest.yield_fixture
def acf_data():
with open('tests/test_data/appmanifest_202970.acf', 'rt') as f:
yield f.read()
@pytest.mark.usefixtures('acf_data')
def test_loads_dumps(acf_data):
assert acf.dumps(acf.loads(acf_data)) == acf_data
Add more tests for ACF ... | import io
import pytest
from steamfiles import acf
test_file_name = 'tests/test_data/appmanifest_202970.acf'
@pytest.yield_fixture
def acf_data():
with open(test_file_name, 'rt') as f:
yield f.read()
@pytest.mark.usefixtures('acf_data')
def test_loads_dumps(acf_data):
assert acf.dumps(acf.loads(acf... | <commit_before>import pytest
from steamfiles import acf
@pytest.yield_fixture
def acf_data():
with open('tests/test_data/appmanifest_202970.acf', 'rt') as f:
yield f.read()
@pytest.mark.usefixtures('acf_data')
def test_loads_dumps(acf_data):
assert acf.dumps(acf.loads(acf_data)) == acf_data
<commit_... | import io
import pytest
from steamfiles import acf
test_file_name = 'tests/test_data/appmanifest_202970.acf'
@pytest.yield_fixture
def acf_data():
with open(test_file_name, 'rt') as f:
yield f.read()
@pytest.mark.usefixtures('acf_data')
def test_loads_dumps(acf_data):
assert acf.dumps(acf.loads(acf... | import pytest
from steamfiles import acf
@pytest.yield_fixture
def acf_data():
with open('tests/test_data/appmanifest_202970.acf', 'rt') as f:
yield f.read()
@pytest.mark.usefixtures('acf_data')
def test_loads_dumps(acf_data):
assert acf.dumps(acf.loads(acf_data)) == acf_data
Add more tests for ACF ... | <commit_before>import pytest
from steamfiles import acf
@pytest.yield_fixture
def acf_data():
with open('tests/test_data/appmanifest_202970.acf', 'rt') as f:
yield f.read()
@pytest.mark.usefixtures('acf_data')
def test_loads_dumps(acf_data):
assert acf.dumps(acf.loads(acf_data)) == acf_data
<commit_... |
3f57221af38a25dceb9d1024c225481ec2f49328 | parchment/views.py | parchment/views.py | from django.conf import settings
from django.views.generic import FormView
from .crypto import Parchment
from .forms import ParchmentForm
class ParchmentView(FormView):
form_class = ParchmentForm
template_name = 'parchment/login.html'
def get_initial(self):
sso_key = getattr(settings, 'PARCHMENT... | from urllib import urlencode
from django.conf import settings
from django.views.generic import FormView
from .crypto import Parchment
from .forms import ParchmentForm
class ParchmentView(FormView):
form_class = ParchmentForm
template_name = 'parchment/login.html'
connect_variables = {}
def get(self... | Encrypt all provided GET parameters | Encrypt all provided GET parameters
| Python | bsd-3-clause | jbittel/django-parchment,jbittel/django-parchment | from django.conf import settings
from django.views.generic import FormView
from .crypto import Parchment
from .forms import ParchmentForm
class ParchmentView(FormView):
form_class = ParchmentForm
template_name = 'parchment/login.html'
def get_initial(self):
sso_key = getattr(settings, 'PARCHMENT... | from urllib import urlencode
from django.conf import settings
from django.views.generic import FormView
from .crypto import Parchment
from .forms import ParchmentForm
class ParchmentView(FormView):
form_class = ParchmentForm
template_name = 'parchment/login.html'
connect_variables = {}
def get(self... | <commit_before>from django.conf import settings
from django.views.generic import FormView
from .crypto import Parchment
from .forms import ParchmentForm
class ParchmentView(FormView):
form_class = ParchmentForm
template_name = 'parchment/login.html'
def get_initial(self):
sso_key = getattr(setti... | from urllib import urlencode
from django.conf import settings
from django.views.generic import FormView
from .crypto import Parchment
from .forms import ParchmentForm
class ParchmentView(FormView):
form_class = ParchmentForm
template_name = 'parchment/login.html'
connect_variables = {}
def get(self... | from django.conf import settings
from django.views.generic import FormView
from .crypto import Parchment
from .forms import ParchmentForm
class ParchmentView(FormView):
form_class = ParchmentForm
template_name = 'parchment/login.html'
def get_initial(self):
sso_key = getattr(settings, 'PARCHMENT... | <commit_before>from django.conf import settings
from django.views.generic import FormView
from .crypto import Parchment
from .forms import ParchmentForm
class ParchmentView(FormView):
form_class = ParchmentForm
template_name = 'parchment/login.html'
def get_initial(self):
sso_key = getattr(setti... |
93ebb6982851a710ff17c856059b1368bed24168 | server.py | server.py | import flask
app = flask.Flask(__name__)
@app.route('/')
def index():
return flask.jsonify(hello='world')
if __name__ == '__main__':
app.run(debug=True)
| import flask
app = flask.Flask(__name__)
def make_tour():
tour = {
'id': 1,
'name': 'Test Tour',
'route': [
{
'description': 'This is a description of this place.',
'photos': ['photo1.jpg', 'photo2.jpg'],
'coordinate': (3, 4),
}, {
'coordinate': (2, 3),
}, {
'coordinate': (4, 1)
... | Add /tours endpoint with dummy data | Add /tours endpoint with dummy data
| Python | mit | wtg/RPI_Tours_Server | import flask
app = flask.Flask(__name__)
@app.route('/')
def index():
return flask.jsonify(hello='world')
if __name__ == '__main__':
app.run(debug=True)
Add /tours endpoint with dummy data | import flask
app = flask.Flask(__name__)
def make_tour():
tour = {
'id': 1,
'name': 'Test Tour',
'route': [
{
'description': 'This is a description of this place.',
'photos': ['photo1.jpg', 'photo2.jpg'],
'coordinate': (3, 4),
}, {
'coordinate': (2, 3),
}, {
'coordinate': (4, 1)
... | <commit_before>import flask
app = flask.Flask(__name__)
@app.route('/')
def index():
return flask.jsonify(hello='world')
if __name__ == '__main__':
app.run(debug=True)
<commit_msg>Add /tours endpoint with dummy data<commit_after> | import flask
app = flask.Flask(__name__)
def make_tour():
tour = {
'id': 1,
'name': 'Test Tour',
'route': [
{
'description': 'This is a description of this place.',
'photos': ['photo1.jpg', 'photo2.jpg'],
'coordinate': (3, 4),
}, {
'coordinate': (2, 3),
}, {
'coordinate': (4, 1)
... | import flask
app = flask.Flask(__name__)
@app.route('/')
def index():
return flask.jsonify(hello='world')
if __name__ == '__main__':
app.run(debug=True)
Add /tours endpoint with dummy dataimport flask
app = flask.Flask(__name__)
def make_tour():
tour = {
'id': 1,
'name': 'Test Tour',
'route': [
{
'... | <commit_before>import flask
app = flask.Flask(__name__)
@app.route('/')
def index():
return flask.jsonify(hello='world')
if __name__ == '__main__':
app.run(debug=True)
<commit_msg>Add /tours endpoint with dummy data<commit_after>import flask
app = flask.Flask(__name__)
def make_tour():
tour = {
'id': 1,
'na... |
0f2ccc881e8d2b8b0f4064e3e1fae39b14875821 | tortilla/utils.py | tortilla/utils.py | # -*- coding: utf-8 -*-
import six
from formats import FormatBank, discover_json, discover_yaml
formats = FormatBank()
discover_json(formats, content_type='application/json')
discover_yaml(formats, content_type='application/x-yaml')
def run_from_ipython():
try:
__IPYTHON__
return True
exc... | # -*- coding: utf-8 -*-
import six
from formats import FormatBank, discover_json, discover_yaml
formats = FormatBank()
discover_json(formats, content_type='application/json')
discover_yaml(formats, content_type='application/x-yaml')
def run_from_ipython():
return getattr(__builtins__, "__IPYTHON__", False)
... | Refactor run_from_ipython() implementation to make it pass static code analysis test | Refactor run_from_ipython() implementation to make it pass static code analysis test
| Python | mit | redodo/tortilla | # -*- coding: utf-8 -*-
import six
from formats import FormatBank, discover_json, discover_yaml
formats = FormatBank()
discover_json(formats, content_type='application/json')
discover_yaml(formats, content_type='application/x-yaml')
def run_from_ipython():
try:
__IPYTHON__
return True
exc... | # -*- coding: utf-8 -*-
import six
from formats import FormatBank, discover_json, discover_yaml
formats = FormatBank()
discover_json(formats, content_type='application/json')
discover_yaml(formats, content_type='application/x-yaml')
def run_from_ipython():
return getattr(__builtins__, "__IPYTHON__", False)
... | <commit_before># -*- coding: utf-8 -*-
import six
from formats import FormatBank, discover_json, discover_yaml
formats = FormatBank()
discover_json(formats, content_type='application/json')
discover_yaml(formats, content_type='application/x-yaml')
def run_from_ipython():
try:
__IPYTHON__
retu... | # -*- coding: utf-8 -*-
import six
from formats import FormatBank, discover_json, discover_yaml
formats = FormatBank()
discover_json(formats, content_type='application/json')
discover_yaml(formats, content_type='application/x-yaml')
def run_from_ipython():
return getattr(__builtins__, "__IPYTHON__", False)
... | # -*- coding: utf-8 -*-
import six
from formats import FormatBank, discover_json, discover_yaml
formats = FormatBank()
discover_json(formats, content_type='application/json')
discover_yaml(formats, content_type='application/x-yaml')
def run_from_ipython():
try:
__IPYTHON__
return True
exc... | <commit_before># -*- coding: utf-8 -*-
import six
from formats import FormatBank, discover_json, discover_yaml
formats = FormatBank()
discover_json(formats, content_type='application/json')
discover_yaml(formats, content_type='application/x-yaml')
def run_from_ipython():
try:
__IPYTHON__
retu... |
45d442cfe9c737332ca75e68e1488667937015ed | src/repository/models.py | src/repository/models.py | from django.db import models
import git, os
class Github (models.Model):
username = models.CharField(max_length=39)
repository = models.CharField(max_length=100)
def __str__(self):
return self.repository
def clone_repository(self):
DIR_NAME = self.repository
REMOTE_URL = "http... | from django.db import models
from django.conf import settings
import git, os
class Github (models.Model):
username = models.CharField(max_length=39)
repository = models.CharField(max_length=100)
def __str__(self):
return self.repository
def clone_repository(self):
DIR_NAME = os.path.j... | Clone repository to playbooks directory | Clone repository to playbooks directory
| Python | bsd-3-clause | lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin | from django.db import models
import git, os
class Github (models.Model):
username = models.CharField(max_length=39)
repository = models.CharField(max_length=100)
def __str__(self):
return self.repository
def clone_repository(self):
DIR_NAME = self.repository
REMOTE_URL = "http... | from django.db import models
from django.conf import settings
import git, os
class Github (models.Model):
username = models.CharField(max_length=39)
repository = models.CharField(max_length=100)
def __str__(self):
return self.repository
def clone_repository(self):
DIR_NAME = os.path.j... | <commit_before>from django.db import models
import git, os
class Github (models.Model):
username = models.CharField(max_length=39)
repository = models.CharField(max_length=100)
def __str__(self):
return self.repository
def clone_repository(self):
DIR_NAME = self.repository
REM... | from django.db import models
from django.conf import settings
import git, os
class Github (models.Model):
username = models.CharField(max_length=39)
repository = models.CharField(max_length=100)
def __str__(self):
return self.repository
def clone_repository(self):
DIR_NAME = os.path.j... | from django.db import models
import git, os
class Github (models.Model):
username = models.CharField(max_length=39)
repository = models.CharField(max_length=100)
def __str__(self):
return self.repository
def clone_repository(self):
DIR_NAME = self.repository
REMOTE_URL = "http... | <commit_before>from django.db import models
import git, os
class Github (models.Model):
username = models.CharField(max_length=39)
repository = models.CharField(max_length=100)
def __str__(self):
return self.repository
def clone_repository(self):
DIR_NAME = self.repository
REM... |
ca43660869bbd390979a928dc219e016c1a0607a | api/route_settings.py | api/route_settings.py | import json
import falcon
import models
import schemas
import api_util
settings_schema = schemas.SettingSchema(many=True)
setting_schema = schemas.SettingSchema()
class SettingsResource:
def on_get(self, req, resp):
settings = models.Setting.select()
settings_dict = {}
for setting in... | import json
import falcon
import models
import schemas
import api_util
class SettingsResource:
def on_get(self, req, resp):
settings = models.Setting.select()
settings_dict = {}
for setting in settings:
settings_dict[setting.key] = setting.value
resp.body = api_uti... | Remove reference to now-deleted SettingSchema | Remove reference to now-deleted SettingSchema
| Python | mit | thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline | import json
import falcon
import models
import schemas
import api_util
settings_schema = schemas.SettingSchema(many=True)
setting_schema = schemas.SettingSchema()
class SettingsResource:
def on_get(self, req, resp):
settings = models.Setting.select()
settings_dict = {}
for setting in... | import json
import falcon
import models
import schemas
import api_util
class SettingsResource:
def on_get(self, req, resp):
settings = models.Setting.select()
settings_dict = {}
for setting in settings:
settings_dict[setting.key] = setting.value
resp.body = api_uti... | <commit_before>import json
import falcon
import models
import schemas
import api_util
settings_schema = schemas.SettingSchema(many=True)
setting_schema = schemas.SettingSchema()
class SettingsResource:
def on_get(self, req, resp):
settings = models.Setting.select()
settings_dict = {}
... | import json
import falcon
import models
import schemas
import api_util
class SettingsResource:
def on_get(self, req, resp):
settings = models.Setting.select()
settings_dict = {}
for setting in settings:
settings_dict[setting.key] = setting.value
resp.body = api_uti... | import json
import falcon
import models
import schemas
import api_util
settings_schema = schemas.SettingSchema(many=True)
setting_schema = schemas.SettingSchema()
class SettingsResource:
def on_get(self, req, resp):
settings = models.Setting.select()
settings_dict = {}
for setting in... | <commit_before>import json
import falcon
import models
import schemas
import api_util
settings_schema = schemas.SettingSchema(many=True)
setting_schema = schemas.SettingSchema()
class SettingsResource:
def on_get(self, req, resp):
settings = models.Setting.select()
settings_dict = {}
... |
b86bcfd1f1762cbb956b3eb42b515107249cb66e | production_settings.py | production_settings.py | from default_settings import *
import dj_database_url
DATABASES = {
'default': dj_database_url.config(),
}
SECRET_KEY = os.environ['SECRET_KEY']
STATICFILES_STORAGE = 's3storage.S3HashedFilesStorage'
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY', '')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_KEY... | from default_settings import *
import dj_database_url
DATABASES = {
'default': dj_database_url.config(),
}
SECRET_KEY = os.environ['SECRET_KEY']
STATICFILES_STORAGE = 's3storage.S3HashedFilesStorage'
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY', '')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_KEY... | Disable querystring auth for s3 | Disable querystring auth for s3
| Python | mit | brutasse/djangopeople,brutasse/djangopeople,django/djangopeople,django/djangopeople,django/djangopeople,brutasse/djangopeople,polinom/djangopeople,polinom/djangopeople,brutasse/djangopeople,polinom/djangopeople,polinom/djangopeople | from default_settings import *
import dj_database_url
DATABASES = {
'default': dj_database_url.config(),
}
SECRET_KEY = os.environ['SECRET_KEY']
STATICFILES_STORAGE = 's3storage.S3HashedFilesStorage'
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY', '')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_KEY... | from default_settings import *
import dj_database_url
DATABASES = {
'default': dj_database_url.config(),
}
SECRET_KEY = os.environ['SECRET_KEY']
STATICFILES_STORAGE = 's3storage.S3HashedFilesStorage'
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY', '')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_KEY... | <commit_before>from default_settings import *
import dj_database_url
DATABASES = {
'default': dj_database_url.config(),
}
SECRET_KEY = os.environ['SECRET_KEY']
STATICFILES_STORAGE = 's3storage.S3HashedFilesStorage'
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY', '')
AWS_SECRET_ACCESS_KEY = os.environ.get(... | from default_settings import *
import dj_database_url
DATABASES = {
'default': dj_database_url.config(),
}
SECRET_KEY = os.environ['SECRET_KEY']
STATICFILES_STORAGE = 's3storage.S3HashedFilesStorage'
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY', '')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_KEY... | from default_settings import *
import dj_database_url
DATABASES = {
'default': dj_database_url.config(),
}
SECRET_KEY = os.environ['SECRET_KEY']
STATICFILES_STORAGE = 's3storage.S3HashedFilesStorage'
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY', '')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_KEY... | <commit_before>from default_settings import *
import dj_database_url
DATABASES = {
'default': dj_database_url.config(),
}
SECRET_KEY = os.environ['SECRET_KEY']
STATICFILES_STORAGE = 's3storage.S3HashedFilesStorage'
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY', '')
AWS_SECRET_ACCESS_KEY = os.environ.get(... |
51a2ac2d66d4245626f3d8830bb47f596b3d9879 | app/minify.py | app/minify.py | # Python 3
import glob
import os
uglifyjs = os.path.abspath("../lib/uglifyjs")
input_dir = os.path.abspath("./Resources/Tracker/scripts")
output_dir = os.path.abspath("./Resources/Tracker/scripts.min")
for file in glob.glob(input_dir + "/*.js"):
name = os.path.basename(file)
print("Minifying {0}...".format(n... | #!/usr/bin/env python3
import glob
import os
import shutil
import sys
if os.name == "nt":
uglifyjs = os.path.abspath("../lib/uglifyjs.cmd")
else:
uglifyjs = "uglifyjs"
if shutil.which(uglifyjs) is None:
print("Cannot find executable: {0}".format(uglifyjs))
sys.exit(1)
input_dir = os.path.abspath("./... | Fix app minification script on non-Windows systems | Fix app minification script on non-Windows systems
| Python | mit | chylex/Discord-History-Tracker,chylex/Discord-History-Tracker,chylex/Discord-History-Tracker,chylex/Discord-History-Tracker,chylex/Discord-History-Tracker,chylex/Discord-History-Tracker | # Python 3
import glob
import os
uglifyjs = os.path.abspath("../lib/uglifyjs")
input_dir = os.path.abspath("./Resources/Tracker/scripts")
output_dir = os.path.abspath("./Resources/Tracker/scripts.min")
for file in glob.glob(input_dir + "/*.js"):
name = os.path.basename(file)
print("Minifying {0}...".format(n... | #!/usr/bin/env python3
import glob
import os
import shutil
import sys
if os.name == "nt":
uglifyjs = os.path.abspath("../lib/uglifyjs.cmd")
else:
uglifyjs = "uglifyjs"
if shutil.which(uglifyjs) is None:
print("Cannot find executable: {0}".format(uglifyjs))
sys.exit(1)
input_dir = os.path.abspath("./... | <commit_before># Python 3
import glob
import os
uglifyjs = os.path.abspath("../lib/uglifyjs")
input_dir = os.path.abspath("./Resources/Tracker/scripts")
output_dir = os.path.abspath("./Resources/Tracker/scripts.min")
for file in glob.glob(input_dir + "/*.js"):
name = os.path.basename(file)
print("Minifying {... | #!/usr/bin/env python3
import glob
import os
import shutil
import sys
if os.name == "nt":
uglifyjs = os.path.abspath("../lib/uglifyjs.cmd")
else:
uglifyjs = "uglifyjs"
if shutil.which(uglifyjs) is None:
print("Cannot find executable: {0}".format(uglifyjs))
sys.exit(1)
input_dir = os.path.abspath("./... | # Python 3
import glob
import os
uglifyjs = os.path.abspath("../lib/uglifyjs")
input_dir = os.path.abspath("./Resources/Tracker/scripts")
output_dir = os.path.abspath("./Resources/Tracker/scripts.min")
for file in glob.glob(input_dir + "/*.js"):
name = os.path.basename(file)
print("Minifying {0}...".format(n... | <commit_before># Python 3
import glob
import os
uglifyjs = os.path.abspath("../lib/uglifyjs")
input_dir = os.path.abspath("./Resources/Tracker/scripts")
output_dir = os.path.abspath("./Resources/Tracker/scripts.min")
for file in glob.glob(input_dir + "/*.js"):
name = os.path.basename(file)
print("Minifying {... |
c3c8c566c8294715b07614c1d18a2c6de3a7c212 | app/models.py | app/models.py | from app import db
class User(db.Model):
__tablename__ = 'users'
username = db.Column(db.String(64), nullable=False, unique=True, primary_key=True)
password = db.Column(db.String(192), nullable=False)
def __init__(self, username, password):
self.username = username
self.email = pass... | from app import db
class User(db.Model):
__tablename__ = 'users'
username = db.Column(db.String(64), nullable=False, unique=True, primary_key=True)
password = db.Column(db.String(192), nullable=False)
def __init__(self, username, password):
self.username = username
self.password = p... | Fix variable names in model. | Fix variable names in model.
| Python | mit | jawrainey/atc,jawrainey/atc | from app import db
class User(db.Model):
__tablename__ = 'users'
username = db.Column(db.String(64), nullable=False, unique=True, primary_key=True)
password = db.Column(db.String(192), nullable=False)
def __init__(self, username, password):
self.username = username
self.email = pass... | from app import db
class User(db.Model):
__tablename__ = 'users'
username = db.Column(db.String(64), nullable=False, unique=True, primary_key=True)
password = db.Column(db.String(192), nullable=False)
def __init__(self, username, password):
self.username = username
self.password = p... | <commit_before>from app import db
class User(db.Model):
__tablename__ = 'users'
username = db.Column(db.String(64), nullable=False, unique=True, primary_key=True)
password = db.Column(db.String(192), nullable=False)
def __init__(self, username, password):
self.username = username
se... | from app import db
class User(db.Model):
__tablename__ = 'users'
username = db.Column(db.String(64), nullable=False, unique=True, primary_key=True)
password = db.Column(db.String(192), nullable=False)
def __init__(self, username, password):
self.username = username
self.password = p... | from app import db
class User(db.Model):
__tablename__ = 'users'
username = db.Column(db.String(64), nullable=False, unique=True, primary_key=True)
password = db.Column(db.String(192), nullable=False)
def __init__(self, username, password):
self.username = username
self.email = pass... | <commit_before>from app import db
class User(db.Model):
__tablename__ = 'users'
username = db.Column(db.String(64), nullable=False, unique=True, primary_key=True)
password = db.Column(db.String(192), nullable=False)
def __init__(self, username, password):
self.username = username
se... |
105d46937babb7a43901d8238fb9cc0a7b00c8c9 | lyman/tools/commandline.py | lyman/tools/commandline.py | import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-subjects", nargs="*", dest="subjects",
help=("list of subject ids, name of file in lyman "
"directory, or full path to text file with "
"subject ids"))
parser.add_argument("... | import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-subjects", nargs="*", dest="subjects",
help=("list of subject ids, name of file in lyman "
"directory, or full path to text file with "
"subject ids"))
parser.add_argument("... | Add slurm to command line plugin choices | Add slurm to command line plugin choices
| Python | bsd-3-clause | mwaskom/lyman,tuqc/lyman,kastman/lyman | import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-subjects", nargs="*", dest="subjects",
help=("list of subject ids, name of file in lyman "
"directory, or full path to text file with "
"subject ids"))
parser.add_argument("... | import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-subjects", nargs="*", dest="subjects",
help=("list of subject ids, name of file in lyman "
"directory, or full path to text file with "
"subject ids"))
parser.add_argument("... | <commit_before>import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-subjects", nargs="*", dest="subjects",
help=("list of subject ids, name of file in lyman "
"directory, or full path to text file with "
"subject ids"))
parser... | import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-subjects", nargs="*", dest="subjects",
help=("list of subject ids, name of file in lyman "
"directory, or full path to text file with "
"subject ids"))
parser.add_argument("... | import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-subjects", nargs="*", dest="subjects",
help=("list of subject ids, name of file in lyman "
"directory, or full path to text file with "
"subject ids"))
parser.add_argument("... | <commit_before>import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-subjects", nargs="*", dest="subjects",
help=("list of subject ids, name of file in lyman "
"directory, or full path to text file with "
"subject ids"))
parser... |
f3c95f9875c59564faff909b0cf5a8869515b1f3 | readthedocs/rtd_tests/tests/__init__.py | readthedocs/rtd_tests/tests/__init__.py | from test_api import *
from view_tests import *
from test_doc_building import *
from test_backend import *
| from test_api import *
#from view_tests import *
from test_doc_building import *
from test_backend import *
| Kill the view tests for now, to get them greeeeeen | Kill the view tests for now, to get them greeeeeen
| Python | mit | agjohnson/readthedocs.org,kdkeyser/readthedocs.org,laplaceliu/readthedocs.org,LukasBoersma/readthedocs.org,fujita-shintaro/readthedocs.org,davidfischer/readthedocs.org,cgourlay/readthedocs.org,stevepiercy/readthedocs.org,soulshake/readthedocs.org,hach-que/readthedocs.org,SteveViss/readthedocs.org,raven47git/readthedocs... | from test_api import *
from view_tests import *
from test_doc_building import *
from test_backend import *
Kill the view tests for now, to get them greeeeeen | from test_api import *
#from view_tests import *
from test_doc_building import *
from test_backend import *
| <commit_before>from test_api import *
from view_tests import *
from test_doc_building import *
from test_backend import *
<commit_msg>Kill the view tests for now, to get them greeeeeen<commit_after> | from test_api import *
#from view_tests import *
from test_doc_building import *
from test_backend import *
| from test_api import *
from view_tests import *
from test_doc_building import *
from test_backend import *
Kill the view tests for now, to get them greeeeeenfrom test_api import *
#from view_tests import *
from test_doc_building import *
from test_backend import *
| <commit_before>from test_api import *
from view_tests import *
from test_doc_building import *
from test_backend import *
<commit_msg>Kill the view tests for now, to get them greeeeeen<commit_after>from test_api import *
#from view_tests import *
from test_doc_building import *
from test_backend import *
|
ac95449e6774538756d7813d73c8b113f9dcb6e6 | axis/configuration.py | axis/configuration.py | """Python library to enable Axis devices to integrate with Home Assistant."""
import requests
from requests.auth import HTTPDigestAuth
class Configuration(object):
"""Device configuration."""
def __init__(self, *,
loop, host, username, password,
port=80, web_proto='http', ve... | """Python library to enable Axis devices to integrate with Home Assistant."""
import requests
from requests.auth import HTTPDigestAuth
class Configuration(object):
"""Device configuration."""
def __init__(self, *,
loop, host, username, password,
port=80, web_proto='http', v... | Allow to properly disable verification of SSL | Allow to properly disable verification of SSL
| Python | mit | Kane610/axis | """Python library to enable Axis devices to integrate with Home Assistant."""
import requests
from requests.auth import HTTPDigestAuth
class Configuration(object):
"""Device configuration."""
def __init__(self, *,
loop, host, username, password,
port=80, web_proto='http', ve... | """Python library to enable Axis devices to integrate with Home Assistant."""
import requests
from requests.auth import HTTPDigestAuth
class Configuration(object):
"""Device configuration."""
def __init__(self, *,
loop, host, username, password,
port=80, web_proto='http', v... | <commit_before>"""Python library to enable Axis devices to integrate with Home Assistant."""
import requests
from requests.auth import HTTPDigestAuth
class Configuration(object):
"""Device configuration."""
def __init__(self, *,
loop, host, username, password,
port=80, web_p... | """Python library to enable Axis devices to integrate with Home Assistant."""
import requests
from requests.auth import HTTPDigestAuth
class Configuration(object):
"""Device configuration."""
def __init__(self, *,
loop, host, username, password,
port=80, web_proto='http', v... | """Python library to enable Axis devices to integrate with Home Assistant."""
import requests
from requests.auth import HTTPDigestAuth
class Configuration(object):
"""Device configuration."""
def __init__(self, *,
loop, host, username, password,
port=80, web_proto='http', ve... | <commit_before>"""Python library to enable Axis devices to integrate with Home Assistant."""
import requests
from requests.auth import HTTPDigestAuth
class Configuration(object):
"""Device configuration."""
def __init__(self, *,
loop, host, username, password,
port=80, web_p... |
0e30e73ffa928b11fd6ee6c0ea12709100623e5f | pltpreview/view.py | pltpreview/view.py | """Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, title='', **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking. *title*
is the image title. *kwargs* are passed to matplotlib's ... | """Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, title='', **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking. *title*
is the image title. *kwargs* are passed to matplotlib's ... | Use pop for getting blocking parameter | Use pop for getting blocking parameter
| Python | mit | tfarago/pltpreview | """Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, title='', **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking. *title*
is the image title. *kwargs* are passed to matplotlib's ... | """Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, title='', **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking. *title*
is the image title. *kwargs* are passed to matplotlib's ... | <commit_before>"""Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, title='', **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking. *title*
is the image title. *kwargs* are passed t... | """Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, title='', **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking. *title*
is the image title. *kwargs* are passed to matplotlib's ... | """Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, title='', **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking. *title*
is the image title. *kwargs* are passed to matplotlib's ... | <commit_before>"""Convenience functions for matplotlib plotting and image viewing."""
import numpy as np
from matplotlib import pyplot as plt
def show(image, blocking=False, title='', **kwargs):
"""Show *image*. If *blocking* is False the call is nonblocking. *title*
is the image title. *kwargs* are passed t... |
f8b83fc7976768c2b9d92ab35297aa17637eeb92 | firefed/feature/addons.py | firefed/feature/addons.py | import json
from feature import Feature
from output import good, bad, info
from tabulate import tabulate
class Addons(Feature):
def run(self, args):
with open(self.profile_path('extensions.json')) as f:
addons = json.load(f)['addons']
info(('%d addons found. (%d active)\n' %
... | import json
from feature import Feature
from output import good, bad, info
from tabulate import tabulate
def signed_state(num):
# See constants defined in [1]
states = {
-2: 'broken',
-1: 'unknown',
0: 'missing',
1: 'preliminary',
2: 'signed',
3: 'system',
... | Add signature and visibility status to addon feature | Add signature and visibility status to addon feature
| Python | mit | numirias/firefed | import json
from feature import Feature
from output import good, bad, info
from tabulate import tabulate
class Addons(Feature):
def run(self, args):
with open(self.profile_path('extensions.json')) as f:
addons = json.load(f)['addons']
info(('%d addons found. (%d active)\n' %
... | import json
from feature import Feature
from output import good, bad, info
from tabulate import tabulate
def signed_state(num):
# See constants defined in [1]
states = {
-2: 'broken',
-1: 'unknown',
0: 'missing',
1: 'preliminary',
2: 'signed',
3: 'system',
... | <commit_before>import json
from feature import Feature
from output import good, bad, info
from tabulate import tabulate
class Addons(Feature):
def run(self, args):
with open(self.profile_path('extensions.json')) as f:
addons = json.load(f)['addons']
info(('%d addons found. (%d active)\... | import json
from feature import Feature
from output import good, bad, info
from tabulate import tabulate
def signed_state(num):
# See constants defined in [1]
states = {
-2: 'broken',
-1: 'unknown',
0: 'missing',
1: 'preliminary',
2: 'signed',
3: 'system',
... | import json
from feature import Feature
from output import good, bad, info
from tabulate import tabulate
class Addons(Feature):
def run(self, args):
with open(self.profile_path('extensions.json')) as f:
addons = json.load(f)['addons']
info(('%d addons found. (%d active)\n' %
... | <commit_before>import json
from feature import Feature
from output import good, bad, info
from tabulate import tabulate
class Addons(Feature):
def run(self, args):
with open(self.profile_path('extensions.json')) as f:
addons = json.load(f)['addons']
info(('%d addons found. (%d active)\... |
314b8cf14eb3bed9b116b78ce0199e73399a4dab | businesstime/test/holidays/aus_test.py | businesstime/test/holidays/aus_test.py | from datetime import datetime, date, timedelta
import unittest
from businesstime.holidays.aus import QueenslandPublicHolidays, BrisbanePublicHolidays
class QueenslandPublicHolidaysTest(unittest.TestCase):
def test_2016_08(self):
holidays_gen = QueenslandPublicHolidays()
self.assertEqual(
... | from datetime import datetime, date, timedelta
import unittest
from businesstime.holidays.aus import QueenslandPublicHolidays, BrisbanePublicHolidays
class QueenslandPublicHolidaysTest(unittest.TestCase):
def test_2016_08(self):
holidays_gen = QueenslandPublicHolidays()
self.assertEqual(
... | Fix tests in python 2.6 | Fix tests in python 2.6
| Python | bsd-2-clause | seatgeek/businesstime | from datetime import datetime, date, timedelta
import unittest
from businesstime.holidays.aus import QueenslandPublicHolidays, BrisbanePublicHolidays
class QueenslandPublicHolidaysTest(unittest.TestCase):
def test_2016_08(self):
holidays_gen = QueenslandPublicHolidays()
self.assertEqual(
... | from datetime import datetime, date, timedelta
import unittest
from businesstime.holidays.aus import QueenslandPublicHolidays, BrisbanePublicHolidays
class QueenslandPublicHolidaysTest(unittest.TestCase):
def test_2016_08(self):
holidays_gen = QueenslandPublicHolidays()
self.assertEqual(
... | <commit_before>from datetime import datetime, date, timedelta
import unittest
from businesstime.holidays.aus import QueenslandPublicHolidays, BrisbanePublicHolidays
class QueenslandPublicHolidaysTest(unittest.TestCase):
def test_2016_08(self):
holidays_gen = QueenslandPublicHolidays()
self.asser... | from datetime import datetime, date, timedelta
import unittest
from businesstime.holidays.aus import QueenslandPublicHolidays, BrisbanePublicHolidays
class QueenslandPublicHolidaysTest(unittest.TestCase):
def test_2016_08(self):
holidays_gen = QueenslandPublicHolidays()
self.assertEqual(
... | from datetime import datetime, date, timedelta
import unittest
from businesstime.holidays.aus import QueenslandPublicHolidays, BrisbanePublicHolidays
class QueenslandPublicHolidaysTest(unittest.TestCase):
def test_2016_08(self):
holidays_gen = QueenslandPublicHolidays()
self.assertEqual(
... | <commit_before>from datetime import datetime, date, timedelta
import unittest
from businesstime.holidays.aus import QueenslandPublicHolidays, BrisbanePublicHolidays
class QueenslandPublicHolidaysTest(unittest.TestCase):
def test_2016_08(self):
holidays_gen = QueenslandPublicHolidays()
self.asser... |
f3cdd316f9e0859f77389c68b073134a6076374b | ppp_datamodel_notation_parser/requesthandler.py | ppp_datamodel_notation_parser/requesthandler.py | """Request handler of the module."""
from functools import partial
from ppp_datamodel import Sentence, TraceItem, Response
from ppp_datamodel.parsers import parse_triples, ParseError
def tree_to_response(measures, trace, tree):
trace = trace + [TraceItem('DatamodelNotationParser',
... | """Request handler of the module."""
from functools import partial
from ppp_datamodel import Sentence, TraceItem, Response
from ppp_datamodel.parsers import parse_triples, ParseError
def tree_to_response(tree, measures, trace):
trace = trace + [TraceItem('DatamodelNotationParser',
... | Fix compatibility with new parser. | Fix compatibility with new parser.
| Python | mit | ProjetPP/PPP-DatamodelNotationParser,ProjetPP/PPP-DatamodelNotationParser | """Request handler of the module."""
from functools import partial
from ppp_datamodel import Sentence, TraceItem, Response
from ppp_datamodel.parsers import parse_triples, ParseError
def tree_to_response(measures, trace, tree):
trace = trace + [TraceItem('DatamodelNotationParser',
... | """Request handler of the module."""
from functools import partial
from ppp_datamodel import Sentence, TraceItem, Response
from ppp_datamodel.parsers import parse_triples, ParseError
def tree_to_response(tree, measures, trace):
trace = trace + [TraceItem('DatamodelNotationParser',
... | <commit_before>"""Request handler of the module."""
from functools import partial
from ppp_datamodel import Sentence, TraceItem, Response
from ppp_datamodel.parsers import parse_triples, ParseError
def tree_to_response(measures, trace, tree):
trace = trace + [TraceItem('DatamodelNotationParser',
... | """Request handler of the module."""
from functools import partial
from ppp_datamodel import Sentence, TraceItem, Response
from ppp_datamodel.parsers import parse_triples, ParseError
def tree_to_response(tree, measures, trace):
trace = trace + [TraceItem('DatamodelNotationParser',
... | """Request handler of the module."""
from functools import partial
from ppp_datamodel import Sentence, TraceItem, Response
from ppp_datamodel.parsers import parse_triples, ParseError
def tree_to_response(measures, trace, tree):
trace = trace + [TraceItem('DatamodelNotationParser',
... | <commit_before>"""Request handler of the module."""
from functools import partial
from ppp_datamodel import Sentence, TraceItem, Response
from ppp_datamodel.parsers import parse_triples, ParseError
def tree_to_response(measures, trace, tree):
trace = trace + [TraceItem('DatamodelNotationParser',
... |
9ec8949d62188efe8c40e859c20fc55339f4e7e2 | taca/utils/filesystem.py | taca/utils/filesystem.py | """Filesystem utilities."""
import contextlib
import os
import shutil
RUN_RE = '^\d{6}_[a-zA-Z\d\-]+_\d{4}_[AB0][A-Z\d\-]+$'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory."""
cur_dir = os.getcwd()
os.chdir(new_dir)
try:
yield
fin... | """Filesystem utilities."""
import contextlib
import os
import shutil
RUN_RE = '^\d{6}_[a-zA-Z\d\-]+_\d{2,}_[AB0][A-Z\d\-]+$'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory."""
cur_dir = os.getcwd()
os.chdir(new_dir)
try:
yield
fi... | Fix FC name pattern for NextSeq2000 | Fix FC name pattern for NextSeq2000
| Python | mit | SciLifeLab/TACA,SciLifeLab/TACA,SciLifeLab/TACA | """Filesystem utilities."""
import contextlib
import os
import shutil
RUN_RE = '^\d{6}_[a-zA-Z\d\-]+_\d{4}_[AB0][A-Z\d\-]+$'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory."""
cur_dir = os.getcwd()
os.chdir(new_dir)
try:
yield
fin... | """Filesystem utilities."""
import contextlib
import os
import shutil
RUN_RE = '^\d{6}_[a-zA-Z\d\-]+_\d{2,}_[AB0][A-Z\d\-]+$'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory."""
cur_dir = os.getcwd()
os.chdir(new_dir)
try:
yield
fi... | <commit_before>"""Filesystem utilities."""
import contextlib
import os
import shutil
RUN_RE = '^\d{6}_[a-zA-Z\d\-]+_\d{4}_[AB0][A-Z\d\-]+$'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory."""
cur_dir = os.getcwd()
os.chdir(new_dir)
try:
... | """Filesystem utilities."""
import contextlib
import os
import shutil
RUN_RE = '^\d{6}_[a-zA-Z\d\-]+_\d{2,}_[AB0][A-Z\d\-]+$'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory."""
cur_dir = os.getcwd()
os.chdir(new_dir)
try:
yield
fi... | """Filesystem utilities."""
import contextlib
import os
import shutil
RUN_RE = '^\d{6}_[a-zA-Z\d\-]+_\d{4}_[AB0][A-Z\d\-]+$'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory."""
cur_dir = os.getcwd()
os.chdir(new_dir)
try:
yield
fin... | <commit_before>"""Filesystem utilities."""
import contextlib
import os
import shutil
RUN_RE = '^\d{6}_[a-zA-Z\d\-]+_\d{4}_[AB0][A-Z\d\-]+$'
@contextlib.contextmanager
def chdir(new_dir):
"""Context manager to temporarily change to a new directory."""
cur_dir = os.getcwd()
os.chdir(new_dir)
try:
... |
bd31b43fc6f282f2f6cc4bf11a6ae5c51e0e3501 | bot/config.py | bot/config.py | import os
import logging
import pytz
BOT_URL = os.getenv("BOT_URL", "")
ENVIRONMENT = os.getenv("ENVIRONMENT", "local")
WEBHOOK = os.getenv("WEBHOOK", "")
BOTTLE_PORT = os.getenv("BOTTLE_PORT", "8080")
BOTTLE_HOST = os.getenv("BOTTLE_HOST", "127.0.0.1")
LAST_UPDATE_ID_FILE = "last_update"
GROUPS_DB_NAME = "tags"
POLL_... | import os
import logging
import pytz
BOT_URL = os.getenv("BOT_URL", "")
ENVIRONMENT = os.getenv("ENVIRONMENT", "local")
WEBHOOK = os.getenv("WEBHOOK", "")
BOTTLE_PORT = os.getenv("BOTTLE_PORT", "8080")
BOTTLE_HOST = os.getenv("BOTTLE_HOST", "127.0.0.1")
LAST_UPDATE_ID_FILE = "last_update"
GROUPS_DB_NAME = "tags"
POLL_... | Add Pending migration env var | Add Pending migration env var
| Python | mit | cesar0094/telegram-tldrbot | import os
import logging
import pytz
BOT_URL = os.getenv("BOT_URL", "")
ENVIRONMENT = os.getenv("ENVIRONMENT", "local")
WEBHOOK = os.getenv("WEBHOOK", "")
BOTTLE_PORT = os.getenv("BOTTLE_PORT", "8080")
BOTTLE_HOST = os.getenv("BOTTLE_HOST", "127.0.0.1")
LAST_UPDATE_ID_FILE = "last_update"
GROUPS_DB_NAME = "tags"
POLL_... | import os
import logging
import pytz
BOT_URL = os.getenv("BOT_URL", "")
ENVIRONMENT = os.getenv("ENVIRONMENT", "local")
WEBHOOK = os.getenv("WEBHOOK", "")
BOTTLE_PORT = os.getenv("BOTTLE_PORT", "8080")
BOTTLE_HOST = os.getenv("BOTTLE_HOST", "127.0.0.1")
LAST_UPDATE_ID_FILE = "last_update"
GROUPS_DB_NAME = "tags"
POLL_... | <commit_before>import os
import logging
import pytz
BOT_URL = os.getenv("BOT_URL", "")
ENVIRONMENT = os.getenv("ENVIRONMENT", "local")
WEBHOOK = os.getenv("WEBHOOK", "")
BOTTLE_PORT = os.getenv("BOTTLE_PORT", "8080")
BOTTLE_HOST = os.getenv("BOTTLE_HOST", "127.0.0.1")
LAST_UPDATE_ID_FILE = "last_update"
GROUPS_DB_NAME... | import os
import logging
import pytz
BOT_URL = os.getenv("BOT_URL", "")
ENVIRONMENT = os.getenv("ENVIRONMENT", "local")
WEBHOOK = os.getenv("WEBHOOK", "")
BOTTLE_PORT = os.getenv("BOTTLE_PORT", "8080")
BOTTLE_HOST = os.getenv("BOTTLE_HOST", "127.0.0.1")
LAST_UPDATE_ID_FILE = "last_update"
GROUPS_DB_NAME = "tags"
POLL_... | import os
import logging
import pytz
BOT_URL = os.getenv("BOT_URL", "")
ENVIRONMENT = os.getenv("ENVIRONMENT", "local")
WEBHOOK = os.getenv("WEBHOOK", "")
BOTTLE_PORT = os.getenv("BOTTLE_PORT", "8080")
BOTTLE_HOST = os.getenv("BOTTLE_HOST", "127.0.0.1")
LAST_UPDATE_ID_FILE = "last_update"
GROUPS_DB_NAME = "tags"
POLL_... | <commit_before>import os
import logging
import pytz
BOT_URL = os.getenv("BOT_URL", "")
ENVIRONMENT = os.getenv("ENVIRONMENT", "local")
WEBHOOK = os.getenv("WEBHOOK", "")
BOTTLE_PORT = os.getenv("BOTTLE_PORT", "8080")
BOTTLE_HOST = os.getenv("BOTTLE_HOST", "127.0.0.1")
LAST_UPDATE_ID_FILE = "last_update"
GROUPS_DB_NAME... |
e64b0544b146cb810424e0e243835a34aa977f40 | boxoffice/__init__.py | boxoffice/__init__.py | # -*- coding: utf-8 -*-
# imports in this file are order-sensitive
from pytz import timezone
from flask import Flask
from flask.ext.mail import Mail
from flask.ext.lastuser import Lastuser
from flask.ext.lastuser.sqlalchemy import UserManager
from baseframe import baseframe, assets, Version
from ._version import __vers... | # -*- coding: utf-8 -*-
# imports in this file are order-sensitive
from pytz import timezone
from flask import Flask
from flask.ext.mail import Mail
from flask.ext.lastuser import Lastuser
from flask.ext.lastuser.sqlalchemy import UserManager
from baseframe import baseframe, assets, Version
from ._version import __vers... | Add assests ractive-transitions-fly and validate | Add assests ractive-transitions-fly and validate
| Python | agpl-3.0 | hasgeek/boxoffice,hasgeek/boxoffice,hasgeek/boxoffice,hasgeek/boxoffice | # -*- coding: utf-8 -*-
# imports in this file are order-sensitive
from pytz import timezone
from flask import Flask
from flask.ext.mail import Mail
from flask.ext.lastuser import Lastuser
from flask.ext.lastuser.sqlalchemy import UserManager
from baseframe import baseframe, assets, Version
from ._version import __vers... | # -*- coding: utf-8 -*-
# imports in this file are order-sensitive
from pytz import timezone
from flask import Flask
from flask.ext.mail import Mail
from flask.ext.lastuser import Lastuser
from flask.ext.lastuser.sqlalchemy import UserManager
from baseframe import baseframe, assets, Version
from ._version import __vers... | <commit_before># -*- coding: utf-8 -*-
# imports in this file are order-sensitive
from pytz import timezone
from flask import Flask
from flask.ext.mail import Mail
from flask.ext.lastuser import Lastuser
from flask.ext.lastuser.sqlalchemy import UserManager
from baseframe import baseframe, assets, Version
from ._versio... | # -*- coding: utf-8 -*-
# imports in this file are order-sensitive
from pytz import timezone
from flask import Flask
from flask.ext.mail import Mail
from flask.ext.lastuser import Lastuser
from flask.ext.lastuser.sqlalchemy import UserManager
from baseframe import baseframe, assets, Version
from ._version import __vers... | # -*- coding: utf-8 -*-
# imports in this file are order-sensitive
from pytz import timezone
from flask import Flask
from flask.ext.mail import Mail
from flask.ext.lastuser import Lastuser
from flask.ext.lastuser.sqlalchemy import UserManager
from baseframe import baseframe, assets, Version
from ._version import __vers... | <commit_before># -*- coding: utf-8 -*-
# imports in this file are order-sensitive
from pytz import timezone
from flask import Flask
from flask.ext.mail import Mail
from flask.ext.lastuser import Lastuser
from flask.ext.lastuser.sqlalchemy import UserManager
from baseframe import baseframe, assets, Version
from ._versio... |
5736e8314d5af3346a15224b27448f1c795f665c | bin/coverage_check.py | bin/coverage_check.py | #!/usr/bin/env python
import os
import subprocess
from lib import functional
from util import find_all
def coverage_module(package, module):
command = (
'coverage run --branch'
' --source=%s.%s tests/%s/%s_test.py')
print subprocess.check_output(
command % (package, module, package,... | #!/usr/bin/env python
import os
import subprocess
from lib import functional
from util import find_all
def coverage_module(package, module):
command = (
'coverage run --branch'
' --source=%s.%s tests/%s/%s_test.py')
print subprocess.check_output(
command % (package, module, package,... | Remove hard coded 'engine' and 'lib' in coverage testing | Remove hard coded 'engine' and 'lib' in coverage testing
| Python | mit | Tactique/game_engine,Tactique/game_engine | #!/usr/bin/env python
import os
import subprocess
from lib import functional
from util import find_all
def coverage_module(package, module):
command = (
'coverage run --branch'
' --source=%s.%s tests/%s/%s_test.py')
print subprocess.check_output(
command % (package, module, package,... | #!/usr/bin/env python
import os
import subprocess
from lib import functional
from util import find_all
def coverage_module(package, module):
command = (
'coverage run --branch'
' --source=%s.%s tests/%s/%s_test.py')
print subprocess.check_output(
command % (package, module, package,... | <commit_before>#!/usr/bin/env python
import os
import subprocess
from lib import functional
from util import find_all
def coverage_module(package, module):
command = (
'coverage run --branch'
' --source=%s.%s tests/%s/%s_test.py')
print subprocess.check_output(
command % (package, m... | #!/usr/bin/env python
import os
import subprocess
from lib import functional
from util import find_all
def coverage_module(package, module):
command = (
'coverage run --branch'
' --source=%s.%s tests/%s/%s_test.py')
print subprocess.check_output(
command % (package, module, package,... | #!/usr/bin/env python
import os
import subprocess
from lib import functional
from util import find_all
def coverage_module(package, module):
command = (
'coverage run --branch'
' --source=%s.%s tests/%s/%s_test.py')
print subprocess.check_output(
command % (package, module, package,... | <commit_before>#!/usr/bin/env python
import os
import subprocess
from lib import functional
from util import find_all
def coverage_module(package, module):
command = (
'coverage run --branch'
' --source=%s.%s tests/%s/%s_test.py')
print subprocess.check_output(
command % (package, m... |
4dd5dbf6c1f693c54b31a84756350cb9588921d1 | pybinding/model.py | pybinding/model.py | from scipy.sparse import csr_matrix
from . import _cpp
from .system import System
from .lattice import Lattice
from .support.sparse import SparseMatrix
class Model(_cpp.Model):
def __init__(self, *params):
super().__init__()
self.add(*params)
def add(self, *params):
for param in para... | import numpy as np
from scipy.sparse import csr_matrix
from . import _cpp
from . import results
from .system import System
from .lattice import Lattice
from .support.sparse import SparseMatrix
class Model(_cpp.Model):
def __init__(self, *params):
super().__init__()
self.add(*params)
def add(... | Add onsite energy map to Model | Add onsite energy map to Model
| Python | bsd-2-clause | dean0x7d/pybinding,MAndelkovic/pybinding,MAndelkovic/pybinding,dean0x7d/pybinding,dean0x7d/pybinding,MAndelkovic/pybinding | from scipy.sparse import csr_matrix
from . import _cpp
from .system import System
from .lattice import Lattice
from .support.sparse import SparseMatrix
class Model(_cpp.Model):
def __init__(self, *params):
super().__init__()
self.add(*params)
def add(self, *params):
for param in para... | import numpy as np
from scipy.sparse import csr_matrix
from . import _cpp
from . import results
from .system import System
from .lattice import Lattice
from .support.sparse import SparseMatrix
class Model(_cpp.Model):
def __init__(self, *params):
super().__init__()
self.add(*params)
def add(... | <commit_before>from scipy.sparse import csr_matrix
from . import _cpp
from .system import System
from .lattice import Lattice
from .support.sparse import SparseMatrix
class Model(_cpp.Model):
def __init__(self, *params):
super().__init__()
self.add(*params)
def add(self, *params):
fo... | import numpy as np
from scipy.sparse import csr_matrix
from . import _cpp
from . import results
from .system import System
from .lattice import Lattice
from .support.sparse import SparseMatrix
class Model(_cpp.Model):
def __init__(self, *params):
super().__init__()
self.add(*params)
def add(... | from scipy.sparse import csr_matrix
from . import _cpp
from .system import System
from .lattice import Lattice
from .support.sparse import SparseMatrix
class Model(_cpp.Model):
def __init__(self, *params):
super().__init__()
self.add(*params)
def add(self, *params):
for param in para... | <commit_before>from scipy.sparse import csr_matrix
from . import _cpp
from .system import System
from .lattice import Lattice
from .support.sparse import SparseMatrix
class Model(_cpp.Model):
def __init__(self, *params):
super().__init__()
self.add(*params)
def add(self, *params):
fo... |
517c0f2b1f8e6616cc63ec0c3990dcff2922f0e6 | pinax/invitations/admin.py | pinax/invitations/admin.py | from django.contrib import admin
from django.contrib.auth import get_user_model
from .models import InvitationStat, JoinInvitation
User = get_user_model()
class InvitationStatAdmin(admin.ModelAdmin):
raw_id_fields = ["user"]
readonly_fields = ["invites_sent", "invites_accepted"]
list_display = [
... | from django.contrib import admin
from django.contrib.auth import get_user_model
from .models import InvitationStat, JoinInvitation
User = get_user_model()
class InvitationStatAdmin(admin.ModelAdmin):
raw_id_fields = ["user"]
readonly_fields = ["invites_sent", "invites_accepted"]
list_display = [
... | Use f-strings in place of `str.format()` | Use f-strings in place of `str.format()`
| Python | unknown | pinax/pinax-invitations,eldarion/kaleo | from django.contrib import admin
from django.contrib.auth import get_user_model
from .models import InvitationStat, JoinInvitation
User = get_user_model()
class InvitationStatAdmin(admin.ModelAdmin):
raw_id_fields = ["user"]
readonly_fields = ["invites_sent", "invites_accepted"]
list_display = [
... | from django.contrib import admin
from django.contrib.auth import get_user_model
from .models import InvitationStat, JoinInvitation
User = get_user_model()
class InvitationStatAdmin(admin.ModelAdmin):
raw_id_fields = ["user"]
readonly_fields = ["invites_sent", "invites_accepted"]
list_display = [
... | <commit_before>from django.contrib import admin
from django.contrib.auth import get_user_model
from .models import InvitationStat, JoinInvitation
User = get_user_model()
class InvitationStatAdmin(admin.ModelAdmin):
raw_id_fields = ["user"]
readonly_fields = ["invites_sent", "invites_accepted"]
list_disp... | from django.contrib import admin
from django.contrib.auth import get_user_model
from .models import InvitationStat, JoinInvitation
User = get_user_model()
class InvitationStatAdmin(admin.ModelAdmin):
raw_id_fields = ["user"]
readonly_fields = ["invites_sent", "invites_accepted"]
list_display = [
... | from django.contrib import admin
from django.contrib.auth import get_user_model
from .models import InvitationStat, JoinInvitation
User = get_user_model()
class InvitationStatAdmin(admin.ModelAdmin):
raw_id_fields = ["user"]
readonly_fields = ["invites_sent", "invites_accepted"]
list_display = [
... | <commit_before>from django.contrib import admin
from django.contrib.auth import get_user_model
from .models import InvitationStat, JoinInvitation
User = get_user_model()
class InvitationStatAdmin(admin.ModelAdmin):
raw_id_fields = ["user"]
readonly_fields = ["invites_sent", "invites_accepted"]
list_disp... |
1918ed65e441057724b82a3cb710898f8742214b | canaryd/subprocess.py | canaryd/subprocess.py | import os
import shlex
import sys
from canaryd_packages import six
from canaryd.log import logger
if os.name == 'posix' and sys.version_info[0] < 3:
from canaryd_packages.subprocess32 import * # noqa
else:
from subprocess import * # noqa
def get_command_output(command, *args, **kwargs):
logger.debug... | import os
import shlex
import sys
from canaryd_packages import six
from canaryd.log import logger
if os.name == 'posix' and sys.version_info[0] < 3:
from canaryd_packages.subprocess32 import * # noqa
else:
from subprocess import * # noqa
def get_command_output(command, *args, **kwargs):
logger.debug... | Fix indent and don't decode input command. | Fix indent and don't decode input command.
| Python | mit | Oxygem/canaryd,Oxygem/canaryd | import os
import shlex
import sys
from canaryd_packages import six
from canaryd.log import logger
if os.name == 'posix' and sys.version_info[0] < 3:
from canaryd_packages.subprocess32 import * # noqa
else:
from subprocess import * # noqa
def get_command_output(command, *args, **kwargs):
logger.debug... | import os
import shlex
import sys
from canaryd_packages import six
from canaryd.log import logger
if os.name == 'posix' and sys.version_info[0] < 3:
from canaryd_packages.subprocess32 import * # noqa
else:
from subprocess import * # noqa
def get_command_output(command, *args, **kwargs):
logger.debug... | <commit_before>import os
import shlex
import sys
from canaryd_packages import six
from canaryd.log import logger
if os.name == 'posix' and sys.version_info[0] < 3:
from canaryd_packages.subprocess32 import * # noqa
else:
from subprocess import * # noqa
def get_command_output(command, *args, **kwargs):
... | import os
import shlex
import sys
from canaryd_packages import six
from canaryd.log import logger
if os.name == 'posix' and sys.version_info[0] < 3:
from canaryd_packages.subprocess32 import * # noqa
else:
from subprocess import * # noqa
def get_command_output(command, *args, **kwargs):
logger.debug... | import os
import shlex
import sys
from canaryd_packages import six
from canaryd.log import logger
if os.name == 'posix' and sys.version_info[0] < 3:
from canaryd_packages.subprocess32 import * # noqa
else:
from subprocess import * # noqa
def get_command_output(command, *args, **kwargs):
logger.debug... | <commit_before>import os
import shlex
import sys
from canaryd_packages import six
from canaryd.log import logger
if os.name == 'posix' and sys.version_info[0] < 3:
from canaryd_packages.subprocess32 import * # noqa
else:
from subprocess import * # noqa
def get_command_output(command, *args, **kwargs):
... |
e6d216077a683aa07b811b5f131dd07809f741bc | readthedocs/settings/postgres.py | readthedocs/settings/postgres.py | from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'docs',
'USER': 'postgres', # Not used with sqlite3.
'PASSWORD': '',
'HOST': 'golem',
'PORT': '',
}
}
DEBUG = False
TEMPLATE_DEBUG = F... | from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'docs',
'USER': 'postgres', # Not used with sqlite3.
'PASSWORD': '',
'HOST': '10.177.73.97',
'PORT': '',
}
}
DEBUG = False
TEMPLATE_DE... | Update database server in the configs. | Update database server in the configs.
| Python | mit | michaelmcandrew/readthedocs.org,ojii/readthedocs.org,safwanrahman/readthedocs.org,Tazer/readthedocs.org,CedarLogic/readthedocs.org,kdkeyser/readthedocs.org,GovReady/readthedocs.org,Tazer/readthedocs.org,nikolas/readthedocs.org,dirn/readthedocs.org,espdev/readthedocs.org,johncosta/private-readthedocs.org,gjtorikian/read... | from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'docs',
'USER': 'postgres', # Not used with sqlite3.
'PASSWORD': '',
'HOST': 'golem',
'PORT': '',
}
}
DEBUG = False
TEMPLATE_DEBUG = F... | from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'docs',
'USER': 'postgres', # Not used with sqlite3.
'PASSWORD': '',
'HOST': '10.177.73.97',
'PORT': '',
}
}
DEBUG = False
TEMPLATE_DE... | <commit_before>from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'docs',
'USER': 'postgres', # Not used with sqlite3.
'PASSWORD': '',
'HOST': 'golem',
'PORT': '',
}
}
DEBUG = False
TEM... | from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'docs',
'USER': 'postgres', # Not used with sqlite3.
'PASSWORD': '',
'HOST': '10.177.73.97',
'PORT': '',
}
}
DEBUG = False
TEMPLATE_DE... | from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'docs',
'USER': 'postgres', # Not used with sqlite3.
'PASSWORD': '',
'HOST': 'golem',
'PORT': '',
}
}
DEBUG = False
TEMPLATE_DEBUG = F... | <commit_before>from .base import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'docs',
'USER': 'postgres', # Not used with sqlite3.
'PASSWORD': '',
'HOST': 'golem',
'PORT': '',
}
}
DEBUG = False
TEM... |
6749c5a4541836fcf25abbc571082b4c909b0bbb | corehq/apps/app_manager/migrations/0019_exchangeapplication_required_privileges.py | corehq/apps/app_manager/migrations/0019_exchangeapplication_required_privileges.py | # Generated by Django 2.2.24 on 2021-09-14 17:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_manager', '0018_migrate_case_search_labels'),
]
operations = [
migrations.AddField(
model_name='exchangeapplication',
... | # Generated by Django 2.2.24 on 2021-09-14 17:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_manager', '0018_migrate_case_search_labels'),
]
operations = [
migrations.AddField(
model_name='exchangeapplication',
... | Fix migration with help text | Fix migration with help text
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | # Generated by Django 2.2.24 on 2021-09-14 17:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_manager', '0018_migrate_case_search_labels'),
]
operations = [
migrations.AddField(
model_name='exchangeapplication',
... | # Generated by Django 2.2.24 on 2021-09-14 17:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_manager', '0018_migrate_case_search_labels'),
]
operations = [
migrations.AddField(
model_name='exchangeapplication',
... | <commit_before># Generated by Django 2.2.24 on 2021-09-14 17:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_manager', '0018_migrate_case_search_labels'),
]
operations = [
migrations.AddField(
model_name='exchangeappl... | # Generated by Django 2.2.24 on 2021-09-14 17:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_manager', '0018_migrate_case_search_labels'),
]
operations = [
migrations.AddField(
model_name='exchangeapplication',
... | # Generated by Django 2.2.24 on 2021-09-14 17:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_manager', '0018_migrate_case_search_labels'),
]
operations = [
migrations.AddField(
model_name='exchangeapplication',
... | <commit_before># Generated by Django 2.2.24 on 2021-09-14 17:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_manager', '0018_migrate_case_search_labels'),
]
operations = [
migrations.AddField(
model_name='exchangeappl... |
3291b015a5f3d311c72980913756a08d87b1ac1a | scripts/blacklisted.py | scripts/blacklisted.py | import os
import platform
# If you are adding a new entry, please include a short comment
# explaining why the specific test is blacklisted.
_unix_black_list = set([name.lower() for name in [
'blackparrot',
'blackucode',
'blackunicore',
'earlgrey_nexysvideo', # ram size in ci machines
'lpddr',
'simplepa... | import os
import platform
# If you are adding a new entry, please include a short comment
# explaining why the specific test is blacklisted.
_unix_black_list = set([name.lower() for name in [
'blackparrot',
'blackucode',
'blackunicore',
'earlgrey_nexysvideo', # ram size in ci machines
'lpddr',
'rsd', ... | Exclude a few failing tests | Exclude a few failing tests
Rsd - failing on linux due to running out of memory
Verilator - failing on Windows clang due to stack overflow caused by
expression evaluation
| Python | apache-2.0 | chipsalliance/Surelog,alainmarcel/Surelog,alainmarcel/Surelog,chipsalliance/Surelog,alainmarcel/Surelog,chipsalliance/Surelog,alainmarcel/Surelog,chipsalliance/Surelog | import os
import platform
# If you are adding a new entry, please include a short comment
# explaining why the specific test is blacklisted.
_unix_black_list = set([name.lower() for name in [
'blackparrot',
'blackucode',
'blackunicore',
'earlgrey_nexysvideo', # ram size in ci machines
'lpddr',
'simplepa... | import os
import platform
# If you are adding a new entry, please include a short comment
# explaining why the specific test is blacklisted.
_unix_black_list = set([name.lower() for name in [
'blackparrot',
'blackucode',
'blackunicore',
'earlgrey_nexysvideo', # ram size in ci machines
'lpddr',
'rsd', ... | <commit_before>import os
import platform
# If you are adding a new entry, please include a short comment
# explaining why the specific test is blacklisted.
_unix_black_list = set([name.lower() for name in [
'blackparrot',
'blackucode',
'blackunicore',
'earlgrey_nexysvideo', # ram size in ci machines
'lpdd... | import os
import platform
# If you are adding a new entry, please include a short comment
# explaining why the specific test is blacklisted.
_unix_black_list = set([name.lower() for name in [
'blackparrot',
'blackucode',
'blackunicore',
'earlgrey_nexysvideo', # ram size in ci machines
'lpddr',
'rsd', ... | import os
import platform
# If you are adding a new entry, please include a short comment
# explaining why the specific test is blacklisted.
_unix_black_list = set([name.lower() for name in [
'blackparrot',
'blackucode',
'blackunicore',
'earlgrey_nexysvideo', # ram size in ci machines
'lpddr',
'simplepa... | <commit_before>import os
import platform
# If you are adding a new entry, please include a short comment
# explaining why the specific test is blacklisted.
_unix_black_list = set([name.lower() for name in [
'blackparrot',
'blackucode',
'blackunicore',
'earlgrey_nexysvideo', # ram size in ci machines
'lpdd... |
77fc06c0ee8ca2c8669ca1cd7f45babb21d75ba5 | opps/__init__.py | opps/__init__.py | import pkg_resources
pkg_resources.declare_namespace(__name__) | # See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__) | Remove opps package on opps-polls | Remove opps package on opps-polls
| Python | mit | opps/opps-polls,opps/opps-polls | import pkg_resources
pkg_resources.declare_namespace(__name__)Remove opps package on opps-polls | # See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__) | <commit_before>import pkg_resources
pkg_resources.declare_namespace(__name__)<commit_msg>Remove opps package on opps-polls<commit_after> | # See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__) | import pkg_resources
pkg_resources.declare_namespace(__name__)Remove opps package on opps-polls# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(... | <commit_before>import pkg_resources
pkg_resources.declare_namespace(__name__)<commit_msg>Remove opps package on opps-polls<commit_after># See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil impor... |
fb427a72bf3d8fb3802689bf89a9d71dee47108c | semillas_backend/users/serializers.py | semillas_backend/users/serializers.py | #from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from ... | #from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from ... | Add location to user profile post | Add location to user profile post
| Python | mit | Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_platform | #from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from ... | #from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from ... | <commit_before>#from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRendere... | #from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from ... | #from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from ... | <commit_before>#from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRendere... |
54f27f507820b5c9a7e832c46eb2a5ba3d918a2f | scripts/task/solver.py | scripts/task/solver.py | import numpy as np
from eigen3 import toEigen
import rbdyn as rbd
class WLSSolver(object):
def __init__(self):
self.tasks = []
def addTask(self, task, weight):
t = [task, weight]
self.tasks.append(t)
return t
def rmTask(self, taskDef):
self.tasks.remove(taskDef)
def solve(self, mb, ... | import numpy as np
from eigen3 import toEigenX
import rbdyn as rbd
class WLSSolver(object):
def __init__(self):
self.tasks = []
def addTask(self, task, weight):
t = [task, weight]
self.tasks.append(t)
return t
def rmTask(self, taskDef):
self.tasks.remove(taskDef)
def solve(self, mb,... | Fix a bad eigen vector cast. | Fix a bad eigen vector cast.
| Python | bsd-2-clause | jrl-umi3218/RBDyn,gergondet/RBDyn,gergondet/RBDyn,gergondet/RBDyn,jrl-umi3218/RBDyn,jrl-umi3218/RBDyn,jrl-umi3218/RBDyn,gergondet/RBDyn,gergondet/RBDyn | import numpy as np
from eigen3 import toEigen
import rbdyn as rbd
class WLSSolver(object):
def __init__(self):
self.tasks = []
def addTask(self, task, weight):
t = [task, weight]
self.tasks.append(t)
return t
def rmTask(self, taskDef):
self.tasks.remove(taskDef)
def solve(self, mb, ... | import numpy as np
from eigen3 import toEigenX
import rbdyn as rbd
class WLSSolver(object):
def __init__(self):
self.tasks = []
def addTask(self, task, weight):
t = [task, weight]
self.tasks.append(t)
return t
def rmTask(self, taskDef):
self.tasks.remove(taskDef)
def solve(self, mb,... | <commit_before>import numpy as np
from eigen3 import toEigen
import rbdyn as rbd
class WLSSolver(object):
def __init__(self):
self.tasks = []
def addTask(self, task, weight):
t = [task, weight]
self.tasks.append(t)
return t
def rmTask(self, taskDef):
self.tasks.remove(taskDef)
def s... | import numpy as np
from eigen3 import toEigenX
import rbdyn as rbd
class WLSSolver(object):
def __init__(self):
self.tasks = []
def addTask(self, task, weight):
t = [task, weight]
self.tasks.append(t)
return t
def rmTask(self, taskDef):
self.tasks.remove(taskDef)
def solve(self, mb,... | import numpy as np
from eigen3 import toEigen
import rbdyn as rbd
class WLSSolver(object):
def __init__(self):
self.tasks = []
def addTask(self, task, weight):
t = [task, weight]
self.tasks.append(t)
return t
def rmTask(self, taskDef):
self.tasks.remove(taskDef)
def solve(self, mb, ... | <commit_before>import numpy as np
from eigen3 import toEigen
import rbdyn as rbd
class WLSSolver(object):
def __init__(self):
self.tasks = []
def addTask(self, task, weight):
t = [task, weight]
self.tasks.append(t)
return t
def rmTask(self, taskDef):
self.tasks.remove(taskDef)
def s... |
e913ed7d5643c4acc85ed7ec82a70c235053360f | tests/test_token.py | tests/test_token.py | """
NOTE: There are no tests that check for data validation at this point since
the interpreter doesn't have any data validation as a feature.
"""
import pytest
from calc import INTEGER, Token
def test_no_defaults():
# There's no valid defaults at the moment.
with pytest.raises(TypeError):
Token()
... | import pytest
from calc import INTEGER, Token
def test_token_cannot_be_instantiated_with_no_defaults():
"""
Test that there are currently no valid defaults for a :class:`Token`. More
simply, ensure that a :class:`Token` cannot be instantiated without any
arguments.
"""
with pytest.raises(Type... | Improve documentation in token tests. Rename functions to be more clear | Improve documentation in token tests. Rename functions to be more clear
| Python | isc | bike-barn/red-green-refactor | """
NOTE: There are no tests that check for data validation at this point since
the interpreter doesn't have any data validation as a feature.
"""
import pytest
from calc import INTEGER, Token
def test_no_defaults():
# There's no valid defaults at the moment.
with pytest.raises(TypeError):
Token()
... | import pytest
from calc import INTEGER, Token
def test_token_cannot_be_instantiated_with_no_defaults():
"""
Test that there are currently no valid defaults for a :class:`Token`. More
simply, ensure that a :class:`Token` cannot be instantiated without any
arguments.
"""
with pytest.raises(Type... | <commit_before>"""
NOTE: There are no tests that check for data validation at this point since
the interpreter doesn't have any data validation as a feature.
"""
import pytest
from calc import INTEGER, Token
def test_no_defaults():
# There's no valid defaults at the moment.
with pytest.raises(TypeError):
... | import pytest
from calc import INTEGER, Token
def test_token_cannot_be_instantiated_with_no_defaults():
"""
Test that there are currently no valid defaults for a :class:`Token`. More
simply, ensure that a :class:`Token` cannot be instantiated without any
arguments.
"""
with pytest.raises(Type... | """
NOTE: There are no tests that check for data validation at this point since
the interpreter doesn't have any data validation as a feature.
"""
import pytest
from calc import INTEGER, Token
def test_no_defaults():
# There's no valid defaults at the moment.
with pytest.raises(TypeError):
Token()
... | <commit_before>"""
NOTE: There are no tests that check for data validation at this point since
the interpreter doesn't have any data validation as a feature.
"""
import pytest
from calc import INTEGER, Token
def test_no_defaults():
# There's no valid defaults at the moment.
with pytest.raises(TypeError):
... |
9b043b0bd31f35e140831f61a4484513922f8712 | stop_words/__init__.py | stop_words/__init__.py | import os
__VERSION__ = (2014, 5, 26)
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
STOP_WORDS_DIR = os.path.join(CURRENT_DIR, 'stop-words/')
def get_version():
"""
:rtype: basestring
"""
return ".".join(str(v) for v in __VERSION__)
def get_stop_words(language):
"""
:type langua... | import os
__VERSION__ = (2014, 5, 26)
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
STOP_WORDS_DIR = os.path.join(CURRENT_DIR, 'stop-words/')
LANGUAGE_MAPPING = {
'ar': 'arabic',
'da': 'danish',
'nl': 'dutch',
'en': 'english',
'fi': 'finnish',
'fr': 'french',
'de': 'german',
... | Implement language code mapping and check availability of the language | Implement language code mapping and check availability of the language
| Python | bsd-3-clause | Alir3z4/python-stop-words | import os
__VERSION__ = (2014, 5, 26)
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
STOP_WORDS_DIR = os.path.join(CURRENT_DIR, 'stop-words/')
def get_version():
"""
:rtype: basestring
"""
return ".".join(str(v) for v in __VERSION__)
def get_stop_words(language):
"""
:type langua... | import os
__VERSION__ = (2014, 5, 26)
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
STOP_WORDS_DIR = os.path.join(CURRENT_DIR, 'stop-words/')
LANGUAGE_MAPPING = {
'ar': 'arabic',
'da': 'danish',
'nl': 'dutch',
'en': 'english',
'fi': 'finnish',
'fr': 'french',
'de': 'german',
... | <commit_before>import os
__VERSION__ = (2014, 5, 26)
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
STOP_WORDS_DIR = os.path.join(CURRENT_DIR, 'stop-words/')
def get_version():
"""
:rtype: basestring
"""
return ".".join(str(v) for v in __VERSION__)
def get_stop_words(language):
"""
... | import os
__VERSION__ = (2014, 5, 26)
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
STOP_WORDS_DIR = os.path.join(CURRENT_DIR, 'stop-words/')
LANGUAGE_MAPPING = {
'ar': 'arabic',
'da': 'danish',
'nl': 'dutch',
'en': 'english',
'fi': 'finnish',
'fr': 'french',
'de': 'german',
... | import os
__VERSION__ = (2014, 5, 26)
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
STOP_WORDS_DIR = os.path.join(CURRENT_DIR, 'stop-words/')
def get_version():
"""
:rtype: basestring
"""
return ".".join(str(v) for v in __VERSION__)
def get_stop_words(language):
"""
:type langua... | <commit_before>import os
__VERSION__ = (2014, 5, 26)
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
STOP_WORDS_DIR = os.path.join(CURRENT_DIR, 'stop-words/')
def get_version():
"""
:rtype: basestring
"""
return ".".join(str(v) for v in __VERSION__)
def get_stop_words(language):
"""
... |
c30bd67d4fc1773ce8b0752d8e4a7cc00e2a7ae4 | app/forms.py | app/forms.py | from flask.ext.wtf import Form
from wtforms import StringField, BooleanField
from wtforms.validators import DataRequired
class LoginForm(Form):
openid = StringField('openid', validators=[DataRequired()])
remember_me = BooleanField('remember_me', default=False)
| from flask.ext.wtf import Form
from wtforms import StringField, BooleanField, TextAreaField
from wtforms.validators import DataRequired, Length
class LoginForm(Form):
openid = StringField('openid', validators=[DataRequired()])
remember_me = BooleanField('remember_me', default=False)
class EditForm(Form):
... | Define the edit profile form | Define the edit profile form
| Python | mit | ddayguerrero/blogme,ddayguerrero/blogme,ddayguerrero/blogme,ddayguerrero/blogme,ddayguerrero/blogme | from flask.ext.wtf import Form
from wtforms import StringField, BooleanField
from wtforms.validators import DataRequired
class LoginForm(Form):
openid = StringField('openid', validators=[DataRequired()])
remember_me = BooleanField('remember_me', default=False)
Define the edit profile form | from flask.ext.wtf import Form
from wtforms import StringField, BooleanField, TextAreaField
from wtforms.validators import DataRequired, Length
class LoginForm(Form):
openid = StringField('openid', validators=[DataRequired()])
remember_me = BooleanField('remember_me', default=False)
class EditForm(Form):
... | <commit_before>from flask.ext.wtf import Form
from wtforms import StringField, BooleanField
from wtforms.validators import DataRequired
class LoginForm(Form):
openid = StringField('openid', validators=[DataRequired()])
remember_me = BooleanField('remember_me', default=False)
<commit_msg>Define the edit profil... | from flask.ext.wtf import Form
from wtforms import StringField, BooleanField, TextAreaField
from wtforms.validators import DataRequired, Length
class LoginForm(Form):
openid = StringField('openid', validators=[DataRequired()])
remember_me = BooleanField('remember_me', default=False)
class EditForm(Form):
... | from flask.ext.wtf import Form
from wtforms import StringField, BooleanField
from wtforms.validators import DataRequired
class LoginForm(Form):
openid = StringField('openid', validators=[DataRequired()])
remember_me = BooleanField('remember_me', default=False)
Define the edit profile formfrom flask.ext.wtf im... | <commit_before>from flask.ext.wtf import Form
from wtforms import StringField, BooleanField
from wtforms.validators import DataRequired
class LoginForm(Form):
openid = StringField('openid', validators=[DataRequired()])
remember_me = BooleanField('remember_me', default=False)
<commit_msg>Define the edit profil... |
1d0dd7856d1c1e80f24a94af4fc323530383b009 | readthedocs/gold/models.py | readthedocs/gold/models.py | from django.db import models
from django.utils.translation import ugettext_lazy as _
LEVEL_CHOICES = (
('v1-org-patron', '$5'),
('v1-org-supporter', '$10'),
)
class GoldUser(models.Model):
pub_date = models.DateTimeField(_('Publication date'), auto_now_add=True)
modified_date = models.DateTimeField(_... | from django.db import models
from django.utils.translation import ugettext_lazy as _
LEVEL_CHOICES = (
('v1-org-5', '$5/mo'),
('v1-org-10', '$10/mo'),
('v1-org-15', '$15/mo'),
('v1-org-20', '$20/mo'),
('v1-org-50', '$50/mo'),
('v1-org-100', '$100/mo'),
)
class GoldUser(models.Model):
pub_... | Update plan names and levels | Update plan names and levels
| Python | mit | hach-que/readthedocs.org,istresearch/readthedocs.org,VishvajitP/readthedocs.org,laplaceliu/readthedocs.org,stevepiercy/readthedocs.org,VishvajitP/readthedocs.org,davidfischer/readthedocs.org,jerel/readthedocs.org,clarkperkins/readthedocs.org,soulshake/readthedocs.org,sunnyzwh/readthedocs.org,michaelmcandrew/readthedocs... | from django.db import models
from django.utils.translation import ugettext_lazy as _
LEVEL_CHOICES = (
('v1-org-patron', '$5'),
('v1-org-supporter', '$10'),
)
class GoldUser(models.Model):
pub_date = models.DateTimeField(_('Publication date'), auto_now_add=True)
modified_date = models.DateTimeField(_... | from django.db import models
from django.utils.translation import ugettext_lazy as _
LEVEL_CHOICES = (
('v1-org-5', '$5/mo'),
('v1-org-10', '$10/mo'),
('v1-org-15', '$15/mo'),
('v1-org-20', '$20/mo'),
('v1-org-50', '$50/mo'),
('v1-org-100', '$100/mo'),
)
class GoldUser(models.Model):
pub_... | <commit_before>from django.db import models
from django.utils.translation import ugettext_lazy as _
LEVEL_CHOICES = (
('v1-org-patron', '$5'),
('v1-org-supporter', '$10'),
)
class GoldUser(models.Model):
pub_date = models.DateTimeField(_('Publication date'), auto_now_add=True)
modified_date = models.... | from django.db import models
from django.utils.translation import ugettext_lazy as _
LEVEL_CHOICES = (
('v1-org-5', '$5/mo'),
('v1-org-10', '$10/mo'),
('v1-org-15', '$15/mo'),
('v1-org-20', '$20/mo'),
('v1-org-50', '$50/mo'),
('v1-org-100', '$100/mo'),
)
class GoldUser(models.Model):
pub_... | from django.db import models
from django.utils.translation import ugettext_lazy as _
LEVEL_CHOICES = (
('v1-org-patron', '$5'),
('v1-org-supporter', '$10'),
)
class GoldUser(models.Model):
pub_date = models.DateTimeField(_('Publication date'), auto_now_add=True)
modified_date = models.DateTimeField(_... | <commit_before>from django.db import models
from django.utils.translation import ugettext_lazy as _
LEVEL_CHOICES = (
('v1-org-patron', '$5'),
('v1-org-supporter', '$10'),
)
class GoldUser(models.Model):
pub_date = models.DateTimeField(_('Publication date'), auto_now_add=True)
modified_date = models.... |
e8aca80abcf8c309c13360c386b9505a595e1998 | app/oauth.py | app/oauth.py | # -*- coding: utf-8 -*-
import logging
import httplib2
import json
import time
import random
from apiclient import errors
from apiclient.discovery import build
from oauth2client.client import SignedJwtAssertionCredentials
class OAuth():
__services = dict()
@staticmethod
def getCredentials(email, scopes, ... | # -*- coding: utf-8 -*-
import logging
import httplib2
import json
import time
import random
from apiclient import errors
from apiclient.discovery import build
from oauth2client.client import SignedJwtAssertionCredentials
class OAuth():
__services = dict()
@staticmethod
def getCredentials(email, scopes, ... | Revert "Do not cache discovery" | Revert "Do not cache discovery"
This reverts commit fcd37e8228d66230008963008a24e9a8afc669e7.
| Python | mit | lumapps/lumRest | # -*- coding: utf-8 -*-
import logging
import httplib2
import json
import time
import random
from apiclient import errors
from apiclient.discovery import build
from oauth2client.client import SignedJwtAssertionCredentials
class OAuth():
__services = dict()
@staticmethod
def getCredentials(email, scopes, ... | # -*- coding: utf-8 -*-
import logging
import httplib2
import json
import time
import random
from apiclient import errors
from apiclient.discovery import build
from oauth2client.client import SignedJwtAssertionCredentials
class OAuth():
__services = dict()
@staticmethod
def getCredentials(email, scopes, ... | <commit_before># -*- coding: utf-8 -*-
import logging
import httplib2
import json
import time
import random
from apiclient import errors
from apiclient.discovery import build
from oauth2client.client import SignedJwtAssertionCredentials
class OAuth():
__services = dict()
@staticmethod
def getCredentials(... | # -*- coding: utf-8 -*-
import logging
import httplib2
import json
import time
import random
from apiclient import errors
from apiclient.discovery import build
from oauth2client.client import SignedJwtAssertionCredentials
class OAuth():
__services = dict()
@staticmethod
def getCredentials(email, scopes, ... | # -*- coding: utf-8 -*-
import logging
import httplib2
import json
import time
import random
from apiclient import errors
from apiclient.discovery import build
from oauth2client.client import SignedJwtAssertionCredentials
class OAuth():
__services = dict()
@staticmethod
def getCredentials(email, scopes, ... | <commit_before># -*- coding: utf-8 -*-
import logging
import httplib2
import json
import time
import random
from apiclient import errors
from apiclient.discovery import build
from oauth2client.client import SignedJwtAssertionCredentials
class OAuth():
__services = dict()
@staticmethod
def getCredentials(... |
eb2f19a95175d68c5ac5345d38c8ce8db3b3ba9c | packs/linux/actions/get_open_ports.py | packs/linux/actions/get_open_ports.py | import nmap
from st2actions.runners.pythonrunner import Action
"""
Note: This action requires nmap binary to be available and needs to run as root.
"""
class PortScanner(Action):
def run(self, host):
result = []
port_details = {}
ps = nmap.PortScanner()
scan_res = ps.scan(host, arguments='--min-pa... | import nmap
from st2actions.runners.pythonrunner import Action
"""
Note: This action requires nmap binary to be available and needs to run as root.
"""
class PortScanner(Action):
def run(self, host):
result = []
port_details = {}
ps = nmap.PortScanner()
scan_res = ps.scan(host, arguments='--min-pa... | Remove unused main entry point. | Remove unused main entry point.
| Python | apache-2.0 | pinterb/st2contrib,psychopenguin/st2contrib,tonybaloney/st2contrib,jtopjian/st2contrib,StackStorm/st2contrib,pearsontechnology/st2contrib,psychopenguin/st2contrib,lmEshoo/st2contrib,lmEshoo/st2contrib,meirwah/st2contrib,pidah/st2contrib,armab/st2contrib,tonybaloney/st2contrib,pearsontechnology/st2contrib,digideskio/st2... | import nmap
from st2actions.runners.pythonrunner import Action
"""
Note: This action requires nmap binary to be available and needs to run as root.
"""
class PortScanner(Action):
def run(self, host):
result = []
port_details = {}
ps = nmap.PortScanner()
scan_res = ps.scan(host, arguments='--min-pa... | import nmap
from st2actions.runners.pythonrunner import Action
"""
Note: This action requires nmap binary to be available and needs to run as root.
"""
class PortScanner(Action):
def run(self, host):
result = []
port_details = {}
ps = nmap.PortScanner()
scan_res = ps.scan(host, arguments='--min-pa... | <commit_before>import nmap
from st2actions.runners.pythonrunner import Action
"""
Note: This action requires nmap binary to be available and needs to run as root.
"""
class PortScanner(Action):
def run(self, host):
result = []
port_details = {}
ps = nmap.PortScanner()
scan_res = ps.scan(host, argu... | import nmap
from st2actions.runners.pythonrunner import Action
"""
Note: This action requires nmap binary to be available and needs to run as root.
"""
class PortScanner(Action):
def run(self, host):
result = []
port_details = {}
ps = nmap.PortScanner()
scan_res = ps.scan(host, arguments='--min-pa... | import nmap
from st2actions.runners.pythonrunner import Action
"""
Note: This action requires nmap binary to be available and needs to run as root.
"""
class PortScanner(Action):
def run(self, host):
result = []
port_details = {}
ps = nmap.PortScanner()
scan_res = ps.scan(host, arguments='--min-pa... | <commit_before>import nmap
from st2actions.runners.pythonrunner import Action
"""
Note: This action requires nmap binary to be available and needs to run as root.
"""
class PortScanner(Action):
def run(self, host):
result = []
port_details = {}
ps = nmap.PortScanner()
scan_res = ps.scan(host, argu... |
0024b8b921d788a0539bc242bd1600c0da666bd6 | panoptes/state_machine/states/core.py | panoptes/state_machine/states/core.py | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | Remove return state from main `main` | Remove return state from main `main`
| Python | mit | panoptes/POCS,panoptes/POCS,joshwalawender/POCS,AstroHuntsman/POCS,joshwalawender/POCS,joshwalawender/POCS,panoptes/POCS,panoptes/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | <commit_before>import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('p... | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)... | <commit_before>import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('p... |
b529ef8eb6985103e8b0a0cf81399a50a26c05f5 | app/views.py | app/views.py | from app import mulungwishi_app as url
from flask import render_template
@url.route('/')
def index():
return render_template('index.html')
@url.route('/<query>')
def print_user_input(query):
if '=' in query:
query_container, query_value = query.split('=')
return 'Your query is {} which is eq... | from app import mulungwishi_app as url
from flask import render_template
@url.route('/')
def index():
return render_template('index.html')
@url.route('/<query>')
def print_user_input(query):
if '=' in query:
query_container, query_value = query.split('=')
return 'Your query is {} which is eq... | Replace 404 redirection for incorrect query | Replace 404 redirection for incorrect query
| Python | mit | admiral96/mulungwishi-webhook,engagespark/mulungwishi-webhook,engagespark/public-webhooks,engagespark/public-webhooks,admiral96/public-webhooks,admiral96/mulungwishi-webhook,engagespark/mulungwishi-webhook,admiral96/public-webhooks | from app import mulungwishi_app as url
from flask import render_template
@url.route('/')
def index():
return render_template('index.html')
@url.route('/<query>')
def print_user_input(query):
if '=' in query:
query_container, query_value = query.split('=')
return 'Your query is {} which is eq... | from app import mulungwishi_app as url
from flask import render_template
@url.route('/')
def index():
return render_template('index.html')
@url.route('/<query>')
def print_user_input(query):
if '=' in query:
query_container, query_value = query.split('=')
return 'Your query is {} which is eq... | <commit_before>from app import mulungwishi_app as url
from flask import render_template
@url.route('/')
def index():
return render_template('index.html')
@url.route('/<query>')
def print_user_input(query):
if '=' in query:
query_container, query_value = query.split('=')
return 'Your query is... | from app import mulungwishi_app as url
from flask import render_template
@url.route('/')
def index():
return render_template('index.html')
@url.route('/<query>')
def print_user_input(query):
if '=' in query:
query_container, query_value = query.split('=')
return 'Your query is {} which is eq... | from app import mulungwishi_app as url
from flask import render_template
@url.route('/')
def index():
return render_template('index.html')
@url.route('/<query>')
def print_user_input(query):
if '=' in query:
query_container, query_value = query.split('=')
return 'Your query is {} which is eq... | <commit_before>from app import mulungwishi_app as url
from flask import render_template
@url.route('/')
def index():
return render_template('index.html')
@url.route('/<query>')
def print_user_input(query):
if '=' in query:
query_container, query_value = query.split('=')
return 'Your query is... |
e45b3d3a2428d3703260c25b4275359bf6786a37 | launcher.py | launcher.py | from pract2d.game import gamemanager
if __name__ == '__main__':
game = gamemanager.GameManager()
game.run()
| from pract2d.game import gamemanager
from pract2d.core import files
from platform import system
import os
if __name__ == '__main__':
try:
if system() == 'Windows' or not os.environ["PYSDL2_DLL_PATH"]:
os.environ["PYSDL2_DLL_PATH"] = files.get_path()
except KeyError:
pass
game = ... | Set the default sdl2 library locations. | Set the default sdl2 library locations.
| Python | bsd-2-clause | mdsitton/pract2d | from pract2d.game import gamemanager
if __name__ == '__main__':
game = gamemanager.GameManager()
game.run()
Set the default sdl2 library locations. | from pract2d.game import gamemanager
from pract2d.core import files
from platform import system
import os
if __name__ == '__main__':
try:
if system() == 'Windows' or not os.environ["PYSDL2_DLL_PATH"]:
os.environ["PYSDL2_DLL_PATH"] = files.get_path()
except KeyError:
pass
game = ... | <commit_before>from pract2d.game import gamemanager
if __name__ == '__main__':
game = gamemanager.GameManager()
game.run()
<commit_msg>Set the default sdl2 library locations.<commit_after> | from pract2d.game import gamemanager
from pract2d.core import files
from platform import system
import os
if __name__ == '__main__':
try:
if system() == 'Windows' or not os.environ["PYSDL2_DLL_PATH"]:
os.environ["PYSDL2_DLL_PATH"] = files.get_path()
except KeyError:
pass
game = ... | from pract2d.game import gamemanager
if __name__ == '__main__':
game = gamemanager.GameManager()
game.run()
Set the default sdl2 library locations.from pract2d.game import gamemanager
from pract2d.core import files
from platform import system
import os
if __name__ == '__main__':
try:
if system() =... | <commit_before>from pract2d.game import gamemanager
if __name__ == '__main__':
game = gamemanager.GameManager()
game.run()
<commit_msg>Set the default sdl2 library locations.<commit_after>from pract2d.game import gamemanager
from pract2d.core import files
from platform import system
import os
if __name__ == '... |
5c90e74139f2735d0b4d62f524eb624780c48847 | scripts/migration/projectorganizer/migrate_projectorganizer.py | scripts/migration/projectorganizer/migrate_projectorganizer.py | """Fixes nodes without is_folder set.
This script must be run from the OSF root directory for the imports to work.
"""
from framework.mongo import database
def main():
database['node'].update({"is_folder": {'$exists': False}}, {'$set': {'is_folder': False}}, multi=True)
print('-----\nDone.')
if __name__ ... | """Fixes nodes without is_folder set.
This script must be run from the OSF root directory for the imports to work.
"""
from framework.mongo import database
def main():
database['node'].update({"is_folder": {'$exists': False}}, {'$set': {'is_folder': False}}, multi=True)
database['node'].update({"is_dashboa... | Update migration to ensure node's have is_dashboard and expanded fields | Update migration to ensure node's have is_dashboard and expanded fields
| Python | apache-2.0 | kushG/osf.io,cwisecarver/osf.io,cldershem/osf.io,caseyrygt/osf.io,ticklemepierce/osf.io,brandonPurvis/osf.io,danielneis/osf.io,rdhyee/osf.io,pattisdr/osf.io,barbour-em/osf.io,Johnetordoff/osf.io,felliott/osf.io,samchrisinger/osf.io,Johnetordoff/osf.io,mfraezz/osf.io,DanielSBrown/osf.io,crcresearch/osf.io,mluke93/osf.io... | """Fixes nodes without is_folder set.
This script must be run from the OSF root directory for the imports to work.
"""
from framework.mongo import database
def main():
database['node'].update({"is_folder": {'$exists': False}}, {'$set': {'is_folder': False}}, multi=True)
print('-----\nDone.')
if __name__ ... | """Fixes nodes without is_folder set.
This script must be run from the OSF root directory for the imports to work.
"""
from framework.mongo import database
def main():
database['node'].update({"is_folder": {'$exists': False}}, {'$set': {'is_folder': False}}, multi=True)
database['node'].update({"is_dashboa... | <commit_before>"""Fixes nodes without is_folder set.
This script must be run from the OSF root directory for the imports to work.
"""
from framework.mongo import database
def main():
database['node'].update({"is_folder": {'$exists': False}}, {'$set': {'is_folder': False}}, multi=True)
print('-----\nDone.'... | """Fixes nodes without is_folder set.
This script must be run from the OSF root directory for the imports to work.
"""
from framework.mongo import database
def main():
database['node'].update({"is_folder": {'$exists': False}}, {'$set': {'is_folder': False}}, multi=True)
database['node'].update({"is_dashboa... | """Fixes nodes without is_folder set.
This script must be run from the OSF root directory for the imports to work.
"""
from framework.mongo import database
def main():
database['node'].update({"is_folder": {'$exists': False}}, {'$set': {'is_folder': False}}, multi=True)
print('-----\nDone.')
if __name__ ... | <commit_before>"""Fixes nodes without is_folder set.
This script must be run from the OSF root directory for the imports to work.
"""
from framework.mongo import database
def main():
database['node'].update({"is_folder": {'$exists': False}}, {'$set': {'is_folder': False}}, multi=True)
print('-----\nDone.'... |
42465957542fe232739d58c2a46098d13fb9c995 | tests/parser_db.py | tests/parser_db.py | from compiler import error, parse
class ParserDB():
"""A class for parsing with memoized parsers."""
parsers = {}
@classmethod
def _parse(cls, data, start='program'):
mock = error.LoggerMock()
try:
parser = cls.parsers[start]
except KeyError:
parser =... | from compiler import error, parse
class ParserDB():
"""A class for parsing with memoized parsers."""
parsers = {}
@classmethod
def _parse(cls, data, start='program'):
mock = error.LoggerMock()
try:
parser = cls.parsers[start]
except KeyError:
parser =... | Clear previous logger state on each call. | ParserDB: Clear previous logger state on each call.
| Python | mit | Renelvon/llama,dionyziz/llama,dionyziz/llama,Renelvon/llama | from compiler import error, parse
class ParserDB():
"""A class for parsing with memoized parsers."""
parsers = {}
@classmethod
def _parse(cls, data, start='program'):
mock = error.LoggerMock()
try:
parser = cls.parsers[start]
except KeyError:
parser =... | from compiler import error, parse
class ParserDB():
"""A class for parsing with memoized parsers."""
parsers = {}
@classmethod
def _parse(cls, data, start='program'):
mock = error.LoggerMock()
try:
parser = cls.parsers[start]
except KeyError:
parser =... | <commit_before>from compiler import error, parse
class ParserDB():
"""A class for parsing with memoized parsers."""
parsers = {}
@classmethod
def _parse(cls, data, start='program'):
mock = error.LoggerMock()
try:
parser = cls.parsers[start]
except KeyError:
... | from compiler import error, parse
class ParserDB():
"""A class for parsing with memoized parsers."""
parsers = {}
@classmethod
def _parse(cls, data, start='program'):
mock = error.LoggerMock()
try:
parser = cls.parsers[start]
except KeyError:
parser =... | from compiler import error, parse
class ParserDB():
"""A class for parsing with memoized parsers."""
parsers = {}
@classmethod
def _parse(cls, data, start='program'):
mock = error.LoggerMock()
try:
parser = cls.parsers[start]
except KeyError:
parser =... | <commit_before>from compiler import error, parse
class ParserDB():
"""A class for parsing with memoized parsers."""
parsers = {}
@classmethod
def _parse(cls, data, start='program'):
mock = error.LoggerMock()
try:
parser = cls.parsers[start]
except KeyError:
... |
c01cef9340a3d55884fe38b60b209dbad5f97ea6 | nova/db/sqlalchemy/migrate_repo/versions/080_add_hypervisor_hostname_to_compute_nodes.py | nova/db/sqlalchemy/migrate_repo/versions/080_add_hypervisor_hostname_to_compute_nodes.py | # Copyright 2012 OpenStack, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | # Copyright 2012 OpenStack, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | Use sqlalchemy reflection in migration 080 | Use sqlalchemy reflection in migration 080
Change-Id: If2a0e59461d108d59c6e9907d3db053ba2b44f57
| Python | apache-2.0 | petrutlucian94/nova,adelina-t/nova,DirectXMan12/nova-hacking,sridevikoushik31/nova,gooddata/openstack-nova,alvarolopez/nova,whitepages/nova,thomasem/nova,affo/nova,berrange/nova,eayunstack/nova,mahak/nova,cernops/nova,felixma/nova,apporc/nova,cyx1231st/nova,openstack/nova,klmitch/nova,JianyuWang/nova,CiscoSystems/nova,... | # Copyright 2012 OpenStack, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | # Copyright 2012 OpenStack, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | <commit_before># Copyright 2012 OpenStack, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | # Copyright 2012 OpenStack, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | # Copyright 2012 OpenStack, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | <commit_before># Copyright 2012 OpenStack, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
452955ca8b7ba2ef01fc97800e5f350fee3e3a6e | tvnamer/renamer.py | tvnamer/renamer.py | import re
import os
import pytvdbapi.api as tvdb
class Renamer:
def __init__(self, api_key):
self.tvdb = tvdb.TVDB(api_key)
@staticmethod
def flat_file_list(directory):
directory = os.path.normpath(directory)
for dirpath, dirnames, filenames in os.walk(directory):
fo... | import re
import os
import pytvdbapi.api as tvdb
class Renamer:
def __init__(self, api_key):
self.tvdb = tvdb.TVDB(api_key)
@staticmethod
def flat_file_list(directory):
directory = os.path.normpath(directory)
for dirpath, dirnames, filenames in os.walk(directory):
fo... | Add normalising params from the regex input | Add normalising params from the regex input
| Python | mit | tomleese/tvnamer,thomasleese/tvnamer | import re
import os
import pytvdbapi.api as tvdb
class Renamer:
def __init__(self, api_key):
self.tvdb = tvdb.TVDB(api_key)
@staticmethod
def flat_file_list(directory):
directory = os.path.normpath(directory)
for dirpath, dirnames, filenames in os.walk(directory):
fo... | import re
import os
import pytvdbapi.api as tvdb
class Renamer:
def __init__(self, api_key):
self.tvdb = tvdb.TVDB(api_key)
@staticmethod
def flat_file_list(directory):
directory = os.path.normpath(directory)
for dirpath, dirnames, filenames in os.walk(directory):
fo... | <commit_before>import re
import os
import pytvdbapi.api as tvdb
class Renamer:
def __init__(self, api_key):
self.tvdb = tvdb.TVDB(api_key)
@staticmethod
def flat_file_list(directory):
directory = os.path.normpath(directory)
for dirpath, dirnames, filenames in os.walk(directory):... | import re
import os
import pytvdbapi.api as tvdb
class Renamer:
def __init__(self, api_key):
self.tvdb = tvdb.TVDB(api_key)
@staticmethod
def flat_file_list(directory):
directory = os.path.normpath(directory)
for dirpath, dirnames, filenames in os.walk(directory):
fo... | import re
import os
import pytvdbapi.api as tvdb
class Renamer:
def __init__(self, api_key):
self.tvdb = tvdb.TVDB(api_key)
@staticmethod
def flat_file_list(directory):
directory = os.path.normpath(directory)
for dirpath, dirnames, filenames in os.walk(directory):
fo... | <commit_before>import re
import os
import pytvdbapi.api as tvdb
class Renamer:
def __init__(self, api_key):
self.tvdb = tvdb.TVDB(api_key)
@staticmethod
def flat_file_list(directory):
directory = os.path.normpath(directory)
for dirpath, dirnames, filenames in os.walk(directory):... |
38496eddbb214ee856b588e5b1cda62d5e353ab7 | system_maintenance/tests/functional/tests.py | system_maintenance/tests/functional/tests.py | from selenium import webdriver
import unittest
class FunctionalTest(unittest.TestCase):
def setUp(self):
self.browser = webdriver.Firefox()
self.browser.implicitly_wait(3)
def tearDown(self):
self.browser.quit()
def test_app_home_title(self):
self.browser.get('http://loc... | Add simple functional test to test the title of the app's home page | Add simple functional test to test the title of the app's home page
| Python | bsd-3-clause | mfcovington/django-system-maintenance,mfcovington/django-system-maintenance,mfcovington/django-system-maintenance | Add simple functional test to test the title of the app's home page | from selenium import webdriver
import unittest
class FunctionalTest(unittest.TestCase):
def setUp(self):
self.browser = webdriver.Firefox()
self.browser.implicitly_wait(3)
def tearDown(self):
self.browser.quit()
def test_app_home_title(self):
self.browser.get('http://loc... | <commit_before><commit_msg>Add simple functional test to test the title of the app's home page<commit_after> | from selenium import webdriver
import unittest
class FunctionalTest(unittest.TestCase):
def setUp(self):
self.browser = webdriver.Firefox()
self.browser.implicitly_wait(3)
def tearDown(self):
self.browser.quit()
def test_app_home_title(self):
self.browser.get('http://loc... | Add simple functional test to test the title of the app's home pagefrom selenium import webdriver
import unittest
class FunctionalTest(unittest.TestCase):
def setUp(self):
self.browser = webdriver.Firefox()
self.browser.implicitly_wait(3)
def tearDown(self):
self.browser.quit()
... | <commit_before><commit_msg>Add simple functional test to test the title of the app's home page<commit_after>from selenium import webdriver
import unittest
class FunctionalTest(unittest.TestCase):
def setUp(self):
self.browser = webdriver.Firefox()
self.browser.implicitly_wait(3)
def tearDown... | |
c0b09cc5d1f51672e696364616552008c13b89c4 | packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py | packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py | """
Test that we respect the sysroot when building the std module.
"""
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import os
class ImportStdModule(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIf(compiler=no_match("clang"))
... | """
Test that we respect the sysroot when building the std module.
"""
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import os
class ImportStdModule(TestBase):
mydir = TestBase.compute_mydir(__file__)
# We only emulate a fake libc++ in this... | Add import-std-module/sysroot to the libc++ test category. | [lldb] Add import-std-module/sysroot to the libc++ test category.
We essentially test libc++ in a sysroot here so let's make sure
that we actually only run this test on platforms where libc++
testing is enabled.
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@374572 91177308-0d34-0410-b5e6-96231b3b80d8
| Python | apache-2.0 | llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb | """
Test that we respect the sysroot when building the std module.
"""
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import os
class ImportStdModule(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIf(compiler=no_match("clang"))
... | """
Test that we respect the sysroot when building the std module.
"""
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import os
class ImportStdModule(TestBase):
mydir = TestBase.compute_mydir(__file__)
# We only emulate a fake libc++ in this... | <commit_before>"""
Test that we respect the sysroot when building the std module.
"""
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import os
class ImportStdModule(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIf(compiler=no_matc... | """
Test that we respect the sysroot when building the std module.
"""
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import os
class ImportStdModule(TestBase):
mydir = TestBase.compute_mydir(__file__)
# We only emulate a fake libc++ in this... | """
Test that we respect the sysroot when building the std module.
"""
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import os
class ImportStdModule(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIf(compiler=no_match("clang"))
... | <commit_before>"""
Test that we respect the sysroot when building the std module.
"""
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import os
class ImportStdModule(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIf(compiler=no_matc... |
39086b074dbac8d6d743ede09ce3556e4861e5a4 | wdim/client/blob.py | wdim/client/blob.py | import json
import hashlib
from wdim.client.storable import Storable
class Blob(Storable):
HASH_METHOD = 'sha1'
@classmethod
def _create(cls, data):
sha = hashlib(cls.HASH_METHOD, json.dumps(data))
return cls(sha, data)
@classmethod
def _from_document(cls, document):
re... | import json
import hashlib
from wdim import exceptions
from wdim.client import fields
from wdim.client.storable import Storable
class Blob(Storable):
HASH_METHOD = 'sha256'
_id = fields.StringField(unique=True)
data = fields.DictField()
@classmethod
async def create(cls, data):
sha = h... | Reimplement Blob, switch to sha256 | Reimplement Blob, switch to sha256
| Python | mit | chrisseto/Still | import json
import hashlib
from wdim.client.storable import Storable
class Blob(Storable):
HASH_METHOD = 'sha1'
@classmethod
def _create(cls, data):
sha = hashlib(cls.HASH_METHOD, json.dumps(data))
return cls(sha, data)
@classmethod
def _from_document(cls, document):
re... | import json
import hashlib
from wdim import exceptions
from wdim.client import fields
from wdim.client.storable import Storable
class Blob(Storable):
HASH_METHOD = 'sha256'
_id = fields.StringField(unique=True)
data = fields.DictField()
@classmethod
async def create(cls, data):
sha = h... | <commit_before>import json
import hashlib
from wdim.client.storable import Storable
class Blob(Storable):
HASH_METHOD = 'sha1'
@classmethod
def _create(cls, data):
sha = hashlib(cls.HASH_METHOD, json.dumps(data))
return cls(sha, data)
@classmethod
def _from_document(cls, docume... | import json
import hashlib
from wdim import exceptions
from wdim.client import fields
from wdim.client.storable import Storable
class Blob(Storable):
HASH_METHOD = 'sha256'
_id = fields.StringField(unique=True)
data = fields.DictField()
@classmethod
async def create(cls, data):
sha = h... | import json
import hashlib
from wdim.client.storable import Storable
class Blob(Storable):
HASH_METHOD = 'sha1'
@classmethod
def _create(cls, data):
sha = hashlib(cls.HASH_METHOD, json.dumps(data))
return cls(sha, data)
@classmethod
def _from_document(cls, document):
re... | <commit_before>import json
import hashlib
from wdim.client.storable import Storable
class Blob(Storable):
HASH_METHOD = 'sha1'
@classmethod
def _create(cls, data):
sha = hashlib(cls.HASH_METHOD, json.dumps(data))
return cls(sha, data)
@classmethod
def _from_document(cls, docume... |
ca7580c12ffefafce1705d60ab74fcb22af18eb4 | examples/python_interop/python_interop.py | examples/python_interop/python_interop.py | #!/usr/bin/env python
# Copyright 2017 Stanford University
#
# 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 applicabl... | #!/usr/bin/env python
# Copyright 2017 Stanford University
#
# 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 applicabl... | Update Python example with a task call. | examples: Update Python example with a task call.
| Python | apache-2.0 | StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion,StanfordLegion/legion | #!/usr/bin/env python
# Copyright 2017 Stanford University
#
# 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 applicabl... | #!/usr/bin/env python
# Copyright 2017 Stanford University
#
# 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 applicabl... | <commit_before>#!/usr/bin/env python
# Copyright 2017 Stanford University
#
# 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 requir... | #!/usr/bin/env python
# Copyright 2017 Stanford University
#
# 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 applicabl... | #!/usr/bin/env python
# Copyright 2017 Stanford University
#
# 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 applicabl... | <commit_before>#!/usr/bin/env python
# Copyright 2017 Stanford University
#
# 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 requir... |
a839dcaa51cde0bf191cc87ff2cf54bbc483d61e | main.py | main.py | #!/usr/bin/env python
import sys
import json
from pprint import pprint
try:
import requests
except ImportError:
print(
'Script requires requests package. \n'
'You can install it by running "pip install requests"'
)
exit()
API_URL = 'http://jsonplaceholder.typicode.com/posts/'
def get_... | #!/usr/bin/env python
import sys
import json
from pprint import pprint
try:
import requests
except ImportError:
print(
'Script requires requests package. \n'
'You can install it by running "pip install requests"'
)
exit()
API_URL = 'http://jsonplaceholder.typicode.com/posts/'
def get_... | Print all data from posts | Print all data from posts
| Python | mit | sevazhidkov/rest-wrapper | #!/usr/bin/env python
import sys
import json
from pprint import pprint
try:
import requests
except ImportError:
print(
'Script requires requests package. \n'
'You can install it by running "pip install requests"'
)
exit()
API_URL = 'http://jsonplaceholder.typicode.com/posts/'
def get_... | #!/usr/bin/env python
import sys
import json
from pprint import pprint
try:
import requests
except ImportError:
print(
'Script requires requests package. \n'
'You can install it by running "pip install requests"'
)
exit()
API_URL = 'http://jsonplaceholder.typicode.com/posts/'
def get_... | <commit_before>#!/usr/bin/env python
import sys
import json
from pprint import pprint
try:
import requests
except ImportError:
print(
'Script requires requests package. \n'
'You can install it by running "pip install requests"'
)
exit()
API_URL = 'http://jsonplaceholder.typicode.com/pos... | #!/usr/bin/env python
import sys
import json
from pprint import pprint
try:
import requests
except ImportError:
print(
'Script requires requests package. \n'
'You can install it by running "pip install requests"'
)
exit()
API_URL = 'http://jsonplaceholder.typicode.com/posts/'
def get_... | #!/usr/bin/env python
import sys
import json
from pprint import pprint
try:
import requests
except ImportError:
print(
'Script requires requests package. \n'
'You can install it by running "pip install requests"'
)
exit()
API_URL = 'http://jsonplaceholder.typicode.com/posts/'
def get_... | <commit_before>#!/usr/bin/env python
import sys
import json
from pprint import pprint
try:
import requests
except ImportError:
print(
'Script requires requests package. \n'
'You can install it by running "pip install requests"'
)
exit()
API_URL = 'http://jsonplaceholder.typicode.com/pos... |
032bd078b7650905148ceb3adf653d1f78f7e73f | srtm.py | srtm.py | import os
import json
import numpy as np
SAMPLES = 1201 # For SRTM3, use 3601 for SRTM1
def get_elevation(lat, lon):
file = get_file_name(lat, lon)
if file:
return read_elevation_from_file(file, lat, lon)
# Treat it as data void as in SRTM documentation
return -32768
def read_elevation_from... | import os
import json
import numpy as np
SAMPLES = 1201 # For SRTM3, use 3601 for SRTM1
HGTDIR = 'hgt' # All 'hgt' files will be kept here uncompressed
def get_elevation(lat, lon):
file = get_file_name(lat, lon)
if file:
return read_elevation_from_file(file, lat, lon)
# Treat it as data void as in... | Add HGTDIR to store hgt files inside a directory | Add HGTDIR to store hgt files inside a directory
| Python | mit | aatishnn/srtm-python | import os
import json
import numpy as np
SAMPLES = 1201 # For SRTM3, use 3601 for SRTM1
def get_elevation(lat, lon):
file = get_file_name(lat, lon)
if file:
return read_elevation_from_file(file, lat, lon)
# Treat it as data void as in SRTM documentation
return -32768
def read_elevation_from... | import os
import json
import numpy as np
SAMPLES = 1201 # For SRTM3, use 3601 for SRTM1
HGTDIR = 'hgt' # All 'hgt' files will be kept here uncompressed
def get_elevation(lat, lon):
file = get_file_name(lat, lon)
if file:
return read_elevation_from_file(file, lat, lon)
# Treat it as data void as in... | <commit_before>import os
import json
import numpy as np
SAMPLES = 1201 # For SRTM3, use 3601 for SRTM1
def get_elevation(lat, lon):
file = get_file_name(lat, lon)
if file:
return read_elevation_from_file(file, lat, lon)
# Treat it as data void as in SRTM documentation
return -32768
def read... | import os
import json
import numpy as np
SAMPLES = 1201 # For SRTM3, use 3601 for SRTM1
HGTDIR = 'hgt' # All 'hgt' files will be kept here uncompressed
def get_elevation(lat, lon):
file = get_file_name(lat, lon)
if file:
return read_elevation_from_file(file, lat, lon)
# Treat it as data void as in... | import os
import json
import numpy as np
SAMPLES = 1201 # For SRTM3, use 3601 for SRTM1
def get_elevation(lat, lon):
file = get_file_name(lat, lon)
if file:
return read_elevation_from_file(file, lat, lon)
# Treat it as data void as in SRTM documentation
return -32768
def read_elevation_from... | <commit_before>import os
import json
import numpy as np
SAMPLES = 1201 # For SRTM3, use 3601 for SRTM1
def get_elevation(lat, lon):
file = get_file_name(lat, lon)
if file:
return read_elevation_from_file(file, lat, lon)
# Treat it as data void as in SRTM documentation
return -32768
def read... |
1bf15bca7a492bf874dccab08e24df053b7a859f | mesh.py | mesh.py | import os
import sys
import traceback
builtin_cmds = {'cd', 'pwd',}
def prompt():
print '%s $ ' % os.getcwd(),
def read_command():
return sys.stdin.readline()
def parse_command(cmd_text):
return (cmd_text, cmd_text.strip().split())
def record_command(command):
return True
def run_builtin(cmd):
... | #!/usr/bin/env python3
import os
import shutil
import sys
import traceback
builtin_cmds = {'cd', 'pwd', 'exit',}
def prompt():
print('%s $ ' % os.getcwd(), end='', flush=True)
def read_command():
return sys.stdin.readline()
def parse_command(cmd_text):
return (cmd_text, cmd_text.strip().split())
def r... | Switch to Python 3, add exit built_in | Switch to Python 3, add exit built_in
| Python | mit | mmichie/mesh | import os
import sys
import traceback
builtin_cmds = {'cd', 'pwd',}
def prompt():
print '%s $ ' % os.getcwd(),
def read_command():
return sys.stdin.readline()
def parse_command(cmd_text):
return (cmd_text, cmd_text.strip().split())
def record_command(command):
return True
def run_builtin(cmd):
... | #!/usr/bin/env python3
import os
import shutil
import sys
import traceback
builtin_cmds = {'cd', 'pwd', 'exit',}
def prompt():
print('%s $ ' % os.getcwd(), end='', flush=True)
def read_command():
return sys.stdin.readline()
def parse_command(cmd_text):
return (cmd_text, cmd_text.strip().split())
def r... | <commit_before>import os
import sys
import traceback
builtin_cmds = {'cd', 'pwd',}
def prompt():
print '%s $ ' % os.getcwd(),
def read_command():
return sys.stdin.readline()
def parse_command(cmd_text):
return (cmd_text, cmd_text.strip().split())
def record_command(command):
return True
def run_bu... | #!/usr/bin/env python3
import os
import shutil
import sys
import traceback
builtin_cmds = {'cd', 'pwd', 'exit',}
def prompt():
print('%s $ ' % os.getcwd(), end='', flush=True)
def read_command():
return sys.stdin.readline()
def parse_command(cmd_text):
return (cmd_text, cmd_text.strip().split())
def r... | import os
import sys
import traceback
builtin_cmds = {'cd', 'pwd',}
def prompt():
print '%s $ ' % os.getcwd(),
def read_command():
return sys.stdin.readline()
def parse_command(cmd_text):
return (cmd_text, cmd_text.strip().split())
def record_command(command):
return True
def run_builtin(cmd):
... | <commit_before>import os
import sys
import traceback
builtin_cmds = {'cd', 'pwd',}
def prompt():
print '%s $ ' % os.getcwd(),
def read_command():
return sys.stdin.readline()
def parse_command(cmd_text):
return (cmd_text, cmd_text.strip().split())
def record_command(command):
return True
def run_bu... |
35d5ca76a0c7f63545d2e8bc6b877c78ba9eab1d | tests/adapter/_path.py | tests/adapter/_path.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
def fix():
p = os.path.join(os.path.dirname(__file__), '../../src/')
if p not in sys.path:
sys.path.insert(0, p)
if "__main__" == __name__:
fix()
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from unittest import mock
except ImportError:
import mock
def fix():
p = os.path.join(os.path.dirname(__file__), '../../src/')
if p not in sys.path:
sys.path.insert(0, p)
if "__main__" == __name__:
fix()
| Make 'mock' mocking library available for test cases stored under 'tests/adapter' | Make 'mock' mocking library available for test cases stored under 'tests/adapter'
| Python | bsd-3-clause | michalbachowski/pygrapes,michalbachowski/pygrapes,michalbachowski/pygrapes | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
def fix():
p = os.path.join(os.path.dirname(__file__), '../../src/')
if p not in sys.path:
sys.path.insert(0, p)
if "__main__" == __name__:
fix()
Make 'mock' mocking library available for test cases stored under 'tests/adapter' | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from unittest import mock
except ImportError:
import mock
def fix():
p = os.path.join(os.path.dirname(__file__), '../../src/')
if p not in sys.path:
sys.path.insert(0, p)
if "__main__" == __name__:
fix()
| <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
def fix():
p = os.path.join(os.path.dirname(__file__), '../../src/')
if p not in sys.path:
sys.path.insert(0, p)
if "__main__" == __name__:
fix()
<commit_msg>Make 'mock' mocking library available for test cases store... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from unittest import mock
except ImportError:
import mock
def fix():
p = os.path.join(os.path.dirname(__file__), '../../src/')
if p not in sys.path:
sys.path.insert(0, p)
if "__main__" == __name__:
fix()
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
def fix():
p = os.path.join(os.path.dirname(__file__), '../../src/')
if p not in sys.path:
sys.path.insert(0, p)
if "__main__" == __name__:
fix()
Make 'mock' mocking library available for test cases stored under 'tests/adapter'#!/u... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
def fix():
p = os.path.join(os.path.dirname(__file__), '../../src/')
if p not in sys.path:
sys.path.insert(0, p)
if "__main__" == __name__:
fix()
<commit_msg>Make 'mock' mocking library available for test cases store... |
3e843b9d0474657eeefc896b06e50968defb2514 | wsgi.py | wsgi.py | # Yith Library Server is a password storage server.
# Copyright (C) 2015 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Yith Library Server.
#
# Yith Library Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as publ... | # Yith Library Web Client is a client for Yith Library Server.
# Copyright (C) 2015 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Yith Library Web Client.
#
# Yith Library Web Client is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pub... | Fix project name in license section | Fix project name in license section
| Python | agpl-3.0 | lorenzogil/yith-library-web-client,ablanco/yith-library-web-client,ablanco/yith-library-web-client,lorenzogil/yith-library-web-client,ablanco/yith-library-web-client,ablanco/yith-library-web-client,lorenzogil/yith-library-web-client,lorenzogil/yith-library-web-client | # Yith Library Server is a password storage server.
# Copyright (C) 2015 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Yith Library Server.
#
# Yith Library Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as publ... | # Yith Library Web Client is a client for Yith Library Server.
# Copyright (C) 2015 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Yith Library Web Client.
#
# Yith Library Web Client is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pub... | <commit_before># Yith Library Server is a password storage server.
# Copyright (C) 2015 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Yith Library Server.
#
# Yith Library Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public ... | # Yith Library Web Client is a client for Yith Library Server.
# Copyright (C) 2015 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Yith Library Web Client.
#
# Yith Library Web Client is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pub... | # Yith Library Server is a password storage server.
# Copyright (C) 2015 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Yith Library Server.
#
# Yith Library Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as publ... | <commit_before># Yith Library Server is a password storage server.
# Copyright (C) 2015 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Yith Library Server.
#
# Yith Library Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public ... |
cadab3fef1e95c0b186dc28860ac4797243fdf22 | tests/test_visualization.py | tests/test_visualization.py | from tornado.httpclient import HTTPRequest
import json
import os.path
import json
import shutil
from xml.etree import ElementTree as ET
from util import generate_filename
from util import make_trace_folder
from tests.base import BaseRecorderTestCase
class VisualizationTestCase(BaseRecorderTestCase):
def test_no... | from tornado.httpclient import HTTPRequest
import json
import os.path
import json
import shutil
from xml.etree import ElementTree as ET
from util import generate_filename
from util import make_trace_folder
from tests.base import BaseRecorderTestCase
class VisualizationTestCase(BaseRecorderTestCase):
def test_no... | Update test case for visualization page. | Update test case for visualization page.
| Python | bsd-3-clause | openxc/web-logging-example,openxc/web-logging-example | from tornado.httpclient import HTTPRequest
import json
import os.path
import json
import shutil
from xml.etree import ElementTree as ET
from util import generate_filename
from util import make_trace_folder
from tests.base import BaseRecorderTestCase
class VisualizationTestCase(BaseRecorderTestCase):
def test_no... | from tornado.httpclient import HTTPRequest
import json
import os.path
import json
import shutil
from xml.etree import ElementTree as ET
from util import generate_filename
from util import make_trace_folder
from tests.base import BaseRecorderTestCase
class VisualizationTestCase(BaseRecorderTestCase):
def test_no... | <commit_before>from tornado.httpclient import HTTPRequest
import json
import os.path
import json
import shutil
from xml.etree import ElementTree as ET
from util import generate_filename
from util import make_trace_folder
from tests.base import BaseRecorderTestCase
class VisualizationTestCase(BaseRecorderTestCase):
... | from tornado.httpclient import HTTPRequest
import json
import os.path
import json
import shutil
from xml.etree import ElementTree as ET
from util import generate_filename
from util import make_trace_folder
from tests.base import BaseRecorderTestCase
class VisualizationTestCase(BaseRecorderTestCase):
def test_no... | from tornado.httpclient import HTTPRequest
import json
import os.path
import json
import shutil
from xml.etree import ElementTree as ET
from util import generate_filename
from util import make_trace_folder
from tests.base import BaseRecorderTestCase
class VisualizationTestCase(BaseRecorderTestCase):
def test_no... | <commit_before>from tornado.httpclient import HTTPRequest
import json
import os.path
import json
import shutil
from xml.etree import ElementTree as ET
from util import generate_filename
from util import make_trace_folder
from tests.base import BaseRecorderTestCase
class VisualizationTestCase(BaseRecorderTestCase):
... |
eaaf941646ff8b22a6d3ef3689f22ad1b9f7a8e2 | tensorflow/contrib/py2tf/impl/config.py | tensorflow/contrib/py2tf/impl/config.py | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Add the utils module to the uncompiled whitelist. | Add the utils module to the uncompiled whitelist.
PiperOrigin-RevId: 185733139
| Python | apache-2.0 | jbedorf/tensorflow,arborh/tensorflow,zasdfgbnm/tensorflow,jhseu/tensorflow,kobejean/tensorflow,Intel-tensorflow/tensorflow,ZhangXinNan/tensorflow,jbedorf/tensorflow,jart/tensorflow,nburn42/tensorflow,annarev/tensorflow,ghchinoy/tensorflow,annarev/tensorflow,kobejean/tensorflow,ageron/tensorflow,dendisuhubdy/tensorflow,... | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | <commit_before># Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | <commit_before># Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
cba3b00a92194cb34d27a63e71a17f2239079c7b | setup.py | setup.py | from setuptools import setup
import os
setup(
name = "cmsplugin-bootstrap-carousel",
packages = ['cmsplugin_bootstrap_carousel',],
package_data = {
'': [
'templates/cmsplugin_bootstrap_carousel/*.html',
]
},
version = "0.1.2",
description = "Bootstrap carousel plug... | from setuptools import setup
import os
setup(
name = "cmsplugin-bootstrap-carousel",
packages = ['cmsplugin_bootstrap_carousel',],
package_data = {
'': [
'templates/cmsplugin_bootstrap_carousel/*.html',
]
},
version = "0.1.3",
description = "Bootstrap carousel plug... | Upgrade the version to force reinstall by wheels | Upgrade the version to force reinstall by wheels | Python | bsd-3-clause | 360youlun/cmsplugin-bootstrap-carousel,360youlun/cmsplugin-bootstrap-carousel | from setuptools import setup
import os
setup(
name = "cmsplugin-bootstrap-carousel",
packages = ['cmsplugin_bootstrap_carousel',],
package_data = {
'': [
'templates/cmsplugin_bootstrap_carousel/*.html',
]
},
version = "0.1.2",
description = "Bootstrap carousel plug... | from setuptools import setup
import os
setup(
name = "cmsplugin-bootstrap-carousel",
packages = ['cmsplugin_bootstrap_carousel',],
package_data = {
'': [
'templates/cmsplugin_bootstrap_carousel/*.html',
]
},
version = "0.1.3",
description = "Bootstrap carousel plug... | <commit_before>from setuptools import setup
import os
setup(
name = "cmsplugin-bootstrap-carousel",
packages = ['cmsplugin_bootstrap_carousel',],
package_data = {
'': [
'templates/cmsplugin_bootstrap_carousel/*.html',
]
},
version = "0.1.2",
description = "Bootstra... | from setuptools import setup
import os
setup(
name = "cmsplugin-bootstrap-carousel",
packages = ['cmsplugin_bootstrap_carousel',],
package_data = {
'': [
'templates/cmsplugin_bootstrap_carousel/*.html',
]
},
version = "0.1.3",
description = "Bootstrap carousel plug... | from setuptools import setup
import os
setup(
name = "cmsplugin-bootstrap-carousel",
packages = ['cmsplugin_bootstrap_carousel',],
package_data = {
'': [
'templates/cmsplugin_bootstrap_carousel/*.html',
]
},
version = "0.1.2",
description = "Bootstrap carousel plug... | <commit_before>from setuptools import setup
import os
setup(
name = "cmsplugin-bootstrap-carousel",
packages = ['cmsplugin_bootstrap_carousel',],
package_data = {
'': [
'templates/cmsplugin_bootstrap_carousel/*.html',
]
},
version = "0.1.2",
description = "Bootstra... |
255d1f753ee8b48cbb2d7131e72ebc5dfbaf443c | setup.py | setup.py | from setuptools import setup
import editorconfig
setup(
name='EditorConfig',
version=editorconfig.__version__,
author='EditorConfig Team',
packages=['editorconfig'],
url='http://editorconfig.org/',
license='LICENSE.txt',
description='EditorConfig File Locator and Interpreter for Python',
... | from setuptools import setup
import editorconfig
setup(
name='EditorConfig',
version=editorconfig.__version__,
author='EditorConfig Team',
packages=['editorconfig'],
url='http://editorconfig.org/',
license='LICENSE.txt',
description='EditorConfig File Locator and Interpreter for Python',
... | Rename `editorconfig.py` command to `editorconfig` | Rename `editorconfig.py` command to `editorconfig`
| Python | bsd-2-clause | pocke/editorconfig-vim,VictorBjelkholm/editorconfig-vim,benjifisher/editorconfig-vim,VictorBjelkholm/editorconfig-vim,johnfraney/editorconfig-vim,pocke/editorconfig-vim,benjifisher/editorconfig-vim,johnfraney/editorconfig-vim,benjifisher/editorconfig-vim,pocke/editorconfig-vim,johnfraney/editorconfig-vim,VictorBjelkhol... | from setuptools import setup
import editorconfig
setup(
name='EditorConfig',
version=editorconfig.__version__,
author='EditorConfig Team',
packages=['editorconfig'],
url='http://editorconfig.org/',
license='LICENSE.txt',
description='EditorConfig File Locator and Interpreter for Python',
... | from setuptools import setup
import editorconfig
setup(
name='EditorConfig',
version=editorconfig.__version__,
author='EditorConfig Team',
packages=['editorconfig'],
url='http://editorconfig.org/',
license='LICENSE.txt',
description='EditorConfig File Locator and Interpreter for Python',
... | <commit_before>from setuptools import setup
import editorconfig
setup(
name='EditorConfig',
version=editorconfig.__version__,
author='EditorConfig Team',
packages=['editorconfig'],
url='http://editorconfig.org/',
license='LICENSE.txt',
description='EditorConfig File Locator and Interpreter ... | from setuptools import setup
import editorconfig
setup(
name='EditorConfig',
version=editorconfig.__version__,
author='EditorConfig Team',
packages=['editorconfig'],
url='http://editorconfig.org/',
license='LICENSE.txt',
description='EditorConfig File Locator and Interpreter for Python',
... | from setuptools import setup
import editorconfig
setup(
name='EditorConfig',
version=editorconfig.__version__,
author='EditorConfig Team',
packages=['editorconfig'],
url='http://editorconfig.org/',
license='LICENSE.txt',
description='EditorConfig File Locator and Interpreter for Python',
... | <commit_before>from setuptools import setup
import editorconfig
setup(
name='EditorConfig',
version=editorconfig.__version__,
author='EditorConfig Team',
packages=['editorconfig'],
url='http://editorconfig.org/',
license='LICENSE.txt',
description='EditorConfig File Locator and Interpreter ... |
28cdad6e8ab6bd400ef50331a2f93af93620cc7f | app/models.py | app/models.py | from django.db import models
class Event(models.Model):
when = models.DateTimeField(auto_now=True)
what = models.TextField()
| from django.db import models
class Event(models.Model):
when = models.DateTimeField(auto_now=True)
what = models.TextField()
def time(self):
return '{:%H:%M}'.format(self.when)
| Return human-sensible time in Event | Return human-sensible time in Event
| Python | mit | schatten/logan | from django.db import models
class Event(models.Model):
when = models.DateTimeField(auto_now=True)
what = models.TextField()
Return human-sensible time in Event | from django.db import models
class Event(models.Model):
when = models.DateTimeField(auto_now=True)
what = models.TextField()
def time(self):
return '{:%H:%M}'.format(self.when)
| <commit_before>from django.db import models
class Event(models.Model):
when = models.DateTimeField(auto_now=True)
what = models.TextField()
<commit_msg>Return human-sensible time in Event<commit_after> | from django.db import models
class Event(models.Model):
when = models.DateTimeField(auto_now=True)
what = models.TextField()
def time(self):
return '{:%H:%M}'.format(self.when)
| from django.db import models
class Event(models.Model):
when = models.DateTimeField(auto_now=True)
what = models.TextField()
Return human-sensible time in Eventfrom django.db import models
class Event(models.Model):
when = models.DateTimeField(auto_now=True)
what = models.TextField()
def time(self):
re... | <commit_before>from django.db import models
class Event(models.Model):
when = models.DateTimeField(auto_now=True)
what = models.TextField()
<commit_msg>Return human-sensible time in Event<commit_after>from django.db import models
class Event(models.Model):
when = models.DateTimeField(auto_now=True)
what = mod... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.