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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
91229ab93609f66af866f7ef87b576a84546aeab | api/base/parsers.py | api/base/parsers.py | from rest_framework.parsers import JSONParser
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'application/vnd.api+json'
renderer_class = JSONAPI... | from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ParseError
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'appli... | Raise Parse Error if request data is not a dictionary | Raise Parse Error if request data is not a dictionary
| Python | apache-2.0 | mluo613/osf.io,adlius/osf.io,alexschiller/osf.io,samanehsan/osf.io,doublebits/osf.io,Ghalko/osf.io,rdhyee/osf.io,GageGaskins/osf.io,erinspace/osf.io,samanehsan/osf.io,caneruguz/osf.io,HalcyonChimera/osf.io,amyshi188/osf.io,doublebits/osf.io,caseyrygt/osf.io,adlius/osf.io,caneruguz/osf.io,kwierman/osf.io,erinspace/osf.i... | from rest_framework.parsers import JSONParser
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'application/vnd.api+json'
renderer_class = JSONAPI... | from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ParseError
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'appli... | <commit_before>from rest_framework.parsers import JSONParser
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'application/vnd.api+json'
renderer_... | from rest_framework.parsers import JSONParser
from rest_framework.exceptions import ParseError
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'appli... | from rest_framework.parsers import JSONParser
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'application/vnd.api+json'
renderer_class = JSONAPI... | <commit_before>from rest_framework.parsers import JSONParser
from api.base.renderers import JSONAPIRenderer
from api.base.exceptions import JSONAPIException
class JSONAPIParser(JSONParser):
"""
Parses JSON-serialized data. Overrides media_type.
"""
media_type = 'application/vnd.api+json'
renderer_... |
bdbff5ea5548067713951a85b05f3818e537c8d4 | streamparse/bootstrap/project/src/bolts/wordcount.py | streamparse/bootstrap/project/src/bolts/wordcount.py | from __future__ import absolute_import, print_function, unicode_literals
from collections import Counter
from streamparse.bolt import Bolt
class WordCounter(Bolt):
def initialize(self, conf, ctx):
self.counts = Counter()
def process(self, tup):
word = tup.values[0]
self.counts[word] ... | from __future__ import absolute_import, print_function, unicode_literals
from collections import Counter
from streamparse.bolt import Bolt
class WordCounter(Bolt):
AUTO_ACK = True # automatically acknowledge tuples after process()
AUTO_ANCHOR = True # automatically anchor tuples to current tuple
AUTO_... | Update quickstart project to use AUTO_* | Update quickstart project to use AUTO_*
| Python | apache-2.0 | crohling/streamparse,petchat/streamparse,petchat/streamparse,eric7j/streamparse,msmakhlouf/streamparse,codywilbourn/streamparse,Parsely/streamparse,codywilbourn/streamparse,msmakhlouf/streamparse,scrapinghub/streamparse,Parsely/streamparse,petchat/streamparse,phanib4u/streamparse,petchat/streamparse,scrapinghub/streamp... | from __future__ import absolute_import, print_function, unicode_literals
from collections import Counter
from streamparse.bolt import Bolt
class WordCounter(Bolt):
def initialize(self, conf, ctx):
self.counts = Counter()
def process(self, tup):
word = tup.values[0]
self.counts[word] ... | from __future__ import absolute_import, print_function, unicode_literals
from collections import Counter
from streamparse.bolt import Bolt
class WordCounter(Bolt):
AUTO_ACK = True # automatically acknowledge tuples after process()
AUTO_ANCHOR = True # automatically anchor tuples to current tuple
AUTO_... | <commit_before>from __future__ import absolute_import, print_function, unicode_literals
from collections import Counter
from streamparse.bolt import Bolt
class WordCounter(Bolt):
def initialize(self, conf, ctx):
self.counts = Counter()
def process(self, tup):
word = tup.values[0]
sel... | from __future__ import absolute_import, print_function, unicode_literals
from collections import Counter
from streamparse.bolt import Bolt
class WordCounter(Bolt):
AUTO_ACK = True # automatically acknowledge tuples after process()
AUTO_ANCHOR = True # automatically anchor tuples to current tuple
AUTO_... | from __future__ import absolute_import, print_function, unicode_literals
from collections import Counter
from streamparse.bolt import Bolt
class WordCounter(Bolt):
def initialize(self, conf, ctx):
self.counts = Counter()
def process(self, tup):
word = tup.values[0]
self.counts[word] ... | <commit_before>from __future__ import absolute_import, print_function, unicode_literals
from collections import Counter
from streamparse.bolt import Bolt
class WordCounter(Bolt):
def initialize(self, conf, ctx):
self.counts = Counter()
def process(self, tup):
word = tup.values[0]
sel... |
95988fc4e5d7b5b5fa3235000ad9680c168c485c | aiospamc/__init__.py | aiospamc/__init__.py | #!/usr/bin/env python3
'''aiospamc package.
An asyncio-based library to communicate with SpamAssassin's SPAMD service.'''
from aiospamc.client import Client
__all__ = ('Client',
'MessageClassOption',
'ActionOption')
__author__ = 'Michael Caley'
__copyright__ = 'Copyright 2016, 2017 Michael Ca... | #!/usr/bin/env python3
'''aiospamc package.
An asyncio-based library to communicate with SpamAssassin's SPAMD service.'''
from aiospamc.client import Client
from aiospamc.options import ActionOption, MessageClassOption
__all__ = ('Client',
'MessageClassOption',
'ActionOption')
__author__ = 'M... | Add import ActionOption and MessageClassOption to __all__ | Add import ActionOption and MessageClassOption to __all__
| Python | mit | mjcaley/aiospamc | #!/usr/bin/env python3
'''aiospamc package.
An asyncio-based library to communicate with SpamAssassin's SPAMD service.'''
from aiospamc.client import Client
__all__ = ('Client',
'MessageClassOption',
'ActionOption')
__author__ = 'Michael Caley'
__copyright__ = 'Copyright 2016, 2017 Michael Ca... | #!/usr/bin/env python3
'''aiospamc package.
An asyncio-based library to communicate with SpamAssassin's SPAMD service.'''
from aiospamc.client import Client
from aiospamc.options import ActionOption, MessageClassOption
__all__ = ('Client',
'MessageClassOption',
'ActionOption')
__author__ = 'M... | <commit_before>#!/usr/bin/env python3
'''aiospamc package.
An asyncio-based library to communicate with SpamAssassin's SPAMD service.'''
from aiospamc.client import Client
__all__ = ('Client',
'MessageClassOption',
'ActionOption')
__author__ = 'Michael Caley'
__copyright__ = 'Copyright 2016, ... | #!/usr/bin/env python3
'''aiospamc package.
An asyncio-based library to communicate with SpamAssassin's SPAMD service.'''
from aiospamc.client import Client
from aiospamc.options import ActionOption, MessageClassOption
__all__ = ('Client',
'MessageClassOption',
'ActionOption')
__author__ = 'M... | #!/usr/bin/env python3
'''aiospamc package.
An asyncio-based library to communicate with SpamAssassin's SPAMD service.'''
from aiospamc.client import Client
__all__ = ('Client',
'MessageClassOption',
'ActionOption')
__author__ = 'Michael Caley'
__copyright__ = 'Copyright 2016, 2017 Michael Ca... | <commit_before>#!/usr/bin/env python3
'''aiospamc package.
An asyncio-based library to communicate with SpamAssassin's SPAMD service.'''
from aiospamc.client import Client
__all__ = ('Client',
'MessageClassOption',
'ActionOption')
__author__ = 'Michael Caley'
__copyright__ = 'Copyright 2016, ... |
f1793ed8a494701271b4a4baff8616e9c6202e80 | message_view.py | message_view.py | import sublime
import sublime_plugin
PANEL_NAME = "SublimeLinter Messages"
OUTPUT_PANEL = "output." + PANEL_NAME
def plugin_unloaded():
for window in sublime.windows():
window.destroy_output_panel(PANEL_NAME)
class SublimeLinterDisplayPanelCommand(sublime_plugin.WindowCommand):
def run(self, msg=""... | import sublime
import sublime_plugin
PANEL_NAME = "SublimeLinter Messages"
OUTPUT_PANEL = "output." + PANEL_NAME
def plugin_unloaded():
for window in sublime.windows():
window.destroy_output_panel(PANEL_NAME)
class SublimeLinterDisplayPanelCommand(sublime_plugin.WindowCommand):
def run(self, msg=""... | Append messages if message view is currently open | Append messages if message view is currently open
| Python | mit | SublimeLinter/SublimeLinter3,SublimeLinter/SublimeLinter3 | import sublime
import sublime_plugin
PANEL_NAME = "SublimeLinter Messages"
OUTPUT_PANEL = "output." + PANEL_NAME
def plugin_unloaded():
for window in sublime.windows():
window.destroy_output_panel(PANEL_NAME)
class SublimeLinterDisplayPanelCommand(sublime_plugin.WindowCommand):
def run(self, msg=""... | import sublime
import sublime_plugin
PANEL_NAME = "SublimeLinter Messages"
OUTPUT_PANEL = "output." + PANEL_NAME
def plugin_unloaded():
for window in sublime.windows():
window.destroy_output_panel(PANEL_NAME)
class SublimeLinterDisplayPanelCommand(sublime_plugin.WindowCommand):
def run(self, msg=""... | <commit_before>import sublime
import sublime_plugin
PANEL_NAME = "SublimeLinter Messages"
OUTPUT_PANEL = "output." + PANEL_NAME
def plugin_unloaded():
for window in sublime.windows():
window.destroy_output_panel(PANEL_NAME)
class SublimeLinterDisplayPanelCommand(sublime_plugin.WindowCommand):
def r... | import sublime
import sublime_plugin
PANEL_NAME = "SublimeLinter Messages"
OUTPUT_PANEL = "output." + PANEL_NAME
def plugin_unloaded():
for window in sublime.windows():
window.destroy_output_panel(PANEL_NAME)
class SublimeLinterDisplayPanelCommand(sublime_plugin.WindowCommand):
def run(self, msg=""... | import sublime
import sublime_plugin
PANEL_NAME = "SublimeLinter Messages"
OUTPUT_PANEL = "output." + PANEL_NAME
def plugin_unloaded():
for window in sublime.windows():
window.destroy_output_panel(PANEL_NAME)
class SublimeLinterDisplayPanelCommand(sublime_plugin.WindowCommand):
def run(self, msg=""... | <commit_before>import sublime
import sublime_plugin
PANEL_NAME = "SublimeLinter Messages"
OUTPUT_PANEL = "output." + PANEL_NAME
def plugin_unloaded():
for window in sublime.windows():
window.destroy_output_panel(PANEL_NAME)
class SublimeLinterDisplayPanelCommand(sublime_plugin.WindowCommand):
def r... |
4803578ebb306e2e142b629d98cb82899c0b0270 | authorize/__init__.py | authorize/__init__.py | import xml.etree.ElementTree as E
from authorize.configuration import Configuration
from authorize.address import Address
from authorize.bank_account import BankAccount
from authorize.batch import Batch
from authorize.credit_card import CreditCard
from authorize.customer import Customer
from authorize.environment impo... | import xml.etree.ElementTree as E
from authorize.configuration import Configuration
from authorize.address import Address
from authorize.bank_account import BankAccount
from authorize.batch import Batch
from authorize.credit_card import CreditCard
from authorize.customer import Customer
from authorize.environment impo... | Fix monkey patching to pass kwargs required by Python 3.4 | Fix monkey patching to pass kwargs required by Python 3.4
| Python | mit | aryeh/py-authorize,uglycitrus/py-authorize,vcatalano/py-authorize | import xml.etree.ElementTree as E
from authorize.configuration import Configuration
from authorize.address import Address
from authorize.bank_account import BankAccount
from authorize.batch import Batch
from authorize.credit_card import CreditCard
from authorize.customer import Customer
from authorize.environment impo... | import xml.etree.ElementTree as E
from authorize.configuration import Configuration
from authorize.address import Address
from authorize.bank_account import BankAccount
from authorize.batch import Batch
from authorize.credit_card import CreditCard
from authorize.customer import Customer
from authorize.environment impo... | <commit_before>import xml.etree.ElementTree as E
from authorize.configuration import Configuration
from authorize.address import Address
from authorize.bank_account import BankAccount
from authorize.batch import Batch
from authorize.credit_card import CreditCard
from authorize.customer import Customer
from authorize.e... | import xml.etree.ElementTree as E
from authorize.configuration import Configuration
from authorize.address import Address
from authorize.bank_account import BankAccount
from authorize.batch import Batch
from authorize.credit_card import CreditCard
from authorize.customer import Customer
from authorize.environment impo... | import xml.etree.ElementTree as E
from authorize.configuration import Configuration
from authorize.address import Address
from authorize.bank_account import BankAccount
from authorize.batch import Batch
from authorize.credit_card import CreditCard
from authorize.customer import Customer
from authorize.environment impo... | <commit_before>import xml.etree.ElementTree as E
from authorize.configuration import Configuration
from authorize.address import Address
from authorize.bank_account import BankAccount
from authorize.batch import Batch
from authorize.credit_card import CreditCard
from authorize.customer import Customer
from authorize.e... |
052a29030c0665f5724b0fe83550ce7d81202002 | incuna_test_utils/testcases/urls.py | incuna_test_utils/testcases/urls.py | import warnings
from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLTestMixin(object):
def assert_url_matches_view(self, view, expected_url, url_name,
url_args=None, url_kwargs=None):
"""
Assert a view's url is correctly ... | import warnings
from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLTestMixin(object):
def assert_url_matches_view(self, view, expected_url, url_name,
url_args=None, url_kwargs=None):
"""
Assert a view's url is correctly ... | Fix check for cls attribute | Fix check for cls attribute
* If resolved_view has a cls attribute then view should already be a
class.
| Python | bsd-2-clause | incuna/incuna-test-utils,incuna/incuna-test-utils | import warnings
from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLTestMixin(object):
def assert_url_matches_view(self, view, expected_url, url_name,
url_args=None, url_kwargs=None):
"""
Assert a view's url is correctly ... | import warnings
from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLTestMixin(object):
def assert_url_matches_view(self, view, expected_url, url_name,
url_args=None, url_kwargs=None):
"""
Assert a view's url is correctly ... | <commit_before>import warnings
from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLTestMixin(object):
def assert_url_matches_view(self, view, expected_url, url_name,
url_args=None, url_kwargs=None):
"""
Assert a view's ur... | import warnings
from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLTestMixin(object):
def assert_url_matches_view(self, view, expected_url, url_name,
url_args=None, url_kwargs=None):
"""
Assert a view's url is correctly ... | import warnings
from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLTestMixin(object):
def assert_url_matches_view(self, view, expected_url, url_name,
url_args=None, url_kwargs=None):
"""
Assert a view's url is correctly ... | <commit_before>import warnings
from django.core.urlresolvers import resolve, reverse
from django.test import TestCase
class URLTestMixin(object):
def assert_url_matches_view(self, view, expected_url, url_name,
url_args=None, url_kwargs=None):
"""
Assert a view's ur... |
e8dd4ca8bd51b84d5d7d5a6a1c4144475e066bf1 | zabbix.py | zabbix.py | import requests
class Api(object):
def __init__(self, server='http://localhost/zabbix'):
self.session = requests.Session()
self.session.headers.update({
'Content-Type': 'application/json'
})
self.url = server + '/api_jsonrpc.php'
self.auth = ''
self.id = ... | import requests
class ZabbixError(Exception):
pass
class Api(object):
def __init__(self, server='http://localhost/zabbix'):
self.session = requests.Session()
self.session.headers.update({
'Content-Type': 'application/json'
})
self.url = server + '/api_jsonrpc.php'
... | Create do_requestion function to be used by other methods. | Create do_requestion function to be used by other methods.
| Python | apache-2.0 | supasate/PythonZabbixApi | import requests
class Api(object):
def __init__(self, server='http://localhost/zabbix'):
self.session = requests.Session()
self.session.headers.update({
'Content-Type': 'application/json'
})
self.url = server + '/api_jsonrpc.php'
self.auth = ''
self.id = ... | import requests
class ZabbixError(Exception):
pass
class Api(object):
def __init__(self, server='http://localhost/zabbix'):
self.session = requests.Session()
self.session.headers.update({
'Content-Type': 'application/json'
})
self.url = server + '/api_jsonrpc.php'
... | <commit_before>import requests
class Api(object):
def __init__(self, server='http://localhost/zabbix'):
self.session = requests.Session()
self.session.headers.update({
'Content-Type': 'application/json'
})
self.url = server + '/api_jsonrpc.php'
self.auth = ''
... | import requests
class ZabbixError(Exception):
pass
class Api(object):
def __init__(self, server='http://localhost/zabbix'):
self.session = requests.Session()
self.session.headers.update({
'Content-Type': 'application/json'
})
self.url = server + '/api_jsonrpc.php'
... | import requests
class Api(object):
def __init__(self, server='http://localhost/zabbix'):
self.session = requests.Session()
self.session.headers.update({
'Content-Type': 'application/json'
})
self.url = server + '/api_jsonrpc.php'
self.auth = ''
self.id = ... | <commit_before>import requests
class Api(object):
def __init__(self, server='http://localhost/zabbix'):
self.session = requests.Session()
self.session.headers.update({
'Content-Type': 'application/json'
})
self.url = server + '/api_jsonrpc.php'
self.auth = ''
... |
1b20116059b21905688b7fd6153ecd7c42bdc4a1 | parseSAMOutput.py | parseSAMOutput.py | #!python
# Load libraries
import sys, getopt
import pysam
import libPipeline
# Set constants
helpMsg ='''
SYNOPSIS
parseSAMOutput
parseSAMOutput [OPTIONS] SAMFILE
#
DESCRIPTION
parseSAMOutput.py
Parses SAM alignments into paired-end read summaries.
Prints results to stdout.
OPTIONS
--rmdup Rem... | #!python
# Load libraries
import sys, getopt
import pysam
import libPipeline
# Set constants
helpMsg ='''
SYNOPSIS
parseSAMOutput
parseSAMOutput [OPTIONS] SAMFILE
#
DESCRIPTION
parseSAMOutput.py
Parses SAM alignments into paired-end read summaries.
Prints results to stdout.
OPTIONS
--rmdup Rem... | Fix rmdup handling in wrapper script. | Fix rmdup handling in wrapper script.
| Python | apache-2.0 | awblocker/paired-end-pipeline,awblocker/paired-end-pipeline | #!python
# Load libraries
import sys, getopt
import pysam
import libPipeline
# Set constants
helpMsg ='''
SYNOPSIS
parseSAMOutput
parseSAMOutput [OPTIONS] SAMFILE
#
DESCRIPTION
parseSAMOutput.py
Parses SAM alignments into paired-end read summaries.
Prints results to stdout.
OPTIONS
--rmdup Rem... | #!python
# Load libraries
import sys, getopt
import pysam
import libPipeline
# Set constants
helpMsg ='''
SYNOPSIS
parseSAMOutput
parseSAMOutput [OPTIONS] SAMFILE
#
DESCRIPTION
parseSAMOutput.py
Parses SAM alignments into paired-end read summaries.
Prints results to stdout.
OPTIONS
--rmdup Rem... | <commit_before>#!python
# Load libraries
import sys, getopt
import pysam
import libPipeline
# Set constants
helpMsg ='''
SYNOPSIS
parseSAMOutput
parseSAMOutput [OPTIONS] SAMFILE
#
DESCRIPTION
parseSAMOutput.py
Parses SAM alignments into paired-end read summaries.
Prints results to stdout.
OPTIONS
--rmdup ... | #!python
# Load libraries
import sys, getopt
import pysam
import libPipeline
# Set constants
helpMsg ='''
SYNOPSIS
parseSAMOutput
parseSAMOutput [OPTIONS] SAMFILE
#
DESCRIPTION
parseSAMOutput.py
Parses SAM alignments into paired-end read summaries.
Prints results to stdout.
OPTIONS
--rmdup Rem... | #!python
# Load libraries
import sys, getopt
import pysam
import libPipeline
# Set constants
helpMsg ='''
SYNOPSIS
parseSAMOutput
parseSAMOutput [OPTIONS] SAMFILE
#
DESCRIPTION
parseSAMOutput.py
Parses SAM alignments into paired-end read summaries.
Prints results to stdout.
OPTIONS
--rmdup Rem... | <commit_before>#!python
# Load libraries
import sys, getopt
import pysam
import libPipeline
# Set constants
helpMsg ='''
SYNOPSIS
parseSAMOutput
parseSAMOutput [OPTIONS] SAMFILE
#
DESCRIPTION
parseSAMOutput.py
Parses SAM alignments into paired-end read summaries.
Prints results to stdout.
OPTIONS
--rmdup ... |
ddf0ff2c72a8026c6cf90bc51b1c9fc8d68a003f | apicore/oasschema.py | apicore/oasschema.py | import jsonschema
def validate(data, schema):
try:
jsonschema.validate(data, schema)
except jsonschema.exceptions.ValidationError:
return False
if schema["type"] == "object":
allowed = list(schema["properties"].keys())
for key in data.keys():
if key not in allo... | import jsonschema
def validate(data, schema):
try:
jsonschema.validate(data, schema)
except jsonschema.exceptions.ValidationError:
return False
# TODO if $ref or
if "type" in schema and schema["type"] == "object":
allowed = list(schema["properties"].keys())
for key in ... | FIX schema type not object | FIX schema type not object
| Python | mit | meezio/apicore,meezio/apicore | import jsonschema
def validate(data, schema):
try:
jsonschema.validate(data, schema)
except jsonschema.exceptions.ValidationError:
return False
if schema["type"] == "object":
allowed = list(schema["properties"].keys())
for key in data.keys():
if key not in allo... | import jsonschema
def validate(data, schema):
try:
jsonschema.validate(data, schema)
except jsonschema.exceptions.ValidationError:
return False
# TODO if $ref or
if "type" in schema and schema["type"] == "object":
allowed = list(schema["properties"].keys())
for key in ... | <commit_before>import jsonschema
def validate(data, schema):
try:
jsonschema.validate(data, schema)
except jsonschema.exceptions.ValidationError:
return False
if schema["type"] == "object":
allowed = list(schema["properties"].keys())
for key in data.keys():
if ... | import jsonschema
def validate(data, schema):
try:
jsonschema.validate(data, schema)
except jsonschema.exceptions.ValidationError:
return False
# TODO if $ref or
if "type" in schema and schema["type"] == "object":
allowed = list(schema["properties"].keys())
for key in ... | import jsonschema
def validate(data, schema):
try:
jsonschema.validate(data, schema)
except jsonschema.exceptions.ValidationError:
return False
if schema["type"] == "object":
allowed = list(schema["properties"].keys())
for key in data.keys():
if key not in allo... | <commit_before>import jsonschema
def validate(data, schema):
try:
jsonschema.validate(data, schema)
except jsonschema.exceptions.ValidationError:
return False
if schema["type"] == "object":
allowed = list(schema["properties"].keys())
for key in data.keys():
if ... |
613a6f7947b46b9a6c4c679b638d1c4d946b644d | neutron/conf/policies/network_ip_availability.py | neutron/conf/policies/network_ip_availability.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed u... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed u... | Implement secure RBAC for the network IP availability | Implement secure RBAC for the network IP availability
This commit updates the network IP availability policies to understand scope
checking and account for a read-only role. This is part of a broader series of
changes across OpenStack to provide a consistent RBAC experience and improve
security.
Change-Id: Ia965e549e... | Python | apache-2.0 | openstack/neutron,mahak/neutron,mahak/neutron,mahak/neutron,openstack/neutron,openstack/neutron | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed u... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed u... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed u... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed u... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#... |
3f9623766b58c02b21abb967315bfe30a2b3974f | tests/TestTransaction.py | tests/TestTransaction.py | import Transaction
import unittest
class TestTransaction(unittest.TestCase) :
def setUp(self) :
self.test_object = Transaction.Transaction()
def tearDown(self) :
pass
def test_not_None(self) :
self.assertIsNotNone(self.test_object)
def test_can_assign_data(self) :
s... | import Transaction
import unittest
class TestTransaction(unittest.TestCase) :
def setUp(self) :
self.test_object = Transaction.Transaction()
def tearDown(self) :
pass
def test_not_None(self) :
self.assertIsNotNone(self.test_object)
def test_can_assign_data(self) :
s... | Add test to clarify equality/is behavior | Add test to clarify equality/is behavior
| Python | apache-2.0 | mattdeckard/wherewithal | import Transaction
import unittest
class TestTransaction(unittest.TestCase) :
def setUp(self) :
self.test_object = Transaction.Transaction()
def tearDown(self) :
pass
def test_not_None(self) :
self.assertIsNotNone(self.test_object)
def test_can_assign_data(self) :
s... | import Transaction
import unittest
class TestTransaction(unittest.TestCase) :
def setUp(self) :
self.test_object = Transaction.Transaction()
def tearDown(self) :
pass
def test_not_None(self) :
self.assertIsNotNone(self.test_object)
def test_can_assign_data(self) :
s... | <commit_before>import Transaction
import unittest
class TestTransaction(unittest.TestCase) :
def setUp(self) :
self.test_object = Transaction.Transaction()
def tearDown(self) :
pass
def test_not_None(self) :
self.assertIsNotNone(self.test_object)
def test_can_assign_data(se... | import Transaction
import unittest
class TestTransaction(unittest.TestCase) :
def setUp(self) :
self.test_object = Transaction.Transaction()
def tearDown(self) :
pass
def test_not_None(self) :
self.assertIsNotNone(self.test_object)
def test_can_assign_data(self) :
s... | import Transaction
import unittest
class TestTransaction(unittest.TestCase) :
def setUp(self) :
self.test_object = Transaction.Transaction()
def tearDown(self) :
pass
def test_not_None(self) :
self.assertIsNotNone(self.test_object)
def test_can_assign_data(self) :
s... | <commit_before>import Transaction
import unittest
class TestTransaction(unittest.TestCase) :
def setUp(self) :
self.test_object = Transaction.Transaction()
def tearDown(self) :
pass
def test_not_None(self) :
self.assertIsNotNone(self.test_object)
def test_can_assign_data(se... |
2728f33a0c8477d75b3716ea39fe2e3c8db9378d | tests/test_OrderedSet.py | tests/test_OrderedSet.py | from twisted.trial import unittest
from better_od import OrderedSet
class TestOrderedSet(unittest.TestCase):
def setUp(self):
self.values = 'abcddefg'
self.s = OrderedSet(self.values)
def test_order(self):
expected = list(enumerate('abcdefg'))
self.assertEquals(list(enumerate... | from twisted.trial import unittest
from better_od import OrderedSet
class TestOrderedSet(unittest.TestCase):
def setUp(self):
self.s = OrderedSet('abcdefg')
def test_order(self):
expected = list(enumerate('abcdefg'))
self.assertEquals(list(enumerate(self.s)), expected)
def test_... | Add OrderedSet mutation tests. Refactor tests. | Add OrderedSet mutation tests. Refactor tests.
Refactored the tests to rely less on setUp because I've got to test
mutating the objects.
| Python | mit | JustusW/BetterOrderedDict,therealfakemoot/collections2 | from twisted.trial import unittest
from better_od import OrderedSet
class TestOrderedSet(unittest.TestCase):
def setUp(self):
self.values = 'abcddefg'
self.s = OrderedSet(self.values)
def test_order(self):
expected = list(enumerate('abcdefg'))
self.assertEquals(list(enumerate... | from twisted.trial import unittest
from better_od import OrderedSet
class TestOrderedSet(unittest.TestCase):
def setUp(self):
self.s = OrderedSet('abcdefg')
def test_order(self):
expected = list(enumerate('abcdefg'))
self.assertEquals(list(enumerate(self.s)), expected)
def test_... | <commit_before>from twisted.trial import unittest
from better_od import OrderedSet
class TestOrderedSet(unittest.TestCase):
def setUp(self):
self.values = 'abcddefg'
self.s = OrderedSet(self.values)
def test_order(self):
expected = list(enumerate('abcdefg'))
self.assertEquals... | from twisted.trial import unittest
from better_od import OrderedSet
class TestOrderedSet(unittest.TestCase):
def setUp(self):
self.s = OrderedSet('abcdefg')
def test_order(self):
expected = list(enumerate('abcdefg'))
self.assertEquals(list(enumerate(self.s)), expected)
def test_... | from twisted.trial import unittest
from better_od import OrderedSet
class TestOrderedSet(unittest.TestCase):
def setUp(self):
self.values = 'abcddefg'
self.s = OrderedSet(self.values)
def test_order(self):
expected = list(enumerate('abcdefg'))
self.assertEquals(list(enumerate... | <commit_before>from twisted.trial import unittest
from better_od import OrderedSet
class TestOrderedSet(unittest.TestCase):
def setUp(self):
self.values = 'abcddefg'
self.s = OrderedSet(self.values)
def test_order(self):
expected = list(enumerate('abcdefg'))
self.assertEquals... |
756860e325edd06eb98bed7c6fd5fa6c4a78243e | tests/test_migrations.py | tests/test_migrations.py | """
Tests that migrations are not missing
"""
try:
from io import StringIO
except ImportError:
from StringIO import StringIO
import pytest
from django.core.management import call_command
def test_no_missing_migrations():
"""Check no model changes have been made since the last `./manage.py makemigration... | """
Tests that migrations are not missing
"""
try:
from io import StringIO
except ImportError:
from StringIO import StringIO
import pytest
from django.core.management import call_command
@pytest.mark.django_db
def test_no_missing_migrations():
"""Check no model changes have been made since the last `./... | Add missing pytest DB marker | Add missing pytest DB marker
| Python | bsd-2-clause | bennylope/django-organizations,bennylope/django-organizations | """
Tests that migrations are not missing
"""
try:
from io import StringIO
except ImportError:
from StringIO import StringIO
import pytest
from django.core.management import call_command
def test_no_missing_migrations():
"""Check no model changes have been made since the last `./manage.py makemigration... | """
Tests that migrations are not missing
"""
try:
from io import StringIO
except ImportError:
from StringIO import StringIO
import pytest
from django.core.management import call_command
@pytest.mark.django_db
def test_no_missing_migrations():
"""Check no model changes have been made since the last `./... | <commit_before>"""
Tests that migrations are not missing
"""
try:
from io import StringIO
except ImportError:
from StringIO import StringIO
import pytest
from django.core.management import call_command
def test_no_missing_migrations():
"""Check no model changes have been made since the last `./manage.p... | """
Tests that migrations are not missing
"""
try:
from io import StringIO
except ImportError:
from StringIO import StringIO
import pytest
from django.core.management import call_command
@pytest.mark.django_db
def test_no_missing_migrations():
"""Check no model changes have been made since the last `./... | """
Tests that migrations are not missing
"""
try:
from io import StringIO
except ImportError:
from StringIO import StringIO
import pytest
from django.core.management import call_command
def test_no_missing_migrations():
"""Check no model changes have been made since the last `./manage.py makemigration... | <commit_before>"""
Tests that migrations are not missing
"""
try:
from io import StringIO
except ImportError:
from StringIO import StringIO
import pytest
from django.core.management import call_command
def test_no_missing_migrations():
"""Check no model changes have been made since the last `./manage.p... |
d4003a3b07e4ead9bccbc6a9c8ff835970ad99a3 | pymatgen/core/design_patterns.py | pymatgen/core/design_patterns.py | # coding: utf-8
from __future__ import division, unicode_literals
"""
This module defines some useful design patterns.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2011, The Materials Project"
__version__ = "1.0"
__maintainer__ = "Shyue Ping Ong"
__email__ = "[email protected]"
__status__ = "Producti... | # coding: utf-8
from __future__ import division, unicode_literals
"""
This module defines some useful design patterns.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2011, The Materials Project"
__version__ = "1.0"
__maintainer__ = "Shyue Ping Ong"
__email__ = "[email protected]"
__status__ = "Producti... | Move NullFile and NullStream to monty | Move NullFile and NullStream to monty
Former-commit-id: 5492c3519fdfc444fd8cbb92cbf4b9c67c8a0883 [formerly 4aa6714284cb45a2747cea8e0f38e8fbcd8ec0bc]
Former-commit-id: e6119512027c605a8277d0a99f37a6ab0d73b6c7 | Python | mit | xhqu1981/pymatgen,tallakahath/pymatgen,fraricci/pymatgen,aykol/pymatgen,mbkumar/pymatgen,ndardenne/pymatgen,czhengsci/pymatgen,blondegeek/pymatgen,czhengsci/pymatgen,czhengsci/pymatgen,gVallverdu/pymatgen,nisse3000/pymatgen,dongsenfo/pymatgen,aykol/pymatgen,johnson1228/pymatgen,montoyjh/pymatgen,gpetretto/pymatgen,Bism... | # coding: utf-8
from __future__ import division, unicode_literals
"""
This module defines some useful design patterns.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2011, The Materials Project"
__version__ = "1.0"
__maintainer__ = "Shyue Ping Ong"
__email__ = "[email protected]"
__status__ = "Producti... | # coding: utf-8
from __future__ import division, unicode_literals
"""
This module defines some useful design patterns.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2011, The Materials Project"
__version__ = "1.0"
__maintainer__ = "Shyue Ping Ong"
__email__ = "[email protected]"
__status__ = "Producti... | <commit_before># coding: utf-8
from __future__ import division, unicode_literals
"""
This module defines some useful design patterns.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2011, The Materials Project"
__version__ = "1.0"
__maintainer__ = "Shyue Ping Ong"
__email__ = "[email protected]"
__statu... | # coding: utf-8
from __future__ import division, unicode_literals
"""
This module defines some useful design patterns.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2011, The Materials Project"
__version__ = "1.0"
__maintainer__ = "Shyue Ping Ong"
__email__ = "[email protected]"
__status__ = "Producti... | # coding: utf-8
from __future__ import division, unicode_literals
"""
This module defines some useful design patterns.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2011, The Materials Project"
__version__ = "1.0"
__maintainer__ = "Shyue Ping Ong"
__email__ = "[email protected]"
__status__ = "Producti... | <commit_before># coding: utf-8
from __future__ import division, unicode_literals
"""
This module defines some useful design patterns.
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2011, The Materials Project"
__version__ = "1.0"
__maintainer__ = "Shyue Ping Ong"
__email__ = "[email protected]"
__statu... |
e69a23abc438b1f527cf9247bc210874eb227253 | pyshelf/artifact_list_manager.py | pyshelf/artifact_list_manager.py | from pyshelf.cloud.stream_iterator import StreamIterator
from flask import Response
class ArtifactListManager(object):
def __init__(self, container):
self.container = container
def get_artifact(self, path):
"""
Gets artifact or artifact list information.
Args:
... | from pyshelf.cloud.stream_iterator import StreamIterator
from flask import Response
class ArtifactListManager(object):
def __init__(self, container):
self.container = container
def get_artifact(self, path):
"""
Gets artifact or artifact list information.
Args:
... | Fix relative portion of link. | Fix relative portion of link.
| Python | mit | kyle-long/pyshelf,kyle-long/pyshelf,not-nexus/shelf,not-nexus/shelf | from pyshelf.cloud.stream_iterator import StreamIterator
from flask import Response
class ArtifactListManager(object):
def __init__(self, container):
self.container = container
def get_artifact(self, path):
"""
Gets artifact or artifact list information.
Args:
... | from pyshelf.cloud.stream_iterator import StreamIterator
from flask import Response
class ArtifactListManager(object):
def __init__(self, container):
self.container = container
def get_artifact(self, path):
"""
Gets artifact or artifact list information.
Args:
... | <commit_before>from pyshelf.cloud.stream_iterator import StreamIterator
from flask import Response
class ArtifactListManager(object):
def __init__(self, container):
self.container = container
def get_artifact(self, path):
"""
Gets artifact or artifact list information.
... | from pyshelf.cloud.stream_iterator import StreamIterator
from flask import Response
class ArtifactListManager(object):
def __init__(self, container):
self.container = container
def get_artifact(self, path):
"""
Gets artifact or artifact list information.
Args:
... | from pyshelf.cloud.stream_iterator import StreamIterator
from flask import Response
class ArtifactListManager(object):
def __init__(self, container):
self.container = container
def get_artifact(self, path):
"""
Gets artifact or artifact list information.
Args:
... | <commit_before>from pyshelf.cloud.stream_iterator import StreamIterator
from flask import Response
class ArtifactListManager(object):
def __init__(self, container):
self.container = container
def get_artifact(self, path):
"""
Gets artifact or artifact list information.
... |
c4903f5b631bba21e17be1b7deb118c0c9571432 | Lab3/PalindromeExercise.py | Lab3/PalindromeExercise.py | # Asks the user for input of the word and makes it lower case.
normStr = raw_input("Enter the word:\n").lower();
# Inverts the string so it can compare it with the original input.
invertStr = normStr[::-1];
| # Asks the user for input of the word and makes it lower case.
normStr = raw_input("Enter the word:\n").lower();
# Inverts the string so it can compare it with the original input.
invertStr = normStr[::-1];
# Tests if the string is a palindrome. If so, it prints True. Else, prints False.
if normStr == invertStr:
pri... | Test added. Program should be complete. | Test added. Program should be complete.
| Python | mit | lgomie/dt228-3B-cloud-repo | # Asks the user for input of the word and makes it lower case.
normStr = raw_input("Enter the word:\n").lower();
# Inverts the string so it can compare it with the original input.
invertStr = normStr[::-1];
Test added. Program should be complete. | # Asks the user for input of the word and makes it lower case.
normStr = raw_input("Enter the word:\n").lower();
# Inverts the string so it can compare it with the original input.
invertStr = normStr[::-1];
# Tests if the string is a palindrome. If so, it prints True. Else, prints False.
if normStr == invertStr:
pri... | <commit_before># Asks the user for input of the word and makes it lower case.
normStr = raw_input("Enter the word:\n").lower();
# Inverts the string so it can compare it with the original input.
invertStr = normStr[::-1];
<commit_msg>Test added. Program should be complete.<commit_after> | # Asks the user for input of the word and makes it lower case.
normStr = raw_input("Enter the word:\n").lower();
# Inverts the string so it can compare it with the original input.
invertStr = normStr[::-1];
# Tests if the string is a palindrome. If so, it prints True. Else, prints False.
if normStr == invertStr:
pri... | # Asks the user for input of the word and makes it lower case.
normStr = raw_input("Enter the word:\n").lower();
# Inverts the string so it can compare it with the original input.
invertStr = normStr[::-1];
Test added. Program should be complete.# Asks the user for input of the word and makes it lower case.
normStr = ... | <commit_before># Asks the user for input of the word and makes it lower case.
normStr = raw_input("Enter the word:\n").lower();
# Inverts the string so it can compare it with the original input.
invertStr = normStr[::-1];
<commit_msg>Test added. Program should be complete.<commit_after># Asks the user for input of the... |
98eead2549f4a2793011ffe8107e64530ddbf782 | runtests.py | runtests.py | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... | Add missing auth middleware for 1.7 tests | Add missing auth middleware for 1.7 tests
| Python | mit | treyhunner/django-relatives,treyhunner/django-relatives | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... | <commit_before>#!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'dja... | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... | <commit_before>#!/usr/bin/env python
import sys
from os.path import abspath, dirname
import django
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'dja... |
de02f354e406e5b9a3f742697d3979d54b9ee581 | fvserver/urls.py | fvserver/urls.py | from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^macnamer/', include('macnamer.foo.urls')),
url(r'^login/$', 'django.contrib.auth.views.login'),... | from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^macnamer/', include('macnamer.foo.urls')),
url(r'^login/$', 'django.contrib.auth.views.login'),
... | Update password functions for Django 1.8 | Update password functions for Django 1.8
| Python | apache-2.0 | grahamgilbert/Crypt-Server,squarit/Crypt-Server,arubdesu/Crypt-Server,grahamgilbert/Crypt-Server,squarit/Crypt-Server,arubdesu/Crypt-Server,squarit/Crypt-Server,arubdesu/Crypt-Server,squarit/Crypt-Server,grahamgilbert/Crypt-Server,grahamgilbert/Crypt-Server | from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^macnamer/', include('macnamer.foo.urls')),
url(r'^login/$', 'django.contrib.auth.views.login'),... | from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^macnamer/', include('macnamer.foo.urls')),
url(r'^login/$', 'django.contrib.auth.views.login'),
... | <commit_before>from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^macnamer/', include('macnamer.foo.urls')),
url(r'^login/$', 'django.contrib.auth... | from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^macnamer/', include('macnamer.foo.urls')),
url(r'^login/$', 'django.contrib.auth.views.login'),
... | from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^macnamer/', include('macnamer.foo.urls')),
url(r'^login/$', 'django.contrib.auth.views.login'),... | <commit_before>from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^macnamer/', include('macnamer.foo.urls')),
url(r'^login/$', 'django.contrib.auth... |
cc8f0760aa5497d2285dc85c6f3c17c6ce327c35 | core/__init__.py | core/__init__.py | # Offer forward compatible imports of datastore_rpc and datastore_query.
import logging
try:
from google.appengine.datastore import datastore_rpc
from google.appengine.datastore import datastore_query
logging.info('Imported official google datastore_{rpc,query}')
except ImportError:
logging.warning('Importing... | # Offer forward compatible imports of datastore_rpc and datastore_query.
import logging
import sys
try:
from google.appengine.datastore import datastore_rpc
from google.appengine.datastore import datastore_query
sys.modules['core.datastore_rpc'] = datastore_rpc
sys.modules['core.datastore_query'] = datastore_... | Make official google imports actually work. | Make official google imports actually work.
| Python | apache-2.0 | GoogleCloudPlatform/datastore-ndb-python,GoogleCloudPlatform/datastore-ndb-python | # Offer forward compatible imports of datastore_rpc and datastore_query.
import logging
try:
from google.appengine.datastore import datastore_rpc
from google.appengine.datastore import datastore_query
logging.info('Imported official google datastore_{rpc,query}')
except ImportError:
logging.warning('Importing... | # Offer forward compatible imports of datastore_rpc and datastore_query.
import logging
import sys
try:
from google.appengine.datastore import datastore_rpc
from google.appengine.datastore import datastore_query
sys.modules['core.datastore_rpc'] = datastore_rpc
sys.modules['core.datastore_query'] = datastore_... | <commit_before># Offer forward compatible imports of datastore_rpc and datastore_query.
import logging
try:
from google.appengine.datastore import datastore_rpc
from google.appengine.datastore import datastore_query
logging.info('Imported official google datastore_{rpc,query}')
except ImportError:
logging.war... | # Offer forward compatible imports of datastore_rpc and datastore_query.
import logging
import sys
try:
from google.appengine.datastore import datastore_rpc
from google.appengine.datastore import datastore_query
sys.modules['core.datastore_rpc'] = datastore_rpc
sys.modules['core.datastore_query'] = datastore_... | # Offer forward compatible imports of datastore_rpc and datastore_query.
import logging
try:
from google.appengine.datastore import datastore_rpc
from google.appengine.datastore import datastore_query
logging.info('Imported official google datastore_{rpc,query}')
except ImportError:
logging.warning('Importing... | <commit_before># Offer forward compatible imports of datastore_rpc and datastore_query.
import logging
try:
from google.appengine.datastore import datastore_rpc
from google.appengine.datastore import datastore_query
logging.info('Imported official google datastore_{rpc,query}')
except ImportError:
logging.war... |
c566fa8f49ea826b29937c9c128350494eb10bf6 | rrd/__init__.py | rrd/__init__.py | #-*- coding:utf-8 -*-
import os
from flask import Flask
#-- create app --
app = Flask(__name__)
app.config.from_object("rrd.config")
@app.errorhandler(Exception)
def all_exception_handler(error):
print "exception: %s" %error
return u'dashboard 暂时无法访问,请联系管理员', 500
from view import api, chart, screen, index
| #-*- coding:utf-8 -*-
import os
from flask import Flask
from flask import request
from flask import redirect
#-- create app --
app = Flask(__name__)
app.config.from_object("rrd.config")
@app.errorhandler(Exception)
def all_exception_handler(error):
print "exception: %s" %error
return u'dashboard 暂时无法访问,请联系管理员... | Add before_request and it works for this bug | Add before_request and it works for this bug
Check if the signature exists. Redirect to the login page if it doesn't. I took `rrd/view/index.py` as the reference
| Python | apache-2.0 | Cepave/dashboard,Cepave/dashboard,Cepave/dashboard,Cepave/dashboard | #-*- coding:utf-8 -*-
import os
from flask import Flask
#-- create app --
app = Flask(__name__)
app.config.from_object("rrd.config")
@app.errorhandler(Exception)
def all_exception_handler(error):
print "exception: %s" %error
return u'dashboard 暂时无法访问,请联系管理员', 500
from view import api, chart, screen, index
Ad... | #-*- coding:utf-8 -*-
import os
from flask import Flask
from flask import request
from flask import redirect
#-- create app --
app = Flask(__name__)
app.config.from_object("rrd.config")
@app.errorhandler(Exception)
def all_exception_handler(error):
print "exception: %s" %error
return u'dashboard 暂时无法访问,请联系管理员... | <commit_before>#-*- coding:utf-8 -*-
import os
from flask import Flask
#-- create app --
app = Flask(__name__)
app.config.from_object("rrd.config")
@app.errorhandler(Exception)
def all_exception_handler(error):
print "exception: %s" %error
return u'dashboard 暂时无法访问,请联系管理员', 500
from view import api, chart, s... | #-*- coding:utf-8 -*-
import os
from flask import Flask
from flask import request
from flask import redirect
#-- create app --
app = Flask(__name__)
app.config.from_object("rrd.config")
@app.errorhandler(Exception)
def all_exception_handler(error):
print "exception: %s" %error
return u'dashboard 暂时无法访问,请联系管理员... | #-*- coding:utf-8 -*-
import os
from flask import Flask
#-- create app --
app = Flask(__name__)
app.config.from_object("rrd.config")
@app.errorhandler(Exception)
def all_exception_handler(error):
print "exception: %s" %error
return u'dashboard 暂时无法访问,请联系管理员', 500
from view import api, chart, screen, index
Ad... | <commit_before>#-*- coding:utf-8 -*-
import os
from flask import Flask
#-- create app --
app = Flask(__name__)
app.config.from_object("rrd.config")
@app.errorhandler(Exception)
def all_exception_handler(error):
print "exception: %s" %error
return u'dashboard 暂时无法访问,请联系管理员', 500
from view import api, chart, s... |
22d08aa11216d8ee367f8b4a11a14e08b3917dfd | flask_perm/admin.py | flask_perm/admin.py | # -*- coding: utf-8 -*-
from flask import Blueprint, render_template, current_app, url_for, redirect, request, flash
bp = Blueprint('perm-admin', __name__, template_folder='templates', static_folder='static')
@bp.route('/')
def index():
if not bp.perm.has_perm_admin_logined():
return redirect(url_for('pe... | # -*- coding: utf-8 -*-
from flask import Blueprint, render_template, current_app, url_for, redirect, request, flash
bp = Blueprint('perm-admin', __name__, template_folder='templates', static_folder='static')
@bp.route('/')
def index():
if not current_app.extensions['perm'].has_perm_admin_logined():
retu... | Use app.extensions to get perm reference. | Use app.extensions to get perm reference.
| Python | mit | soasme/flask-perm,soasme/flask-perm,soasme/flask-perm | # -*- coding: utf-8 -*-
from flask import Blueprint, render_template, current_app, url_for, redirect, request, flash
bp = Blueprint('perm-admin', __name__, template_folder='templates', static_folder='static')
@bp.route('/')
def index():
if not bp.perm.has_perm_admin_logined():
return redirect(url_for('pe... | # -*- coding: utf-8 -*-
from flask import Blueprint, render_template, current_app, url_for, redirect, request, flash
bp = Blueprint('perm-admin', __name__, template_folder='templates', static_folder='static')
@bp.route('/')
def index():
if not current_app.extensions['perm'].has_perm_admin_logined():
retu... | <commit_before># -*- coding: utf-8 -*-
from flask import Blueprint, render_template, current_app, url_for, redirect, request, flash
bp = Blueprint('perm-admin', __name__, template_folder='templates', static_folder='static')
@bp.route('/')
def index():
if not bp.perm.has_perm_admin_logined():
return redir... | # -*- coding: utf-8 -*-
from flask import Blueprint, render_template, current_app, url_for, redirect, request, flash
bp = Blueprint('perm-admin', __name__, template_folder='templates', static_folder='static')
@bp.route('/')
def index():
if not current_app.extensions['perm'].has_perm_admin_logined():
retu... | # -*- coding: utf-8 -*-
from flask import Blueprint, render_template, current_app, url_for, redirect, request, flash
bp = Blueprint('perm-admin', __name__, template_folder='templates', static_folder='static')
@bp.route('/')
def index():
if not bp.perm.has_perm_admin_logined():
return redirect(url_for('pe... | <commit_before># -*- coding: utf-8 -*-
from flask import Blueprint, render_template, current_app, url_for, redirect, request, flash
bp = Blueprint('perm-admin', __name__, template_folder='templates', static_folder='static')
@bp.route('/')
def index():
if not bp.perm.has_perm_admin_logined():
return redir... |
614a5de89a5746e95dc14f371d001c5a9056f646 | passwordhash.py | passwordhash.py | #!/usr/bin/env python
# Password Hashing Module for Linux
# Author: Dave Russell Jr (drussell393)
from getpass import getpass
import crypt
# If you like Python 2, please to be importing.
import os
import binascii
password = getpass('Enter your desired password, Harry: ')
passwordConfirm = getpass('Confirm your passw... | #!/usr/bin/env python3
# Password Hashing Module for Linux
# Author: Dave Russell Jr (drussell393)
from getpass import getpass
import crypt
# If you like Python 2, please to be importing.
#import os
#import binascii
password = getpass('Enter your desired password, Harry: ')
passwordConfirm = getpass('Confirm your pa... | Make changes to default to Python3 | Make changes to default to Python3
Since we have undoubtedly moved to Python3 for the most part within the community, this should be Python3 by default. We make Python2 users work harder now.
| Python | mit | drussell393/Linux-Password-Hash | #!/usr/bin/env python
# Password Hashing Module for Linux
# Author: Dave Russell Jr (drussell393)
from getpass import getpass
import crypt
# If you like Python 2, please to be importing.
import os
import binascii
password = getpass('Enter your desired password, Harry: ')
passwordConfirm = getpass('Confirm your passw... | #!/usr/bin/env python3
# Password Hashing Module for Linux
# Author: Dave Russell Jr (drussell393)
from getpass import getpass
import crypt
# If you like Python 2, please to be importing.
#import os
#import binascii
password = getpass('Enter your desired password, Harry: ')
passwordConfirm = getpass('Confirm your pa... | <commit_before>#!/usr/bin/env python
# Password Hashing Module for Linux
# Author: Dave Russell Jr (drussell393)
from getpass import getpass
import crypt
# If you like Python 2, please to be importing.
import os
import binascii
password = getpass('Enter your desired password, Harry: ')
passwordConfirm = getpass('Con... | #!/usr/bin/env python3
# Password Hashing Module for Linux
# Author: Dave Russell Jr (drussell393)
from getpass import getpass
import crypt
# If you like Python 2, please to be importing.
#import os
#import binascii
password = getpass('Enter your desired password, Harry: ')
passwordConfirm = getpass('Confirm your pa... | #!/usr/bin/env python
# Password Hashing Module for Linux
# Author: Dave Russell Jr (drussell393)
from getpass import getpass
import crypt
# If you like Python 2, please to be importing.
import os
import binascii
password = getpass('Enter your desired password, Harry: ')
passwordConfirm = getpass('Confirm your passw... | <commit_before>#!/usr/bin/env python
# Password Hashing Module for Linux
# Author: Dave Russell Jr (drussell393)
from getpass import getpass
import crypt
# If you like Python 2, please to be importing.
import os
import binascii
password = getpass('Enter your desired password, Harry: ')
passwordConfirm = getpass('Con... |
4735804f4951835e4e3c7d116628344bddf45aa3 | atomicpress/admin.py | atomicpress/admin.py | # -*- coding: utf-8 -*-
from flask import current_app
from flask_admin.contrib.fileadmin import FileAdmin
from flask_admin import AdminIndexView, expose, Admin
from flask_admin.contrib.sqla import ModelView
from atomicpress import models
from atomicpress.app import db
class HomeView(AdminIndexView):
@expose("/")... | # -*- coding: utf-8 -*-
from flask import current_app
from flask_admin.contrib.fileadmin import FileAdmin
from flask_admin import AdminIndexView, expose, Admin
from flask_admin.contrib.sqla import ModelView
from atomicpress import models
from atomicpress.app import db
class HomeView(AdminIndexView):
@expose("/")... | Update post view sorting (so latest comes first) | Update post view sorting (so latest comes first)
| Python | mit | marteinn/AtomicPress,marteinn/AtomicPress,marteinn/AtomicPress,marteinn/AtomicPress | # -*- coding: utf-8 -*-
from flask import current_app
from flask_admin.contrib.fileadmin import FileAdmin
from flask_admin import AdminIndexView, expose, Admin
from flask_admin.contrib.sqla import ModelView
from atomicpress import models
from atomicpress.app import db
class HomeView(AdminIndexView):
@expose("/")... | # -*- coding: utf-8 -*-
from flask import current_app
from flask_admin.contrib.fileadmin import FileAdmin
from flask_admin import AdminIndexView, expose, Admin
from flask_admin.contrib.sqla import ModelView
from atomicpress import models
from atomicpress.app import db
class HomeView(AdminIndexView):
@expose("/")... | <commit_before># -*- coding: utf-8 -*-
from flask import current_app
from flask_admin.contrib.fileadmin import FileAdmin
from flask_admin import AdminIndexView, expose, Admin
from flask_admin.contrib.sqla import ModelView
from atomicpress import models
from atomicpress.app import db
class HomeView(AdminIndexView):
... | # -*- coding: utf-8 -*-
from flask import current_app
from flask_admin.contrib.fileadmin import FileAdmin
from flask_admin import AdminIndexView, expose, Admin
from flask_admin.contrib.sqla import ModelView
from atomicpress import models
from atomicpress.app import db
class HomeView(AdminIndexView):
@expose("/")... | # -*- coding: utf-8 -*-
from flask import current_app
from flask_admin.contrib.fileadmin import FileAdmin
from flask_admin import AdminIndexView, expose, Admin
from flask_admin.contrib.sqla import ModelView
from atomicpress import models
from atomicpress.app import db
class HomeView(AdminIndexView):
@expose("/")... | <commit_before># -*- coding: utf-8 -*-
from flask import current_app
from flask_admin.contrib.fileadmin import FileAdmin
from flask_admin import AdminIndexView, expose, Admin
from flask_admin.contrib.sqla import ModelView
from atomicpress import models
from atomicpress.app import db
class HomeView(AdminIndexView):
... |
3a204de33589de943ff09525895812530baac0b2 | saylua/modules/pets/models/db.py | saylua/modules/pets/models/db.py | from google.appengine.ext import ndb
# This is to store alternate linart versions of the same pets
class SpeciesVersion(ndb.Model):
name = ndb.StringProperty()
base_image = ndb.StringProperty()
base_psd = ndb.StringProperty()
default_image = ndb.StringProperty()
# Pets are divided into species and spe... | from google.appengine.ext import ndb
# This is to store alternate linart versions of the same pets
class SpeciesVersion(ndb.Model):
name = ndb.StringProperty()
base_image = ndb.StringProperty()
base_psd = ndb.StringProperty()
default_image = ndb.StringProperty()
# Pets are divided into species and spe... | Update to pet model for provisioner | Update to pet model for provisioner
| Python | agpl-3.0 | saylua/SayluaV2,saylua/SayluaV2,LikeMyBread/Saylua,LikeMyBread/Saylua,saylua/SayluaV2,LikeMyBread/Saylua,LikeMyBread/Saylua | from google.appengine.ext import ndb
# This is to store alternate linart versions of the same pets
class SpeciesVersion(ndb.Model):
name = ndb.StringProperty()
base_image = ndb.StringProperty()
base_psd = ndb.StringProperty()
default_image = ndb.StringProperty()
# Pets are divided into species and spe... | from google.appengine.ext import ndb
# This is to store alternate linart versions of the same pets
class SpeciesVersion(ndb.Model):
name = ndb.StringProperty()
base_image = ndb.StringProperty()
base_psd = ndb.StringProperty()
default_image = ndb.StringProperty()
# Pets are divided into species and spe... | <commit_before>from google.appengine.ext import ndb
# This is to store alternate linart versions of the same pets
class SpeciesVersion(ndb.Model):
name = ndb.StringProperty()
base_image = ndb.StringProperty()
base_psd = ndb.StringProperty()
default_image = ndb.StringProperty()
# Pets are divided into ... | from google.appengine.ext import ndb
# This is to store alternate linart versions of the same pets
class SpeciesVersion(ndb.Model):
name = ndb.StringProperty()
base_image = ndb.StringProperty()
base_psd = ndb.StringProperty()
default_image = ndb.StringProperty()
# Pets are divided into species and spe... | from google.appengine.ext import ndb
# This is to store alternate linart versions of the same pets
class SpeciesVersion(ndb.Model):
name = ndb.StringProperty()
base_image = ndb.StringProperty()
base_psd = ndb.StringProperty()
default_image = ndb.StringProperty()
# Pets are divided into species and spe... | <commit_before>from google.appengine.ext import ndb
# This is to store alternate linart versions of the same pets
class SpeciesVersion(ndb.Model):
name = ndb.StringProperty()
base_image = ndb.StringProperty()
base_psd = ndb.StringProperty()
default_image = ndb.StringProperty()
# Pets are divided into ... |
a77ead1975050938c8557979f54683829747bf0f | addons/sale_stock/migrations/8.0.1.0/pre-migration.py | addons/sale_stock/migrations/8.0.1.0/pre-migration.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, a suite of business apps
# This module Copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... | # -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, a suite of business apps
# This module Copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... | Fix table name error in sale_stock column renames | Fix table name error in sale_stock column renames
| Python | agpl-3.0 | blaggacao/OpenUpgrade,sebalix/OpenUpgrade,OpenUpgrade-dev/OpenUpgrade,hifly/OpenUpgrade,kirca/OpenUpgrade,sebalix/OpenUpgrade,blaggacao/OpenUpgrade,kirca/OpenUpgrade,bwrsandman/OpenUpgrade,hifly/OpenUpgrade,Endika/OpenUpgrade,kirca/OpenUpgrade,OpenUpgrade/OpenUpgrade,pedrobaeza/OpenUpgrade,grap/OpenUpgrade,damdam-s/Ope... | # -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, a suite of business apps
# This module Copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... | # -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, a suite of business apps
# This module Copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, a suite of business apps
# This module Copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the term... | # -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, a suite of business apps
# This module Copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... | # -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, a suite of business apps
# This module Copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, a suite of business apps
# This module Copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the term... |
8eb936799a320e9b68bffe58b04da941eba2268e | setup.py | setup.py | from setuptools import find_packages, setup
setup(
version='4.0.2',
name='incuna-groups',
packages=find_packages(),
include_package_data=True,
install_requires=[
'django_crispy_forms>=1.4.0,<2',
'django-polymorphic>=1.2,<1.3',
'incuna-pagination>=0.1.1,<1',
],
descr... | from setuptools import find_packages, setup
setup(
version='4.0.2',
name='incuna-groups',
packages=find_packages(),
include_package_data=True,
install_requires=[
'django_crispy_forms>=1.6.1,<2',
'django-polymorphic>=1.2,<1.3',
'incuna-pagination>=0.1.1,<1',
],
descr... | Use a newer crispy_forms version. | Use a newer crispy_forms version.
| Python | bsd-2-clause | incuna/incuna-groups,incuna/incuna-groups | from setuptools import find_packages, setup
setup(
version='4.0.2',
name='incuna-groups',
packages=find_packages(),
include_package_data=True,
install_requires=[
'django_crispy_forms>=1.4.0,<2',
'django-polymorphic>=1.2,<1.3',
'incuna-pagination>=0.1.1,<1',
],
descr... | from setuptools import find_packages, setup
setup(
version='4.0.2',
name='incuna-groups',
packages=find_packages(),
include_package_data=True,
install_requires=[
'django_crispy_forms>=1.6.1,<2',
'django-polymorphic>=1.2,<1.3',
'incuna-pagination>=0.1.1,<1',
],
descr... | <commit_before>from setuptools import find_packages, setup
setup(
version='4.0.2',
name='incuna-groups',
packages=find_packages(),
include_package_data=True,
install_requires=[
'django_crispy_forms>=1.4.0,<2',
'django-polymorphic>=1.2,<1.3',
'incuna-pagination>=0.1.1,<1',
... | from setuptools import find_packages, setup
setup(
version='4.0.2',
name='incuna-groups',
packages=find_packages(),
include_package_data=True,
install_requires=[
'django_crispy_forms>=1.6.1,<2',
'django-polymorphic>=1.2,<1.3',
'incuna-pagination>=0.1.1,<1',
],
descr... | from setuptools import find_packages, setup
setup(
version='4.0.2',
name='incuna-groups',
packages=find_packages(),
include_package_data=True,
install_requires=[
'django_crispy_forms>=1.4.0,<2',
'django-polymorphic>=1.2,<1.3',
'incuna-pagination>=0.1.1,<1',
],
descr... | <commit_before>from setuptools import find_packages, setup
setup(
version='4.0.2',
name='incuna-groups',
packages=find_packages(),
include_package_data=True,
install_requires=[
'django_crispy_forms>=1.4.0,<2',
'django-polymorphic>=1.2,<1.3',
'incuna-pagination>=0.1.1,<1',
... |
4aeb2e57a05491973c761eb169a42cb5e1e32737 | gtr/__init__.py | gtr/__init__.py | __all__ = [
"gtr.services.funds.Funds"
]
__version__ = "0.1.0"
from gtr.services.base import _Service
from gtr.services.funds import Funds
from gtr.services.organisations import Organisations
from gtr.services.persons import Persons
from gtr.services.projects import Projects
| __all__ = [
"gtr.services.funds.Funds",
"gtr.services.organisations.Organisations",
"gtr.services.persons.Persons",
"gtr.services.projects.Projects"
]
__version__ = "0.1.0"
from gtr.services.base import _Service
from gtr.services.funds import Funds
from gtr.services.organisations import Organisations
f... | Add all service Classes to import | Add all service Classes to import
| Python | apache-2.0 | nestauk/gtr | __all__ = [
"gtr.services.funds.Funds"
]
__version__ = "0.1.0"
from gtr.services.base import _Service
from gtr.services.funds import Funds
from gtr.services.organisations import Organisations
from gtr.services.persons import Persons
from gtr.services.projects import Projects
Add all service Classes to import | __all__ = [
"gtr.services.funds.Funds",
"gtr.services.organisations.Organisations",
"gtr.services.persons.Persons",
"gtr.services.projects.Projects"
]
__version__ = "0.1.0"
from gtr.services.base import _Service
from gtr.services.funds import Funds
from gtr.services.organisations import Organisations
f... | <commit_before>__all__ = [
"gtr.services.funds.Funds"
]
__version__ = "0.1.0"
from gtr.services.base import _Service
from gtr.services.funds import Funds
from gtr.services.organisations import Organisations
from gtr.services.persons import Persons
from gtr.services.projects import Projects
<commit_msg>Add all serv... | __all__ = [
"gtr.services.funds.Funds",
"gtr.services.organisations.Organisations",
"gtr.services.persons.Persons",
"gtr.services.projects.Projects"
]
__version__ = "0.1.0"
from gtr.services.base import _Service
from gtr.services.funds import Funds
from gtr.services.organisations import Organisations
f... | __all__ = [
"gtr.services.funds.Funds"
]
__version__ = "0.1.0"
from gtr.services.base import _Service
from gtr.services.funds import Funds
from gtr.services.organisations import Organisations
from gtr.services.persons import Persons
from gtr.services.projects import Projects
Add all service Classes to import__all_... | <commit_before>__all__ = [
"gtr.services.funds.Funds"
]
__version__ = "0.1.0"
from gtr.services.base import _Service
from gtr.services.funds import Funds
from gtr.services.organisations import Organisations
from gtr.services.persons import Persons
from gtr.services.projects import Projects
<commit_msg>Add all serv... |
1d84a3b58aa752834aed31123dd16e3bfa723609 | tests/storage_adapter_tests/test_storage_adapter.py | tests/storage_adapter_tests/test_storage_adapter.py | from unittest import TestCase
from chatterbot.storage import StorageAdapter
class StorageAdapterTestCase(TestCase):
"""
This test case is for the StorageAdapter base class.
Although this class is not intended for direct use,
this test case ensures that exceptions requiring
basic functionality are ... | from unittest import TestCase
from chatterbot.storage import StorageAdapter
class StorageAdapterTestCase(TestCase):
"""
This test case is for the StorageAdapter base class.
Although this class is not intended for direct use,
this test case ensures that exceptions requiring
basic functionality are ... | Remove tests for storage adapter methods being removed. | Remove tests for storage adapter methods being removed.
| Python | bsd-3-clause | vkosuri/ChatterBot,gunthercox/ChatterBot | from unittest import TestCase
from chatterbot.storage import StorageAdapter
class StorageAdapterTestCase(TestCase):
"""
This test case is for the StorageAdapter base class.
Although this class is not intended for direct use,
this test case ensures that exceptions requiring
basic functionality are ... | from unittest import TestCase
from chatterbot.storage import StorageAdapter
class StorageAdapterTestCase(TestCase):
"""
This test case is for the StorageAdapter base class.
Although this class is not intended for direct use,
this test case ensures that exceptions requiring
basic functionality are ... | <commit_before>from unittest import TestCase
from chatterbot.storage import StorageAdapter
class StorageAdapterTestCase(TestCase):
"""
This test case is for the StorageAdapter base class.
Although this class is not intended for direct use,
this test case ensures that exceptions requiring
basic fun... | from unittest import TestCase
from chatterbot.storage import StorageAdapter
class StorageAdapterTestCase(TestCase):
"""
This test case is for the StorageAdapter base class.
Although this class is not intended for direct use,
this test case ensures that exceptions requiring
basic functionality are ... | from unittest import TestCase
from chatterbot.storage import StorageAdapter
class StorageAdapterTestCase(TestCase):
"""
This test case is for the StorageAdapter base class.
Although this class is not intended for direct use,
this test case ensures that exceptions requiring
basic functionality are ... | <commit_before>from unittest import TestCase
from chatterbot.storage import StorageAdapter
class StorageAdapterTestCase(TestCase):
"""
This test case is for the StorageAdapter base class.
Although this class is not intended for direct use,
this test case ensures that exceptions requiring
basic fun... |
2d95f8fe9c9e9edf5b1a0b5dee2992187b0d89ed | src/pytest_django_lite/plugin.py | src/pytest_django_lite/plugin.py | import os
import pytest
try:
from django.conf import settings
except ImportError:
settings = None # NOQA
def is_configured():
if settings is None:
return False
return settings.configured or os.environ.get('DJANGO_SETTINGS_MODULE')
@pytest.fixture(autouse=True, scope='session')
def _django_... | import os
import pytest
try:
from django.conf import settings
except ImportError:
settings = None # NOQA
def is_configured():
if settings is None:
return False
return settings.configured or os.environ.get('DJANGO_SETTINGS_MODULE')
@pytest.fixture(autouse=True, scope='session')
def _django_... | Deal with the Django app refactoring. | Deal with the Django app refactoring.
| Python | apache-2.0 | pombredanne/pytest-django-lite,dcramer/pytest-django-lite | import os
import pytest
try:
from django.conf import settings
except ImportError:
settings = None # NOQA
def is_configured():
if settings is None:
return False
return settings.configured or os.environ.get('DJANGO_SETTINGS_MODULE')
@pytest.fixture(autouse=True, scope='session')
def _django_... | import os
import pytest
try:
from django.conf import settings
except ImportError:
settings = None # NOQA
def is_configured():
if settings is None:
return False
return settings.configured or os.environ.get('DJANGO_SETTINGS_MODULE')
@pytest.fixture(autouse=True, scope='session')
def _django_... | <commit_before>import os
import pytest
try:
from django.conf import settings
except ImportError:
settings = None # NOQA
def is_configured():
if settings is None:
return False
return settings.configured or os.environ.get('DJANGO_SETTINGS_MODULE')
@pytest.fixture(autouse=True, scope='session... | import os
import pytest
try:
from django.conf import settings
except ImportError:
settings = None # NOQA
def is_configured():
if settings is None:
return False
return settings.configured or os.environ.get('DJANGO_SETTINGS_MODULE')
@pytest.fixture(autouse=True, scope='session')
def _django_... | import os
import pytest
try:
from django.conf import settings
except ImportError:
settings = None # NOQA
def is_configured():
if settings is None:
return False
return settings.configured or os.environ.get('DJANGO_SETTINGS_MODULE')
@pytest.fixture(autouse=True, scope='session')
def _django_... | <commit_before>import os
import pytest
try:
from django.conf import settings
except ImportError:
settings = None # NOQA
def is_configured():
if settings is None:
return False
return settings.configured or os.environ.get('DJANGO_SETTINGS_MODULE')
@pytest.fixture(autouse=True, scope='session... |
2f152c5036d32a780741edd8fb6ce75684728824 | singleuser/user-config.py | singleuser/user-config.py | import os
mylang = 'test'
family = 'wikipedia'
# Not defining any extra variables here at all since that causes pywikibot
# to issue a warning about potential misspellings
if os.path.exists(os.path.expanduser('~/user-config.py')):
with open(os.path.expanduser('~/user-config.py'), 'r') as f:
exec(
... | import os
mylang = 'test'
family = 'wikipedia'
custom_path = os.path.expanduser('~/user-config.py')
if os.path.exists(custom_path):
with open(custom_path, 'r') as f:
exec(compile(f.read(), custom_path, 'exec'), globals())
# Things that should be non-easily-overridable
usernames['*']['*'] = os.environ['J... | Revert "Do not introduce extra variables" | Revert "Do not introduce extra variables"
Since the 'f' is considered an extra variable and introduces
a warning anyway :( Let's fix this the right way
This reverts commit a03de68fb772d859098327d0e54a219fe4507072.
| Python | mit | yuvipanda/paws,yuvipanda/paws | import os
mylang = 'test'
family = 'wikipedia'
# Not defining any extra variables here at all since that causes pywikibot
# to issue a warning about potential misspellings
if os.path.exists(os.path.expanduser('~/user-config.py')):
with open(os.path.expanduser('~/user-config.py'), 'r') as f:
exec(
... | import os
mylang = 'test'
family = 'wikipedia'
custom_path = os.path.expanduser('~/user-config.py')
if os.path.exists(custom_path):
with open(custom_path, 'r') as f:
exec(compile(f.read(), custom_path, 'exec'), globals())
# Things that should be non-easily-overridable
usernames['*']['*'] = os.environ['J... | <commit_before>import os
mylang = 'test'
family = 'wikipedia'
# Not defining any extra variables here at all since that causes pywikibot
# to issue a warning about potential misspellings
if os.path.exists(os.path.expanduser('~/user-config.py')):
with open(os.path.expanduser('~/user-config.py'), 'r') as f:
... | import os
mylang = 'test'
family = 'wikipedia'
custom_path = os.path.expanduser('~/user-config.py')
if os.path.exists(custom_path):
with open(custom_path, 'r') as f:
exec(compile(f.read(), custom_path, 'exec'), globals())
# Things that should be non-easily-overridable
usernames['*']['*'] = os.environ['J... | import os
mylang = 'test'
family = 'wikipedia'
# Not defining any extra variables here at all since that causes pywikibot
# to issue a warning about potential misspellings
if os.path.exists(os.path.expanduser('~/user-config.py')):
with open(os.path.expanduser('~/user-config.py'), 'r') as f:
exec(
... | <commit_before>import os
mylang = 'test'
family = 'wikipedia'
# Not defining any extra variables here at all since that causes pywikibot
# to issue a warning about potential misspellings
if os.path.exists(os.path.expanduser('~/user-config.py')):
with open(os.path.expanduser('~/user-config.py'), 'r') as f:
... |
2d4016d8e4245a6e85c2bbea012d13471718b1b0 | journal/views.py | journal/views.py | from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.http import JsonResponse
from rest_framework.parsers import JSONParser
from .models import Entry
from .serializers import EntrySerializer
@method_decorator(csrf... | from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.http import JsonResponse
from rest_framework.parsers import JSONParser
from .models import Entry
from .serializers import EntrySerializer
@method_decorator(csrf... | Add a way to specific tag. | Add a way to specific tag.
| Python | agpl-3.0 | etesync/journal-manager | from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.http import JsonResponse
from rest_framework.parsers import JSONParser
from .models import Entry
from .serializers import EntrySerializer
@method_decorator(csrf... | from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.http import JsonResponse
from rest_framework.parsers import JSONParser
from .models import Entry
from .serializers import EntrySerializer
@method_decorator(csrf... | <commit_before>from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.http import JsonResponse
from rest_framework.parsers import JSONParser
from .models import Entry
from .serializers import EntrySerializer
@method... | from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.http import JsonResponse
from rest_framework.parsers import JSONParser
from .models import Entry
from .serializers import EntrySerializer
@method_decorator(csrf... | from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.http import JsonResponse
from rest_framework.parsers import JSONParser
from .models import Entry
from .serializers import EntrySerializer
@method_decorator(csrf... | <commit_before>from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.http import JsonResponse
from rest_framework.parsers import JSONParser
from .models import Entry
from .serializers import EntrySerializer
@method... |
a4c9dd451062b83b907a350ea30f2d36badb6522 | parsers/__init__.py | parsers/__init__.py | import importlib
parsers = """
singtao.STParser
apple.AppleParser
""".split()
parser_dict = {}
# Import the parser and fill in parser_dict: domain -> parser
for parser_name in parsers:
module, class_name = parser_name.rsplit('.', 1)
parser = getattr(importlib.import_module('parsers.' + module), class_name)
... | import importlib
parsers = """
singtao.STParser
apple.AppleParser
tvb.TVBParser
""".split()
parser_dict = {}
# Import the parser and fill in parser_dict: domain -> parser
for parser_name in parsers:
module, class_name = parser_name.rsplit('.', 1)
parser = getattr(importlib.import_module('parsers.' + module),... | Add tvb Parser to the init | Add tvb Parser to the init
| Python | mit | code4hk/hk-news-scrapper | import importlib
parsers = """
singtao.STParser
apple.AppleParser
""".split()
parser_dict = {}
# Import the parser and fill in parser_dict: domain -> parser
for parser_name in parsers:
module, class_name = parser_name.rsplit('.', 1)
parser = getattr(importlib.import_module('parsers.' + module), class_name)
... | import importlib
parsers = """
singtao.STParser
apple.AppleParser
tvb.TVBParser
""".split()
parser_dict = {}
# Import the parser and fill in parser_dict: domain -> parser
for parser_name in parsers:
module, class_name = parser_name.rsplit('.', 1)
parser = getattr(importlib.import_module('parsers.' + module),... | <commit_before>import importlib
parsers = """
singtao.STParser
apple.AppleParser
""".split()
parser_dict = {}
# Import the parser and fill in parser_dict: domain -> parser
for parser_name in parsers:
module, class_name = parser_name.rsplit('.', 1)
parser = getattr(importlib.import_module('parsers.' + module)... | import importlib
parsers = """
singtao.STParser
apple.AppleParser
tvb.TVBParser
""".split()
parser_dict = {}
# Import the parser and fill in parser_dict: domain -> parser
for parser_name in parsers:
module, class_name = parser_name.rsplit('.', 1)
parser = getattr(importlib.import_module('parsers.' + module),... | import importlib
parsers = """
singtao.STParser
apple.AppleParser
""".split()
parser_dict = {}
# Import the parser and fill in parser_dict: domain -> parser
for parser_name in parsers:
module, class_name = parser_name.rsplit('.', 1)
parser = getattr(importlib.import_module('parsers.' + module), class_name)
... | <commit_before>import importlib
parsers = """
singtao.STParser
apple.AppleParser
""".split()
parser_dict = {}
# Import the parser and fill in parser_dict: domain -> parser
for parser_name in parsers:
module, class_name = parser_name.rsplit('.', 1)
parser = getattr(importlib.import_module('parsers.' + module)... |
a90889b773010d2fe2ed1dff133f951c0b5baea4 | demo/__init__.py | demo/__init__.py | """Package for PythonTemplateDemo."""
__project__ = 'PythonTemplateDemo'
__version__ = '0.0.0'
VERSION = __project__ + '-' + __version__
PYTHON_VERSION = 2, 7
import sys
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (manual test)
exit("Python {}.{}+ is required.".format(*PYTHON_VERSION))
| """Package for PythonTemplateDemo."""
import sys
__project__ = 'PythonTemplateDemo'
__version__ = '0.0.0'
VERSION = __project__ + '-' + __version__
PYTHON_VERSION = 2, 7
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (manual test)
exit("Python {}.{}+ is required.".format(*PYTHON_VERSION))
| Deploy Travis CI build 387 to GitHub | Deploy Travis CI build 387 to GitHub
| Python | mit | jacebrowning/template-python-demo | """Package for PythonTemplateDemo."""
__project__ = 'PythonTemplateDemo'
__version__ = '0.0.0'
VERSION = __project__ + '-' + __version__
PYTHON_VERSION = 2, 7
import sys
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (manual test)
exit("Python {}.{}+ is required.".format(*PYTHON_VERSION))
Deploy... | """Package for PythonTemplateDemo."""
import sys
__project__ = 'PythonTemplateDemo'
__version__ = '0.0.0'
VERSION = __project__ + '-' + __version__
PYTHON_VERSION = 2, 7
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (manual test)
exit("Python {}.{}+ is required.".format(*PYTHON_VERSION))
| <commit_before>"""Package for PythonTemplateDemo."""
__project__ = 'PythonTemplateDemo'
__version__ = '0.0.0'
VERSION = __project__ + '-' + __version__
PYTHON_VERSION = 2, 7
import sys
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (manual test)
exit("Python {}.{}+ is required.".format(*PYTHON_V... | """Package for PythonTemplateDemo."""
import sys
__project__ = 'PythonTemplateDemo'
__version__ = '0.0.0'
VERSION = __project__ + '-' + __version__
PYTHON_VERSION = 2, 7
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (manual test)
exit("Python {}.{}+ is required.".format(*PYTHON_VERSION))
| """Package for PythonTemplateDemo."""
__project__ = 'PythonTemplateDemo'
__version__ = '0.0.0'
VERSION = __project__ + '-' + __version__
PYTHON_VERSION = 2, 7
import sys
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (manual test)
exit("Python {}.{}+ is required.".format(*PYTHON_VERSION))
Deploy... | <commit_before>"""Package for PythonTemplateDemo."""
__project__ = 'PythonTemplateDemo'
__version__ = '0.0.0'
VERSION = __project__ + '-' + __version__
PYTHON_VERSION = 2, 7
import sys
if not sys.version_info >= PYTHON_VERSION: # pragma: no cover (manual test)
exit("Python {}.{}+ is required.".format(*PYTHON_V... |
7e738ddbc1a4585f92e605369f8d6dc1d986dbec | scripts/get_cuda_version.py | scripts/get_cuda_version.py | import os
nvcc_version_cmd = 'nvcc -V > output.txt'
os.system(nvcc_version_cmd)
with open('output.txt') as f:
lines = f.readlines()
for line in lines:
if ", release" in line:
start = line.index(', release') + 10
end = line.index('.', start)
result = line[start:end]
... | import os
nvcc_version_cmd = 'nvcc -V > output.txt'
os.system(nvcc_version_cmd)
with open('output.txt') as f:
lines = f.readlines()
for line in lines:
if ", release" in line:
start = line.index(', release') + 10
end = line.index('.', start)
result = line[start:end]
... | Remove output.txt file after done | Remove output.txt file after done
After we are done detecting nvcc version, let's delete the temporary output.txt file. | Python | mit | GOMC-WSU/GOMC,GOMC-WSU/GOMC,GOMC-WSU/GOMC,GOMC-WSU/GOMC,GOMC-WSU/GOMC | import os
nvcc_version_cmd = 'nvcc -V > output.txt'
os.system(nvcc_version_cmd)
with open('output.txt') as f:
lines = f.readlines()
for line in lines:
if ", release" in line:
start = line.index(', release') + 10
end = line.index('.', start)
result = line[start:end]
... | import os
nvcc_version_cmd = 'nvcc -V > output.txt'
os.system(nvcc_version_cmd)
with open('output.txt') as f:
lines = f.readlines()
for line in lines:
if ", release" in line:
start = line.index(', release') + 10
end = line.index('.', start)
result = line[start:end]
... | <commit_before>import os
nvcc_version_cmd = 'nvcc -V > output.txt'
os.system(nvcc_version_cmd)
with open('output.txt') as f:
lines = f.readlines()
for line in lines:
if ", release" in line:
start = line.index(', release') + 10
end = line.index('.', start)
result = l... | import os
nvcc_version_cmd = 'nvcc -V > output.txt'
os.system(nvcc_version_cmd)
with open('output.txt') as f:
lines = f.readlines()
for line in lines:
if ", release" in line:
start = line.index(', release') + 10
end = line.index('.', start)
result = line[start:end]
... | import os
nvcc_version_cmd = 'nvcc -V > output.txt'
os.system(nvcc_version_cmd)
with open('output.txt') as f:
lines = f.readlines()
for line in lines:
if ", release" in line:
start = line.index(', release') + 10
end = line.index('.', start)
result = line[start:end]
... | <commit_before>import os
nvcc_version_cmd = 'nvcc -V > output.txt'
os.system(nvcc_version_cmd)
with open('output.txt') as f:
lines = f.readlines()
for line in lines:
if ", release" in line:
start = line.index(', release') + 10
end = line.index('.', start)
result = l... |
7a37e7ab531c151b6426dcf04647e063f3c0b0d6 | service/urls.py | service/urls.py | from django.conf.urls import url, include
from rest_framework import routers
import service.authors.views
import service.friendrequest.views
import service.users.views
import service.nodes.views
import service.posts.views
router = routers.DefaultRouter()
router.register(r'users', service.users.views.UserViewSet)
rout... | from django.conf.urls import url, include
from rest_framework import routers
import service.authors.views
import service.friendrequest.views
import service.users.views
import service.nodes.views
import service.posts.views
router = routers.DefaultRouter()
router.register(r'users', service.users.views.UserViewSet)
rout... | Fix bug caused by giving post detail view a new name | Fix bug caused by giving post detail view a new name
| Python | apache-2.0 | TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution | from django.conf.urls import url, include
from rest_framework import routers
import service.authors.views
import service.friendrequest.views
import service.users.views
import service.nodes.views
import service.posts.views
router = routers.DefaultRouter()
router.register(r'users', service.users.views.UserViewSet)
rout... | from django.conf.urls import url, include
from rest_framework import routers
import service.authors.views
import service.friendrequest.views
import service.users.views
import service.nodes.views
import service.posts.views
router = routers.DefaultRouter()
router.register(r'users', service.users.views.UserViewSet)
rout... | <commit_before>from django.conf.urls import url, include
from rest_framework import routers
import service.authors.views
import service.friendrequest.views
import service.users.views
import service.nodes.views
import service.posts.views
router = routers.DefaultRouter()
router.register(r'users', service.users.views.Us... | from django.conf.urls import url, include
from rest_framework import routers
import service.authors.views
import service.friendrequest.views
import service.users.views
import service.nodes.views
import service.posts.views
router = routers.DefaultRouter()
router.register(r'users', service.users.views.UserViewSet)
rout... | from django.conf.urls import url, include
from rest_framework import routers
import service.authors.views
import service.friendrequest.views
import service.users.views
import service.nodes.views
import service.posts.views
router = routers.DefaultRouter()
router.register(r'users', service.users.views.UserViewSet)
rout... | <commit_before>from django.conf.urls import url, include
from rest_framework import routers
import service.authors.views
import service.friendrequest.views
import service.users.views
import service.nodes.views
import service.posts.views
router = routers.DefaultRouter()
router.register(r'users', service.users.views.Us... |
a6f0b0db3e32c71e89d73db8997308e67aae294f | setup_cython.py | setup_cython.py | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
core = Extension(
'geopy.core',
["geopy/core.pyx"],
language='c++',
libraries=['stdc++'],
)
setup(
cmdclass = {'build_ext': build_ext},
include_dirs ... | import os
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
core = Extension(
'geometry.core',
[os.path.join("geometry", "core.pyx")],
language='c++',
libraries=['stdc++'],
include_dirs = ['.'],
)
setu... | Make module path OS independent by using os.path.join | Make module path OS independent by using os.path.join
| Python | bsd-3-clause | FRidh/python-geometry | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
core = Extension(
'geopy.core',
["geopy/core.pyx"],
language='c++',
libraries=['stdc++'],
)
setup(
cmdclass = {'build_ext': build_ext},
include_dirs ... | import os
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
core = Extension(
'geometry.core',
[os.path.join("geometry", "core.pyx")],
language='c++',
libraries=['stdc++'],
include_dirs = ['.'],
)
setu... | <commit_before>from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
core = Extension(
'geopy.core',
["geopy/core.pyx"],
language='c++',
libraries=['stdc++'],
)
setup(
cmdclass = {'build_ext': build_ext},
... | import os
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
core = Extension(
'geometry.core',
[os.path.join("geometry", "core.pyx")],
language='c++',
libraries=['stdc++'],
include_dirs = ['.'],
)
setu... | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
core = Extension(
'geopy.core',
["geopy/core.pyx"],
language='c++',
libraries=['stdc++'],
)
setup(
cmdclass = {'build_ext': build_ext},
include_dirs ... | <commit_before>from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
core = Extension(
'geopy.core',
["geopy/core.pyx"],
language='c++',
libraries=['stdc++'],
)
setup(
cmdclass = {'build_ext': build_ext},
... |
0571864eb2d99b746386ace721b8e218f127c6ac | email_obfuscator/templatetags/email_obfuscator.py | email_obfuscator/templatetags/email_obfuscator.py | from django import template
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
register = template.Library()
def obfuscate_string(value):
return ''.join(['&#%s;'.format(str(ord(char))) for char in value])
@register.filter
@stringfilter
def obfuscate(value):
... | from django import template
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
register = template.Library()
def obfuscate_string(value):
return ''.join(['&#{0:s};'.format(str(ord(char))) for char in value])
@register.filter
@stringfilter
def obfuscate(value):... | Fix mixup of old and new-style string formatting | Fix mixup of old and new-style string formatting | Python | mit | morninj/django-email-obfuscator | from django import template
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
register = template.Library()
def obfuscate_string(value):
return ''.join(['&#%s;'.format(str(ord(char))) for char in value])
@register.filter
@stringfilter
def obfuscate(value):
... | from django import template
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
register = template.Library()
def obfuscate_string(value):
return ''.join(['&#{0:s};'.format(str(ord(char))) for char in value])
@register.filter
@stringfilter
def obfuscate(value):... | <commit_before>from django import template
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
register = template.Library()
def obfuscate_string(value):
return ''.join(['&#%s;'.format(str(ord(char))) for char in value])
@register.filter
@stringfilter
def obfus... | from django import template
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
register = template.Library()
def obfuscate_string(value):
return ''.join(['&#{0:s};'.format(str(ord(char))) for char in value])
@register.filter
@stringfilter
def obfuscate(value):... | from django import template
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
register = template.Library()
def obfuscate_string(value):
return ''.join(['&#%s;'.format(str(ord(char))) for char in value])
@register.filter
@stringfilter
def obfuscate(value):
... | <commit_before>from django import template
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
register = template.Library()
def obfuscate_string(value):
return ''.join(['&#%s;'.format(str(ord(char))) for char in value])
@register.filter
@stringfilter
def obfus... |
41ac7e2d85126c2fe5dd16230ed678d72a8d048f | jax/__init__.py | jax/__init__.py | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | Use a regular import to add jax.__version__ rather than exec() trickery. | Use a regular import to add jax.__version__ rather than exec() trickery.
(The exec() trickery is needed for setup.py, but not for jax/__init__.py.)
| Python | apache-2.0 | tensorflow/probability,google/jax,google/jax,google/jax,google/jax,tensorflow/probability | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | <commit_before># Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | <commit_before># Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
e1c6b7c369395208b467fcf169b6e3d0eb8c8dd9 | src/rlib/string_stream.py | src/rlib/string_stream.py | from rpython.rlib.streamio import Stream, StreamError
class StringStream(Stream):
def __init__(self, string):
self._string = string
self.pos = 0
self.max = len(string) - 1
def write(self, data):
raise StreamError("StringStream is not writable")
def truncate(self, si... | from rpython.rlib.streamio import Stream, StreamError
class StringStream(Stream):
def __init__(self, string):
self._string = string
self.pos = 0
self.max = len(string) - 1
def write(self, data):
raise StreamError("StringStream is not writable")
def truncate(self, ... | Fix StringStream to conform to latest pypy | Fix StringStream to conform to latest pypy
Signed-off-by: Stefan Marr <[email protected]>
| Python | mit | SOM-st/RPySOM,smarr/RTruffleSOM,smarr/RTruffleSOM,smarr/PySOM,SOM-st/RPySOM,SOM-st/RTruffleSOM,SOM-st/PySOM,SOM-st/RTruffleSOM,SOM-st/PySOM,smarr/PySOM | from rpython.rlib.streamio import Stream, StreamError
class StringStream(Stream):
def __init__(self, string):
self._string = string
self.pos = 0
self.max = len(string) - 1
def write(self, data):
raise StreamError("StringStream is not writable")
def truncate(self, si... | from rpython.rlib.streamio import Stream, StreamError
class StringStream(Stream):
def __init__(self, string):
self._string = string
self.pos = 0
self.max = len(string) - 1
def write(self, data):
raise StreamError("StringStream is not writable")
def truncate(self, ... | <commit_before>from rpython.rlib.streamio import Stream, StreamError
class StringStream(Stream):
def __init__(self, string):
self._string = string
self.pos = 0
self.max = len(string) - 1
def write(self, data):
raise StreamError("StringStream is not writable")
def tr... | from rpython.rlib.streamio import Stream, StreamError
class StringStream(Stream):
def __init__(self, string):
self._string = string
self.pos = 0
self.max = len(string) - 1
def write(self, data):
raise StreamError("StringStream is not writable")
def truncate(self, ... | from rpython.rlib.streamio import Stream, StreamError
class StringStream(Stream):
def __init__(self, string):
self._string = string
self.pos = 0
self.max = len(string) - 1
def write(self, data):
raise StreamError("StringStream is not writable")
def truncate(self, si... | <commit_before>from rpython.rlib.streamio import Stream, StreamError
class StringStream(Stream):
def __init__(self, string):
self._string = string
self.pos = 0
self.max = len(string) - 1
def write(self, data):
raise StreamError("StringStream is not writable")
def tr... |
98925a82dfb45a4c76496cd11af8d1483a678e6e | sigh/views/api.py | sigh/views/api.py | import json
from functools import wraps
from flask import Blueprint
from flask import Response
from ..models import Tag
api_views = Blueprint('api', __name__, url_prefix='/api/')
def jsonify(func):
@wraps(func)
def _(*args, **kwargs):
result = func(*args, **kwargs)
return Response(json.dum... | import json
from functools import wraps
from flask import Blueprint
from flask import Response
from ..models import Tag
from ..models import User
api_views = Blueprint('api', __name__, url_prefix='/api/')
def jsonify(func):
@wraps(func)
def _(*args, **kwargs):
result = func(*args, **kwargs)
... | Create a new API for User autocompletion | Create a new API for User autocompletion
| Python | mit | kxxoling/Programmer-Sign,kxxoling/Programmer-Sign,kxxoling/Programmer-Sign | import json
from functools import wraps
from flask import Blueprint
from flask import Response
from ..models import Tag
api_views = Blueprint('api', __name__, url_prefix='/api/')
def jsonify(func):
@wraps(func)
def _(*args, **kwargs):
result = func(*args, **kwargs)
return Response(json.dum... | import json
from functools import wraps
from flask import Blueprint
from flask import Response
from ..models import Tag
from ..models import User
api_views = Blueprint('api', __name__, url_prefix='/api/')
def jsonify(func):
@wraps(func)
def _(*args, **kwargs):
result = func(*args, **kwargs)
... | <commit_before>import json
from functools import wraps
from flask import Blueprint
from flask import Response
from ..models import Tag
api_views = Blueprint('api', __name__, url_prefix='/api/')
def jsonify(func):
@wraps(func)
def _(*args, **kwargs):
result = func(*args, **kwargs)
return Re... | import json
from functools import wraps
from flask import Blueprint
from flask import Response
from ..models import Tag
from ..models import User
api_views = Blueprint('api', __name__, url_prefix='/api/')
def jsonify(func):
@wraps(func)
def _(*args, **kwargs):
result = func(*args, **kwargs)
... | import json
from functools import wraps
from flask import Blueprint
from flask import Response
from ..models import Tag
api_views = Blueprint('api', __name__, url_prefix='/api/')
def jsonify(func):
@wraps(func)
def _(*args, **kwargs):
result = func(*args, **kwargs)
return Response(json.dum... | <commit_before>import json
from functools import wraps
from flask import Blueprint
from flask import Response
from ..models import Tag
api_views = Blueprint('api', __name__, url_prefix='/api/')
def jsonify(func):
@wraps(func)
def _(*args, **kwargs):
result = func(*args, **kwargs)
return Re... |
44b0634b387c3856aa26b711bf38862380ab1ffe | setup.py | setup.py | import os
from setuptools import setup, find_packages
ROOT = os.path.abspath(os.path.dirname(__file__))
setup(
name='Flask-Mobility',
version='0.1',
url='http://github.com/rehandalal/flask-mobility/',
license='BSD',
author='Rehan Dalal',
author_email='[email protected]',
description='A ... | import os
from setuptools import setup, find_packages
ROOT = os.path.abspath(os.path.dirname(__file__))
setup(
name='Flask-Mobility',
version='0.1',
url='http://github.com/rehandalal/flask-mobility/',
license='BSD',
author='Rehan Dalal',
author_email='[email protected]',
description='A ... | Add python versions to classifiers | Add python versions to classifiers
| Python | bsd-3-clause | rehandalal/flask-mobility | import os
from setuptools import setup, find_packages
ROOT = os.path.abspath(os.path.dirname(__file__))
setup(
name='Flask-Mobility',
version='0.1',
url='http://github.com/rehandalal/flask-mobility/',
license='BSD',
author='Rehan Dalal',
author_email='[email protected]',
description='A ... | import os
from setuptools import setup, find_packages
ROOT = os.path.abspath(os.path.dirname(__file__))
setup(
name='Flask-Mobility',
version='0.1',
url='http://github.com/rehandalal/flask-mobility/',
license='BSD',
author='Rehan Dalal',
author_email='[email protected]',
description='A ... | <commit_before>import os
from setuptools import setup, find_packages
ROOT = os.path.abspath(os.path.dirname(__file__))
setup(
name='Flask-Mobility',
version='0.1',
url='http://github.com/rehandalal/flask-mobility/',
license='BSD',
author='Rehan Dalal',
author_email='[email protected]',
... | import os
from setuptools import setup, find_packages
ROOT = os.path.abspath(os.path.dirname(__file__))
setup(
name='Flask-Mobility',
version='0.1',
url='http://github.com/rehandalal/flask-mobility/',
license='BSD',
author='Rehan Dalal',
author_email='[email protected]',
description='A ... | import os
from setuptools import setup, find_packages
ROOT = os.path.abspath(os.path.dirname(__file__))
setup(
name='Flask-Mobility',
version='0.1',
url='http://github.com/rehandalal/flask-mobility/',
license='BSD',
author='Rehan Dalal',
author_email='[email protected]',
description='A ... | <commit_before>import os
from setuptools import setup, find_packages
ROOT = os.path.abspath(os.path.dirname(__file__))
setup(
name='Flask-Mobility',
version='0.1',
url='http://github.com/rehandalal/flask-mobility/',
license='BSD',
author='Rehan Dalal',
author_email='[email protected]',
... |
f22945907bafb189645800db1e9ca804104b06db | setup.py | setup.py | """
The setup package to install TensorPy dependencies
*> This does NOT include TensorFlow installation
*> To install TensorFlow, use "./install_tensorflow.sh"
"""
from setuptools import setup, find_packages # noqa
setup(
name='tensorpy',
version='1.0.1',
url='http://tensorpy.com',
author='Michael Mi... | """
The setup package to install TensorPy dependencies
*> This does NOT include TensorFlow installation
*> To install TensorFlow, use "./install_tensorflow.sh"
"""
from setuptools import setup, find_packages # noqa
setup(
name='tensorpy',
version='1.0.1',
url='http://tensorpy.com',
author='Michael Mi... | Update the "six" to force version 1.10.0 | Update the "six" to force version 1.10.0
| Python | mit | TensorPy/TensorPy,TensorPy/TensorPy | """
The setup package to install TensorPy dependencies
*> This does NOT include TensorFlow installation
*> To install TensorFlow, use "./install_tensorflow.sh"
"""
from setuptools import setup, find_packages # noqa
setup(
name='tensorpy',
version='1.0.1',
url='http://tensorpy.com',
author='Michael Mi... | """
The setup package to install TensorPy dependencies
*> This does NOT include TensorFlow installation
*> To install TensorFlow, use "./install_tensorflow.sh"
"""
from setuptools import setup, find_packages # noqa
setup(
name='tensorpy',
version='1.0.1',
url='http://tensorpy.com',
author='Michael Mi... | <commit_before>"""
The setup package to install TensorPy dependencies
*> This does NOT include TensorFlow installation
*> To install TensorFlow, use "./install_tensorflow.sh"
"""
from setuptools import setup, find_packages # noqa
setup(
name='tensorpy',
version='1.0.1',
url='http://tensorpy.com',
aut... | """
The setup package to install TensorPy dependencies
*> This does NOT include TensorFlow installation
*> To install TensorFlow, use "./install_tensorflow.sh"
"""
from setuptools import setup, find_packages # noqa
setup(
name='tensorpy',
version='1.0.1',
url='http://tensorpy.com',
author='Michael Mi... | """
The setup package to install TensorPy dependencies
*> This does NOT include TensorFlow installation
*> To install TensorFlow, use "./install_tensorflow.sh"
"""
from setuptools import setup, find_packages # noqa
setup(
name='tensorpy',
version='1.0.1',
url='http://tensorpy.com',
author='Michael Mi... | <commit_before>"""
The setup package to install TensorPy dependencies
*> This does NOT include TensorFlow installation
*> To install TensorFlow, use "./install_tensorflow.sh"
"""
from setuptools import setup, find_packages # noqa
setup(
name='tensorpy',
version='1.0.1',
url='http://tensorpy.com',
aut... |
17e774c1c59411fd8b33d597b54f872466ec4fe7 | setup.py | setup.py | #!/usr/bin/env python
import os
import setuptools
setuptools.setup(
name='remoteconfig',
version='0.2.4',
author='Max Zheng',
author_email='maxzheng.os @t gmail.com',
description=open('README.rst').read(),
install_requires=[
'localconfig>=0.4',
'requests',
],
license='MIT',
package_dir... | #!/usr/bin/env python
import os
import setuptools
setuptools.setup(
name='remoteconfig',
version='0.2.4',
author='Max Zheng',
author_email='maxzheng.os @t gmail.com',
description='A simple wrapper for localconfig that allows for reading config from a remote server',
long_description=open('README.rst').... | Add long description / url | Add long description / url
| Python | mit | maxzheng/remoteconfig | #!/usr/bin/env python
import os
import setuptools
setuptools.setup(
name='remoteconfig',
version='0.2.4',
author='Max Zheng',
author_email='maxzheng.os @t gmail.com',
description=open('README.rst').read(),
install_requires=[
'localconfig>=0.4',
'requests',
],
license='MIT',
package_dir... | #!/usr/bin/env python
import os
import setuptools
setuptools.setup(
name='remoteconfig',
version='0.2.4',
author='Max Zheng',
author_email='maxzheng.os @t gmail.com',
description='A simple wrapper for localconfig that allows for reading config from a remote server',
long_description=open('README.rst').... | <commit_before>#!/usr/bin/env python
import os
import setuptools
setuptools.setup(
name='remoteconfig',
version='0.2.4',
author='Max Zheng',
author_email='maxzheng.os @t gmail.com',
description=open('README.rst').read(),
install_requires=[
'localconfig>=0.4',
'requests',
],
license='MIT',... | #!/usr/bin/env python
import os
import setuptools
setuptools.setup(
name='remoteconfig',
version='0.2.4',
author='Max Zheng',
author_email='maxzheng.os @t gmail.com',
description='A simple wrapper for localconfig that allows for reading config from a remote server',
long_description=open('README.rst').... | #!/usr/bin/env python
import os
import setuptools
setuptools.setup(
name='remoteconfig',
version='0.2.4',
author='Max Zheng',
author_email='maxzheng.os @t gmail.com',
description=open('README.rst').read(),
install_requires=[
'localconfig>=0.4',
'requests',
],
license='MIT',
package_dir... | <commit_before>#!/usr/bin/env python
import os
import setuptools
setuptools.setup(
name='remoteconfig',
version='0.2.4',
author='Max Zheng',
author_email='maxzheng.os @t gmail.com',
description=open('README.rst').read(),
install_requires=[
'localconfig>=0.4',
'requests',
],
license='MIT',... |
83cc9a5304e41e4ce517cfc739238a37f13f626a | matchzoo/data_pack/build_unit_from_data_pack.py | matchzoo/data_pack/build_unit_from_data_pack.py | from tqdm import tqdm
from .data_pack import DataPack
from matchzoo import processor_units
def build_unit_from_data_pack(
unit: processor_units.StatefulProcessorUnit,
data_pack: DataPack, flatten: bool = True,
verbose: int = 1
) -> processor_units.StatefulProcessorUnit:
"""
Build a :class:`Statef... | """Build unit from data pack."""
from tqdm import tqdm
from matchzoo import processor_units
from .data_pack import DataPack
def build_unit_from_data_pack(
unit: processor_units.StatefulProcessorUnit,
data_pack: DataPack, flatten: bool = True,
verbose: int = 1
) -> processor_units.StatefulProcessorUnit:
... | Update docs for build unit. | Update docs for build unit.
| Python | apache-2.0 | faneshion/MatchZoo,faneshion/MatchZoo | from tqdm import tqdm
from .data_pack import DataPack
from matchzoo import processor_units
def build_unit_from_data_pack(
unit: processor_units.StatefulProcessorUnit,
data_pack: DataPack, flatten: bool = True,
verbose: int = 1
) -> processor_units.StatefulProcessorUnit:
"""
Build a :class:`Statef... | """Build unit from data pack."""
from tqdm import tqdm
from matchzoo import processor_units
from .data_pack import DataPack
def build_unit_from_data_pack(
unit: processor_units.StatefulProcessorUnit,
data_pack: DataPack, flatten: bool = True,
verbose: int = 1
) -> processor_units.StatefulProcessorUnit:
... | <commit_before>from tqdm import tqdm
from .data_pack import DataPack
from matchzoo import processor_units
def build_unit_from_data_pack(
unit: processor_units.StatefulProcessorUnit,
data_pack: DataPack, flatten: bool = True,
verbose: int = 1
) -> processor_units.StatefulProcessorUnit:
"""
Build a... | """Build unit from data pack."""
from tqdm import tqdm
from matchzoo import processor_units
from .data_pack import DataPack
def build_unit_from_data_pack(
unit: processor_units.StatefulProcessorUnit,
data_pack: DataPack, flatten: bool = True,
verbose: int = 1
) -> processor_units.StatefulProcessorUnit:
... | from tqdm import tqdm
from .data_pack import DataPack
from matchzoo import processor_units
def build_unit_from_data_pack(
unit: processor_units.StatefulProcessorUnit,
data_pack: DataPack, flatten: bool = True,
verbose: int = 1
) -> processor_units.StatefulProcessorUnit:
"""
Build a :class:`Statef... | <commit_before>from tqdm import tqdm
from .data_pack import DataPack
from matchzoo import processor_units
def build_unit_from_data_pack(
unit: processor_units.StatefulProcessorUnit,
data_pack: DataPack, flatten: bool = True,
verbose: int = 1
) -> processor_units.StatefulProcessorUnit:
"""
Build a... |
fac395f86a1fbe9a8c64a0f178b4dcaa3a218fb1 | setup.py | setup.py | #!/usr/bin/env python
"""
Logan
======
Logan is a toolkit for running standalone Django applications. It provides you
with tools to create a CLI runner, manage settings, and the ability to bootstrap
the process.
:copyright: (c) 2012 David Cramer.
:license: Apache License 2.0, see LICENSE for more details.
"""
from se... | #!/usr/bin/env python
"""
Logan
======
Logan is a toolkit for running standalone Django applications. It provides you
with tools to create a CLI runner, manage settings, and the ability to bootstrap
the process.
:copyright: (c) 2012 David Cramer.
:license: Apache License 2.0, see LICENSE for more details.
"""
from se... | Support Django 1.4 in the test suite | Support Django 1.4 in the test suite
| Python | apache-2.0 | dcramer/logan | #!/usr/bin/env python
"""
Logan
======
Logan is a toolkit for running standalone Django applications. It provides you
with tools to create a CLI runner, manage settings, and the ability to bootstrap
the process.
:copyright: (c) 2012 David Cramer.
:license: Apache License 2.0, see LICENSE for more details.
"""
from se... | #!/usr/bin/env python
"""
Logan
======
Logan is a toolkit for running standalone Django applications. It provides you
with tools to create a CLI runner, manage settings, and the ability to bootstrap
the process.
:copyright: (c) 2012 David Cramer.
:license: Apache License 2.0, see LICENSE for more details.
"""
from se... | <commit_before>#!/usr/bin/env python
"""
Logan
======
Logan is a toolkit for running standalone Django applications. It provides you
with tools to create a CLI runner, manage settings, and the ability to bootstrap
the process.
:copyright: (c) 2012 David Cramer.
:license: Apache License 2.0, see LICENSE for more detai... | #!/usr/bin/env python
"""
Logan
======
Logan is a toolkit for running standalone Django applications. It provides you
with tools to create a CLI runner, manage settings, and the ability to bootstrap
the process.
:copyright: (c) 2012 David Cramer.
:license: Apache License 2.0, see LICENSE for more details.
"""
from se... | #!/usr/bin/env python
"""
Logan
======
Logan is a toolkit for running standalone Django applications. It provides you
with tools to create a CLI runner, manage settings, and the ability to bootstrap
the process.
:copyright: (c) 2012 David Cramer.
:license: Apache License 2.0, see LICENSE for more details.
"""
from se... | <commit_before>#!/usr/bin/env python
"""
Logan
======
Logan is a toolkit for running standalone Django applications. It provides you
with tools to create a CLI runner, manage settings, and the ability to bootstrap
the process.
:copyright: (c) 2012 David Cramer.
:license: Apache License 2.0, see LICENSE for more detai... |
880b5257d549c2150d8888a2f062acd9cc948480 | array/is-crypt-solution.py | array/is-crypt-solution.py | # You have an array of strings crypt, the cryptarithm, and an an array containing the mapping of letters and digits, solution. The array crypt will contain three non-empty strings that follow the structure: [word1, word2, word3], which should be interpreted as the word1 + word2 = word3 cryptarithm
# Write a solution wh... | # You have an array of strings crypt, the cryptarithm, and an an array containing the mapping of letters and digits, solution. The array crypt will contain three non-empty strings that follow the structure: [word1, word2, word3], which should be interpreted as the word1 + word2 = word3 cryptarithm
# Write a solution wh... | Check if sum of decoded numbers of first and second strings equal to decoded number of third string | Check if sum of decoded numbers of first and second strings equal to decoded number of third string
| Python | mit | derekmpham/interview-prep,derekmpham/interview-prep | # You have an array of strings crypt, the cryptarithm, and an an array containing the mapping of letters and digits, solution. The array crypt will contain three non-empty strings that follow the structure: [word1, word2, word3], which should be interpreted as the word1 + word2 = word3 cryptarithm
# Write a solution wh... | # You have an array of strings crypt, the cryptarithm, and an an array containing the mapping of letters and digits, solution. The array crypt will contain three non-empty strings that follow the structure: [word1, word2, word3], which should be interpreted as the word1 + word2 = word3 cryptarithm
# Write a solution wh... | <commit_before># You have an array of strings crypt, the cryptarithm, and an an array containing the mapping of letters and digits, solution. The array crypt will contain three non-empty strings that follow the structure: [word1, word2, word3], which should be interpreted as the word1 + word2 = word3 cryptarithm
# Writ... | # You have an array of strings crypt, the cryptarithm, and an an array containing the mapping of letters and digits, solution. The array crypt will contain three non-empty strings that follow the structure: [word1, word2, word3], which should be interpreted as the word1 + word2 = word3 cryptarithm
# Write a solution wh... | # You have an array of strings crypt, the cryptarithm, and an an array containing the mapping of letters and digits, solution. The array crypt will contain three non-empty strings that follow the structure: [word1, word2, word3], which should be interpreted as the word1 + word2 = word3 cryptarithm
# Write a solution wh... | <commit_before># You have an array of strings crypt, the cryptarithm, and an an array containing the mapping of letters and digits, solution. The array crypt will contain three non-empty strings that follow the structure: [word1, word2, word3], which should be interpreted as the word1 + word2 = word3 cryptarithm
# Writ... |
fef260c3731408592fd88e73817fe0f0cd7fe769 | telemetry/telemetry/core/chrome/inspector_memory_unittest.py | telemetry/telemetry/core/chrome/inspector_memory_unittest.py | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from telemetry.test import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
def testGetDOMStats(self):
unittest_data_... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from telemetry.test import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
def testGetDOMStats(self):
unittest_data_... | Fix InspectorMemoryTest.testGetDOMStats to have consistent behaviour on CrOS and desktop versions of Chrome. Starting the browser in CrOS requires navigating through an initial setup that does not leave us with a tab at "chrome://newtab". This workaround runs the test in a new tab on all platforms for consistency. | Fix InspectorMemoryTest.testGetDOMStats to have consistent
behaviour on CrOS and desktop versions of Chrome. Starting the
browser in CrOS requires navigating through an initial setup
that does not leave us with a tab at "chrome://newtab". This workaround
runs the test in a new tab on all platforms for consistency.
BUG... | Python | bsd-3-clause | benschmaus/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,sahiljain/catapult,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult,catapult-project/catapult-csm,benschmaus/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult,catapult-project/catapult,sahiljain/catap... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from telemetry.test import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
def testGetDOMStats(self):
unittest_data_... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from telemetry.test import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
def testGetDOMStats(self):
unittest_data_... | <commit_before># Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from telemetry.test import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
def testGetDOMStats(self):
... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from telemetry.test import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
def testGetDOMStats(self):
unittest_data_... | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from telemetry.test import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
def testGetDOMStats(self):
unittest_data_... | <commit_before># Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from telemetry.test import tab_test_case
class InspectorMemoryTest(tab_test_case.TabTestCase):
def testGetDOMStats(self):
... |
ec91dc2fec8da044737c08db257f621d75016d3d | setup.py | setup.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup
from pathlib import Path
this_dir = Path(__file__).absolute().parent
if sys.argv[-1].startswith('publish'):
if os.system("pip list | grep wheel"):
print("wheel not installed.\nUse `pip install wheel`.\nExiting.... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup
from pathlib import Path
this_dir = Path(__file__).absolute().parent
if sys.argv[-1].startswith('publish'):
if os.system("pip list | grep wheel"):
print("wheel not installed.\nUse `pip install wheel`.\nExiting.... | Remove print. Tag should be made before publish. | Remove print. Tag should be made before publish.
| Python | mit | igordejanovic/parglare,igordejanovic/parglare | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup
from pathlib import Path
this_dir = Path(__file__).absolute().parent
if sys.argv[-1].startswith('publish'):
if os.system("pip list | grep wheel"):
print("wheel not installed.\nUse `pip install wheel`.\nExiting.... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup
from pathlib import Path
this_dir = Path(__file__).absolute().parent
if sys.argv[-1].startswith('publish'):
if os.system("pip list | grep wheel"):
print("wheel not installed.\nUse `pip install wheel`.\nExiting.... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup
from pathlib import Path
this_dir = Path(__file__).absolute().parent
if sys.argv[-1].startswith('publish'):
if os.system("pip list | grep wheel"):
print("wheel not installed.\nUse `pip install wh... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup
from pathlib import Path
this_dir = Path(__file__).absolute().parent
if sys.argv[-1].startswith('publish'):
if os.system("pip list | grep wheel"):
print("wheel not installed.\nUse `pip install wheel`.\nExiting.... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup
from pathlib import Path
this_dir = Path(__file__).absolute().parent
if sys.argv[-1].startswith('publish'):
if os.system("pip list | grep wheel"):
print("wheel not installed.\nUse `pip install wheel`.\nExiting.... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
from setuptools import setup
from pathlib import Path
this_dir = Path(__file__).absolute().parent
if sys.argv[-1].startswith('publish'):
if os.system("pip list | grep wheel"):
print("wheel not installed.\nUse `pip install wh... |
3b59809abe755954787482fd3112862dd54019eb | setup.py | setup.py | from setuptools import setup, find_packages
install_requires = open('requirements.txt').read().split()
setup(
name='mocurly',
version='0.0.1',
description='A library that allows your python tests to easily mock out the recurly library',
author='Yoriyasu Yano',
author_email='[email protected]',
... | from setuptools import setup, find_packages
install_requires = open('requirements.txt').read().split()
setup(
name='mocurly',
version='0.0.1',
description='A library that allows your python tests to easily mock out the recurly library',
author='Yoriyasu Yano',
author_email='[email protected]',
... | Install should include xml files | Install should include xml files
| Python | mit | Captricity/mocurly | from setuptools import setup, find_packages
install_requires = open('requirements.txt').read().split()
setup(
name='mocurly',
version='0.0.1',
description='A library that allows your python tests to easily mock out the recurly library',
author='Yoriyasu Yano',
author_email='[email protected]',
... | from setuptools import setup, find_packages
install_requires = open('requirements.txt').read().split()
setup(
name='mocurly',
version='0.0.1',
description='A library that allows your python tests to easily mock out the recurly library',
author='Yoriyasu Yano',
author_email='[email protected]',
... | <commit_before>from setuptools import setup, find_packages
install_requires = open('requirements.txt').read().split()
setup(
name='mocurly',
version='0.0.1',
description='A library that allows your python tests to easily mock out the recurly library',
author='Yoriyasu Yano',
author_email='yoriy@ca... | from setuptools import setup, find_packages
install_requires = open('requirements.txt').read().split()
setup(
name='mocurly',
version='0.0.1',
description='A library that allows your python tests to easily mock out the recurly library',
author='Yoriyasu Yano',
author_email='[email protected]',
... | from setuptools import setup, find_packages
install_requires = open('requirements.txt').read().split()
setup(
name='mocurly',
version='0.0.1',
description='A library that allows your python tests to easily mock out the recurly library',
author='Yoriyasu Yano',
author_email='[email protected]',
... | <commit_before>from setuptools import setup, find_packages
install_requires = open('requirements.txt').read().split()
setup(
name='mocurly',
version='0.0.1',
description='A library that allows your python tests to easily mock out the recurly library',
author='Yoriyasu Yano',
author_email='yoriy@ca... |
c6d81ce7eede6db801d4e9a92b27ec5d409d0eab | setup.py | setup.py | from setuptools import setup
setup(
name='autograd',
version='1.4',
description='Efficiently computes derivatives of numpy code.',
author='Dougal Maclaurin and David Duvenaud and Matthew Johnson',
author_email="[email protected], [email protected], [email protected]",
packa... | from setuptools import setup
setup(
name='autograd',
version='1.5',
description='Efficiently computes derivatives of numpy code.',
author='Dougal Maclaurin and David Duvenaud and Matthew Johnson',
author_email="[email protected], [email protected], [email protected]",
packa... | Increase version number for pypi | Increase version number for pypi
| Python | mit | HIPS/autograd,HIPS/autograd | from setuptools import setup
setup(
name='autograd',
version='1.4',
description='Efficiently computes derivatives of numpy code.',
author='Dougal Maclaurin and David Duvenaud and Matthew Johnson',
author_email="[email protected], [email protected], [email protected]",
packa... | from setuptools import setup
setup(
name='autograd',
version='1.5',
description='Efficiently computes derivatives of numpy code.',
author='Dougal Maclaurin and David Duvenaud and Matthew Johnson',
author_email="[email protected], [email protected], [email protected]",
packa... | <commit_before>from setuptools import setup
setup(
name='autograd',
version='1.4',
description='Efficiently computes derivatives of numpy code.',
author='Dougal Maclaurin and David Duvenaud and Matthew Johnson',
author_email="[email protected], [email protected], [email protected].... | from setuptools import setup
setup(
name='autograd',
version='1.5',
description='Efficiently computes derivatives of numpy code.',
author='Dougal Maclaurin and David Duvenaud and Matthew Johnson',
author_email="[email protected], [email protected], [email protected]",
packa... | from setuptools import setup
setup(
name='autograd',
version='1.4',
description='Efficiently computes derivatives of numpy code.',
author='Dougal Maclaurin and David Duvenaud and Matthew Johnson',
author_email="[email protected], [email protected], [email protected]",
packa... | <commit_before>from setuptools import setup
setup(
name='autograd',
version='1.4',
description='Efficiently computes derivatives of numpy code.',
author='Dougal Maclaurin and David Duvenaud and Matthew Johnson',
author_email="[email protected], [email protected], [email protected].... |
fa874329f57899eee34182f20b0621bf488cae5e | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='jupyterhub-kubespawner',
version='0.5.1',
install_requires=[
'jupyterhub',
'pyYAML',
'kubernetes==2.*',
'escapism',
'jupyter',
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
desc... | from setuptools import setup, find_packages
setup(
name='jupyterhub-kubespawner',
version='0.5.1',
install_requires=[
'jupyterhub',
'pyYAML',
'kubernetes==3.*',
'escapism',
'jupyter',
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
desc... | Switch to newer version of kubernetes client library | Switch to newer version of kubernetes client library
Has a bunch of fixes for us that are useful!
| Python | bsd-3-clause | yuvipanda/jupyterhub-kubernetes-spawner,ktong/kubespawner,jupyterhub/kubespawner | from setuptools import setup, find_packages
setup(
name='jupyterhub-kubespawner',
version='0.5.1',
install_requires=[
'jupyterhub',
'pyYAML',
'kubernetes==2.*',
'escapism',
'jupyter',
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
desc... | from setuptools import setup, find_packages
setup(
name='jupyterhub-kubespawner',
version='0.5.1',
install_requires=[
'jupyterhub',
'pyYAML',
'kubernetes==3.*',
'escapism',
'jupyter',
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
desc... | <commit_before>from setuptools import setup, find_packages
setup(
name='jupyterhub-kubespawner',
version='0.5.1',
install_requires=[
'jupyterhub',
'pyYAML',
'kubernetes==2.*',
'escapism',
'jupyter',
],
setup_requires=['pytest-runner'],
tests_require=['pyt... | from setuptools import setup, find_packages
setup(
name='jupyterhub-kubespawner',
version='0.5.1',
install_requires=[
'jupyterhub',
'pyYAML',
'kubernetes==3.*',
'escapism',
'jupyter',
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
desc... | from setuptools import setup, find_packages
setup(
name='jupyterhub-kubespawner',
version='0.5.1',
install_requires=[
'jupyterhub',
'pyYAML',
'kubernetes==2.*',
'escapism',
'jupyter',
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
desc... | <commit_before>from setuptools import setup, find_packages
setup(
name='jupyterhub-kubespawner',
version='0.5.1',
install_requires=[
'jupyterhub',
'pyYAML',
'kubernetes==2.*',
'escapism',
'jupyter',
],
setup_requires=['pytest-runner'],
tests_require=['pyt... |
9d53f0b11c53127d556bc1027b82491d71a1a381 | setup.py | setup.py | from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '2.0.0',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email =... | from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '2.1.0',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email =... | Prepare for the next release. | Prepare for the next release.
| Python | mit | pwcazenave/PyFVCOM | from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '2.0.0',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email =... | from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '2.1.0',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email =... | <commit_before>from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '2.0.0',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
... | from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '2.1.0',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email =... | from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '2.0.0',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
author_email =... | <commit_before>from setuptools import setup
setup(
name = 'PyFVCOM',
packages = ['PyFVCOM'],
version = '2.0.0',
description = ("PyFVCOM is a collection of various tools and utilities which can be used to extract, analyse and plot input and output files from FVCOM."),
author = 'Pierre Cazenave',
... |
6a84b18f584c7f9b8a3d7d53605bce5be919b056 | setup.py | setup.py | from setuptools import setup
from pybib import __version__
setup(name='pybib',
version=__version__,
description='Fetch citation information, given a Digital Object Identifier',
url='https://github.com/jgilchrist/pybib',
author='Jonny Gilchrist',
packages=['pybib'],
install_requires... | from setuptools import setup
from pybib import __version__
setup(name='pybib',
version=__version__,
description='Fetch citation information, given a Digital Object Identifier',
long_description=open('README.rst').read(),
url='https://github.com/jgilchrist/pybib',
author='Jonny Gilchrist'... | Fix the README for PyPi | Fix the README for PyPi
| Python | bsd-3-clause | jgilchrist/pybib | from setuptools import setup
from pybib import __version__
setup(name='pybib',
version=__version__,
description='Fetch citation information, given a Digital Object Identifier',
url='https://github.com/jgilchrist/pybib',
author='Jonny Gilchrist',
packages=['pybib'],
install_requires... | from setuptools import setup
from pybib import __version__
setup(name='pybib',
version=__version__,
description='Fetch citation information, given a Digital Object Identifier',
long_description=open('README.rst').read(),
url='https://github.com/jgilchrist/pybib',
author='Jonny Gilchrist'... | <commit_before>from setuptools import setup
from pybib import __version__
setup(name='pybib',
version=__version__,
description='Fetch citation information, given a Digital Object Identifier',
url='https://github.com/jgilchrist/pybib',
author='Jonny Gilchrist',
packages=['pybib'],
i... | from setuptools import setup
from pybib import __version__
setup(name='pybib',
version=__version__,
description='Fetch citation information, given a Digital Object Identifier',
long_description=open('README.rst').read(),
url='https://github.com/jgilchrist/pybib',
author='Jonny Gilchrist'... | from setuptools import setup
from pybib import __version__
setup(name='pybib',
version=__version__,
description='Fetch citation information, given a Digital Object Identifier',
url='https://github.com/jgilchrist/pybib',
author='Jonny Gilchrist',
packages=['pybib'],
install_requires... | <commit_before>from setuptools import setup
from pybib import __version__
setup(name='pybib',
version=__version__,
description='Fetch citation information, given a Digital Object Identifier',
url='https://github.com/jgilchrist/pybib',
author='Jonny Gilchrist',
packages=['pybib'],
i... |
d78916f43b289ff56d5a5d87f8db6fbf5f9d7436 | setup.py | setup.py | from setuptools import setup
setup(
name="img2txt",
version="2.0",
author="hit9",
author_email="[email protected]",
description="Image to Ascii Text, can output to html or ansi terminal.",
license="BSD",
url="http://hit9.org/img2txt",
install_requires=['docopt', 'Pillow'],
scripts=['i... | from setuptools import setup
setup(
name="img2txt.py",
version="2.0",
author="hit9",
author_email="[email protected]",
description="Image to Ascii Text, can output to html or ansi terminal.",
license="BSD",
url="http://hit9.org/img2txt",
install_requires=['docopt', 'Pillow'],
scripts=... | Rename package name to img2txt.py | Rename package name to img2txt.py
| Python | bsd-3-clause | hit9/img2txt,hit9/img2txt | from setuptools import setup
setup(
name="img2txt",
version="2.0",
author="hit9",
author_email="[email protected]",
description="Image to Ascii Text, can output to html or ansi terminal.",
license="BSD",
url="http://hit9.org/img2txt",
install_requires=['docopt', 'Pillow'],
scripts=['i... | from setuptools import setup
setup(
name="img2txt.py",
version="2.0",
author="hit9",
author_email="[email protected]",
description="Image to Ascii Text, can output to html or ansi terminal.",
license="BSD",
url="http://hit9.org/img2txt",
install_requires=['docopt', 'Pillow'],
scripts=... | <commit_before>from setuptools import setup
setup(
name="img2txt",
version="2.0",
author="hit9",
author_email="[email protected]",
description="Image to Ascii Text, can output to html or ansi terminal.",
license="BSD",
url="http://hit9.org/img2txt",
install_requires=['docopt', 'Pillow'],
... | from setuptools import setup
setup(
name="img2txt.py",
version="2.0",
author="hit9",
author_email="[email protected]",
description="Image to Ascii Text, can output to html or ansi terminal.",
license="BSD",
url="http://hit9.org/img2txt",
install_requires=['docopt', 'Pillow'],
scripts=... | from setuptools import setup
setup(
name="img2txt",
version="2.0",
author="hit9",
author_email="[email protected]",
description="Image to Ascii Text, can output to html or ansi terminal.",
license="BSD",
url="http://hit9.org/img2txt",
install_requires=['docopt', 'Pillow'],
scripts=['i... | <commit_before>from setuptools import setup
setup(
name="img2txt",
version="2.0",
author="hit9",
author_email="[email protected]",
description="Image to Ascii Text, can output to html or ansi terminal.",
license="BSD",
url="http://hit9.org/img2txt",
install_requires=['docopt', 'Pillow'],
... |
16a6783a5671b58836d7c81395ff09b68acf1cb1 | setup.py | setup.py | __author__ = 'yalnazov'
from setuptools import setup
setup(
name='paymill-wrapper',
version='2.0.0',
description='Python wrapper for PAYMILL API',
author='Aleksandar Yalnazov',
author_email='[email protected]',
url='https://github.com/paymill/paymill-python',
license='MIT',
... | __author__ = 'yalnazov'
from setuptools import setup
setup(
name='paymill-wrapper',
version='2.1.0',
description='Python wrapper for PAYMILL API',
author='Aleksandar Yalnazov',
author_email='[email protected]',
url='https://github.com/paymill/paymill-python',
license='MIT',
... | Fix distribution and bump version. | Fix distribution and bump version.
| Python | mit | lukasklein/paymill-python,paymill/paymill-python | __author__ = 'yalnazov'
from setuptools import setup
setup(
name='paymill-wrapper',
version='2.0.0',
description='Python wrapper for PAYMILL API',
author='Aleksandar Yalnazov',
author_email='[email protected]',
url='https://github.com/paymill/paymill-python',
license='MIT',
... | __author__ = 'yalnazov'
from setuptools import setup
setup(
name='paymill-wrapper',
version='2.1.0',
description='Python wrapper for PAYMILL API',
author='Aleksandar Yalnazov',
author_email='[email protected]',
url='https://github.com/paymill/paymill-python',
license='MIT',
... | <commit_before>__author__ = 'yalnazov'
from setuptools import setup
setup(
name='paymill-wrapper',
version='2.0.0',
description='Python wrapper for PAYMILL API',
author='Aleksandar Yalnazov',
author_email='[email protected]',
url='https://github.com/paymill/paymill-python',
lic... | __author__ = 'yalnazov'
from setuptools import setup
setup(
name='paymill-wrapper',
version='2.1.0',
description='Python wrapper for PAYMILL API',
author='Aleksandar Yalnazov',
author_email='[email protected]',
url='https://github.com/paymill/paymill-python',
license='MIT',
... | __author__ = 'yalnazov'
from setuptools import setup
setup(
name='paymill-wrapper',
version='2.0.0',
description='Python wrapper for PAYMILL API',
author='Aleksandar Yalnazov',
author_email='[email protected]',
url='https://github.com/paymill/paymill-python',
license='MIT',
... | <commit_before>__author__ = 'yalnazov'
from setuptools import setup
setup(
name='paymill-wrapper',
version='2.0.0',
description='Python wrapper for PAYMILL API',
author='Aleksandar Yalnazov',
author_email='[email protected]',
url='https://github.com/paymill/paymill-python',
lic... |
3a0c7caadb46a69fb29fe34bd64de28c9b263fd6 | restconverter.py | restconverter.py | # -*- coding: utf-8 -*-
"""
flaskjk.restconverter
~~~~~~~~~~~~~~~~~~~~~
Helper functions for converting RestructuredText
This class heavily depends on the functionality provided by the docutils
package.
:copyright: (c) 2010 by Jochem Kossen.
:license: BSD, see LICENSE for more details.
"... | # -*- coding: utf-8 -*-
"""
flaskjk.restconverter
~~~~~~~~~~~~~~~~~~~~~
Helper functions for converting RestructuredText
This class heavily depends on the functionality provided by the docutils
package.
See http://wiki.python.org/moin/ReStructuredText for more information
:copyright: (... | Add rest_to_html_fragment to be able to convert just the body part | Add rest_to_html_fragment to be able to convert just the body part
| Python | bsd-2-clause | jkossen/flaskjk | # -*- coding: utf-8 -*-
"""
flaskjk.restconverter
~~~~~~~~~~~~~~~~~~~~~
Helper functions for converting RestructuredText
This class heavily depends on the functionality provided by the docutils
package.
:copyright: (c) 2010 by Jochem Kossen.
:license: BSD, see LICENSE for more details.
"... | # -*- coding: utf-8 -*-
"""
flaskjk.restconverter
~~~~~~~~~~~~~~~~~~~~~
Helper functions for converting RestructuredText
This class heavily depends on the functionality provided by the docutils
package.
See http://wiki.python.org/moin/ReStructuredText for more information
:copyright: (... | <commit_before># -*- coding: utf-8 -*-
"""
flaskjk.restconverter
~~~~~~~~~~~~~~~~~~~~~
Helper functions for converting RestructuredText
This class heavily depends on the functionality provided by the docutils
package.
:copyright: (c) 2010 by Jochem Kossen.
:license: BSD, see LICENSE for ... | # -*- coding: utf-8 -*-
"""
flaskjk.restconverter
~~~~~~~~~~~~~~~~~~~~~
Helper functions for converting RestructuredText
This class heavily depends on the functionality provided by the docutils
package.
See http://wiki.python.org/moin/ReStructuredText for more information
:copyright: (... | # -*- coding: utf-8 -*-
"""
flaskjk.restconverter
~~~~~~~~~~~~~~~~~~~~~
Helper functions for converting RestructuredText
This class heavily depends on the functionality provided by the docutils
package.
:copyright: (c) 2010 by Jochem Kossen.
:license: BSD, see LICENSE for more details.
"... | <commit_before># -*- coding: utf-8 -*-
"""
flaskjk.restconverter
~~~~~~~~~~~~~~~~~~~~~
Helper functions for converting RestructuredText
This class heavily depends on the functionality provided by the docutils
package.
:copyright: (c) 2010 by Jochem Kossen.
:license: BSD, see LICENSE for ... |
fe79e799f2d3862e4764c69e76ed5a7d0a132002 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
import os
__doc__ = """
Command line tool and library wrappers around iwlist and
/etc/network/interfaces.
"""
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
install_requires = [
'setuptools',
'pbkdf2',
]
try:
im... | #!/usr/bin/env python
from setuptools import setup
import os
__doc__ = """
Command line tool and library wrappers around iwlist and
/etc/network/interfaces.
"""
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
install_requires = [
'setuptools',
'pbkdf2',
]
try:
im... | Check for write access for bashcompletion via os.access | Check for write access for bashcompletion via os.access
Alternative version of pull request rockymeza/wifi#41 (which apparently
isn't worked on any more) which checks for write access before
attempting to install the bashcompletion addition during
installation -- if only installed in a library into a virtualenv
the in... | Python | bsd-2-clause | rockymeza/wifi,cangelis/wifi,nicupavel/wifi,foosel/wifi,rockymeza/wifi,cangelis/wifi,foosel/wifi,simudream/wifi,nicupavel/wifi,simudream/wifi | #!/usr/bin/env python
from setuptools import setup
import os
__doc__ = """
Command line tool and library wrappers around iwlist and
/etc/network/interfaces.
"""
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
install_requires = [
'setuptools',
'pbkdf2',
]
try:
im... | #!/usr/bin/env python
from setuptools import setup
import os
__doc__ = """
Command line tool and library wrappers around iwlist and
/etc/network/interfaces.
"""
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
install_requires = [
'setuptools',
'pbkdf2',
]
try:
im... | <commit_before>#!/usr/bin/env python
from setuptools import setup
import os
__doc__ = """
Command line tool and library wrappers around iwlist and
/etc/network/interfaces.
"""
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
install_requires = [
'setuptools',
'pbkdf2'... | #!/usr/bin/env python
from setuptools import setup
import os
__doc__ = """
Command line tool and library wrappers around iwlist and
/etc/network/interfaces.
"""
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
install_requires = [
'setuptools',
'pbkdf2',
]
try:
im... | #!/usr/bin/env python
from setuptools import setup
import os
__doc__ = """
Command line tool and library wrappers around iwlist and
/etc/network/interfaces.
"""
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
install_requires = [
'setuptools',
'pbkdf2',
]
try:
im... | <commit_before>#!/usr/bin/env python
from setuptools import setup
import os
__doc__ = """
Command line tool and library wrappers around iwlist and
/etc/network/interfaces.
"""
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
install_requires = [
'setuptools',
'pbkdf2'... |
b0d54c11ea76c6485982e274e8226dfc6da25ceb | setup.py | setup.py | #!/usr/bin/env python
# coding: utf-8
from distribute_setup import use_setuptools
use_setuptools()
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
setup(name='mockito',
version='0.3.0',
... | #!/usr/bin/env python
# coding: utf-8
from distribute_setup import use_setuptools
use_setuptools()
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
setup(name='mockito',
version='0.3.0',
... | Change download and documentation URLs. | Change download and documentation URLs.
| Python | mit | zhilts/pymockito,zhilts/pymockito | #!/usr/bin/env python
# coding: utf-8
from distribute_setup import use_setuptools
use_setuptools()
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
setup(name='mockito',
version='0.3.0',
... | #!/usr/bin/env python
# coding: utf-8
from distribute_setup import use_setuptools
use_setuptools()
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
setup(name='mockito',
version='0.3.0',
... | <commit_before>#!/usr/bin/env python
# coding: utf-8
from distribute_setup import use_setuptools
use_setuptools()
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
setup(name='mockito',
versi... | #!/usr/bin/env python
# coding: utf-8
from distribute_setup import use_setuptools
use_setuptools()
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
setup(name='mockito',
version='0.3.0',
... | #!/usr/bin/env python
# coding: utf-8
from distribute_setup import use_setuptools
use_setuptools()
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
setup(name='mockito',
version='0.3.0',
... | <commit_before>#!/usr/bin/env python
# coding: utf-8
from distribute_setup import use_setuptools
use_setuptools()
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
setup(name='mockito',
versi... |
c64f9ebe17d9076958db502401567add4116b431 | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='flake8-coding',
version='0.1.0',
description='Adds coding magic comment checks to flake8',
long_description=open("README.rst").read(),
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Language :: Python... | # -*- coding: utf-8 -*-
from setuptools import setup
from flake8_coding import __version__
setup(
name='flake8-coding',
version=__version__,
description='Adds coding magic comment checks to flake8',
long_description=open("README.rst").read(),
classifiers=[
'Development Status :: 3 - Alpha... | Load package version from flake8_coding.py | Load package version from flake8_coding.py
| Python | apache-2.0 | tk0miya/flake8-coding | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='flake8-coding',
version='0.1.0',
description='Adds coding magic comment checks to flake8',
long_description=open("README.rst").read(),
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Language :: Python... | # -*- coding: utf-8 -*-
from setuptools import setup
from flake8_coding import __version__
setup(
name='flake8-coding',
version=__version__,
description='Adds coding magic comment checks to flake8',
long_description=open("README.rst").read(),
classifiers=[
'Development Status :: 3 - Alpha... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='flake8-coding',
version='0.1.0',
description='Adds coding magic comment checks to flake8',
long_description=open("README.rst").read(),
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Lan... | # -*- coding: utf-8 -*-
from setuptools import setup
from flake8_coding import __version__
setup(
name='flake8-coding',
version=__version__,
description='Adds coding magic comment checks to flake8',
long_description=open("README.rst").read(),
classifiers=[
'Development Status :: 3 - Alpha... | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='flake8-coding',
version='0.1.0',
description='Adds coding magic comment checks to flake8',
long_description=open("README.rst").read(),
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Language :: Python... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='flake8-coding',
version='0.1.0',
description='Adds coding magic comment checks to flake8',
long_description=open("README.rst").read(),
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Lan... |
17db9de51b816210728db7f58685b7d8e5545c65 | src/__init__.py | src/__init__.py | from pkg_resources import get_distribution
import codecs
import json
__version__ = get_distribution('rasa_nlu').version
class Interpreter(object):
def parse(self, text):
raise NotImplementedError()
@staticmethod
def load_synonyms(entity_synonyms):
if entity_synonyms:
with cod... | from pkg_resources import get_distribution
import codecs
import json
__version__ = get_distribution('rasa_nlu').version
class Interpreter(object):
def parse(self, text):
raise NotImplementedError()
@staticmethod
def load_synonyms(entity_synonyms):
if entity_synonyms:
with cod... | Fix entity dict access key | Fix entity dict access key
| Python | apache-2.0 | RasaHQ/rasa_nlu,beeva-fernandocerezal/rasa_nlu,beeva-fernandocerezal/rasa_nlu,verloop/rasa_nlu,PHLF/rasa_nlu,verloop/rasa_nlu,PHLF/rasa_nlu,RasaHQ/rasa_nlu,RasaHQ/rasa_nlu | from pkg_resources import get_distribution
import codecs
import json
__version__ = get_distribution('rasa_nlu').version
class Interpreter(object):
def parse(self, text):
raise NotImplementedError()
@staticmethod
def load_synonyms(entity_synonyms):
if entity_synonyms:
with cod... | from pkg_resources import get_distribution
import codecs
import json
__version__ = get_distribution('rasa_nlu').version
class Interpreter(object):
def parse(self, text):
raise NotImplementedError()
@staticmethod
def load_synonyms(entity_synonyms):
if entity_synonyms:
with cod... | <commit_before>from pkg_resources import get_distribution
import codecs
import json
__version__ = get_distribution('rasa_nlu').version
class Interpreter(object):
def parse(self, text):
raise NotImplementedError()
@staticmethod
def load_synonyms(entity_synonyms):
if entity_synonyms:
... | from pkg_resources import get_distribution
import codecs
import json
__version__ = get_distribution('rasa_nlu').version
class Interpreter(object):
def parse(self, text):
raise NotImplementedError()
@staticmethod
def load_synonyms(entity_synonyms):
if entity_synonyms:
with cod... | from pkg_resources import get_distribution
import codecs
import json
__version__ = get_distribution('rasa_nlu').version
class Interpreter(object):
def parse(self, text):
raise NotImplementedError()
@staticmethod
def load_synonyms(entity_synonyms):
if entity_synonyms:
with cod... | <commit_before>from pkg_resources import get_distribution
import codecs
import json
__version__ = get_distribution('rasa_nlu').version
class Interpreter(object):
def parse(self, text):
raise NotImplementedError()
@staticmethod
def load_synonyms(entity_synonyms):
if entity_synonyms:
... |
32508c310075d779e368d09f8642db6ba9029a44 | setup.py | setup.py | from distutils.core import setup
setup(
name = 'mustache',
packages = ['mustache'],
version = '0.1.3',
description = 'Mustache templating in Python',
author = 'Peter Downs',
author_email = '[email protected]',
url = 'https://github.com/peterldowns/python-mustache',
download_url = 'ht... | from distutils.core import setup
setup(
name = 'mustache',
packages = ['mustache'],
version = '0.1.3',
description = 'Mustache templating in Python',
author = 'Peter Downs',
author_email = '[email protected]',
url = 'https://github.com/peterldowns/python-mustache',
download_url = 'ht... | Fix typo breaking PyPI push. | Fix typo breaking PyPI push.
| Python | mit | peterldowns/python-mustache,peterldowns/python-mustache | from distutils.core import setup
setup(
name = 'mustache',
packages = ['mustache'],
version = '0.1.3',
description = 'Mustache templating in Python',
author = 'Peter Downs',
author_email = '[email protected]',
url = 'https://github.com/peterldowns/python-mustache',
download_url = 'ht... | from distutils.core import setup
setup(
name = 'mustache',
packages = ['mustache'],
version = '0.1.3',
description = 'Mustache templating in Python',
author = 'Peter Downs',
author_email = '[email protected]',
url = 'https://github.com/peterldowns/python-mustache',
download_url = 'ht... | <commit_before>from distutils.core import setup
setup(
name = 'mustache',
packages = ['mustache'],
version = '0.1.3',
description = 'Mustache templating in Python',
author = 'Peter Downs',
author_email = '[email protected]',
url = 'https://github.com/peterldowns/python-mustache',
dow... | from distutils.core import setup
setup(
name = 'mustache',
packages = ['mustache'],
version = '0.1.3',
description = 'Mustache templating in Python',
author = 'Peter Downs',
author_email = '[email protected]',
url = 'https://github.com/peterldowns/python-mustache',
download_url = 'ht... | from distutils.core import setup
setup(
name = 'mustache',
packages = ['mustache'],
version = '0.1.3',
description = 'Mustache templating in Python',
author = 'Peter Downs',
author_email = '[email protected]',
url = 'https://github.com/peterldowns/python-mustache',
download_url = 'ht... | <commit_before>from distutils.core import setup
setup(
name = 'mustache',
packages = ['mustache'],
version = '0.1.3',
description = 'Mustache templating in Python',
author = 'Peter Downs',
author_email = '[email protected]',
url = 'https://github.com/peterldowns/python-mustache',
dow... |
de7f7dd544f41ccb38d4e132fe0c994728ec8efe | setup.py | setup.py | """setup.py"""
#pylint:disable=line-too-long
from codecs import open as codecs_open
try:
from setuptools import setup
except ImportError:
from distutils.core import setup #pylint:disable=import-error,no-name-in-module
with codecs_open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
with codecs_open(... | """setup.py"""
#pylint:disable=line-too-long
from codecs import open as codecs_open
try:
from setuptools import setup
except ImportError:
from distutils.core import setup #pylint:disable=import-error,no-name-in-module
with codecs_open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
with codecs_open(... | Remove requests and pyzmq from package dependencies | Remove requests and pyzmq from package dependencies
These will now have to be installed separately by the user depending on the
transport protocol required.
| Python | mit | bcb/jsonrpcclient | """setup.py"""
#pylint:disable=line-too-long
from codecs import open as codecs_open
try:
from setuptools import setup
except ImportError:
from distutils.core import setup #pylint:disable=import-error,no-name-in-module
with codecs_open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
with codecs_open(... | """setup.py"""
#pylint:disable=line-too-long
from codecs import open as codecs_open
try:
from setuptools import setup
except ImportError:
from distutils.core import setup #pylint:disable=import-error,no-name-in-module
with codecs_open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
with codecs_open(... | <commit_before>"""setup.py"""
#pylint:disable=line-too-long
from codecs import open as codecs_open
try:
from setuptools import setup
except ImportError:
from distutils.core import setup #pylint:disable=import-error,no-name-in-module
with codecs_open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
wi... | """setup.py"""
#pylint:disable=line-too-long
from codecs import open as codecs_open
try:
from setuptools import setup
except ImportError:
from distutils.core import setup #pylint:disable=import-error,no-name-in-module
with codecs_open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
with codecs_open(... | """setup.py"""
#pylint:disable=line-too-long
from codecs import open as codecs_open
try:
from setuptools import setup
except ImportError:
from distutils.core import setup #pylint:disable=import-error,no-name-in-module
with codecs_open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
with codecs_open(... | <commit_before>"""setup.py"""
#pylint:disable=line-too-long
from codecs import open as codecs_open
try:
from setuptools import setup
except ImportError:
from distutils.core import setup #pylint:disable=import-error,no-name-in-module
with codecs_open('README.rst', 'r', 'utf-8') as f:
readme = f.read()
wi... |
4cae30c31369ee840dd79fb30fa3023711415012 | setup.py | setup.py | import backdropsend
from setuptools import setup, find_packages
setup(
name='backdropsend',
version=backdropsend.__VERSION__,
packages=find_packages(exclude=['test*']),
scripts=['backdrop-send'],
# metadata for upload to PyPI
author=backdropsend.__AUTHOR__,
author_email=backdropsend.__AUTH... | import backdropsend
from setuptools import setup, find_packages
setup(
name='backdropsend',
version=backdropsend.__VERSION__,
packages=find_packages(exclude=['test*']),
scripts=['backdrop-send'],
# metadata for upload to PyPI
author=backdropsend.__AUTHOR__,
author_email=backdropsend.__AUTH... | Install man pages to /usr/local/share for permissions | Install man pages to /usr/local/share for permissions
@YolinaS
@gtrogers
| Python | mit | alphagov/backdropsend,alphagov/backdropsend | import backdropsend
from setuptools import setup, find_packages
setup(
name='backdropsend',
version=backdropsend.__VERSION__,
packages=find_packages(exclude=['test*']),
scripts=['backdrop-send'],
# metadata for upload to PyPI
author=backdropsend.__AUTHOR__,
author_email=backdropsend.__AUTH... | import backdropsend
from setuptools import setup, find_packages
setup(
name='backdropsend',
version=backdropsend.__VERSION__,
packages=find_packages(exclude=['test*']),
scripts=['backdrop-send'],
# metadata for upload to PyPI
author=backdropsend.__AUTHOR__,
author_email=backdropsend.__AUTH... | <commit_before>import backdropsend
from setuptools import setup, find_packages
setup(
name='backdropsend',
version=backdropsend.__VERSION__,
packages=find_packages(exclude=['test*']),
scripts=['backdrop-send'],
# metadata for upload to PyPI
author=backdropsend.__AUTHOR__,
author_email=back... | import backdropsend
from setuptools import setup, find_packages
setup(
name='backdropsend',
version=backdropsend.__VERSION__,
packages=find_packages(exclude=['test*']),
scripts=['backdrop-send'],
# metadata for upload to PyPI
author=backdropsend.__AUTHOR__,
author_email=backdropsend.__AUTH... | import backdropsend
from setuptools import setup, find_packages
setup(
name='backdropsend',
version=backdropsend.__VERSION__,
packages=find_packages(exclude=['test*']),
scripts=['backdrop-send'],
# metadata for upload to PyPI
author=backdropsend.__AUTHOR__,
author_email=backdropsend.__AUTH... | <commit_before>import backdropsend
from setuptools import setup, find_packages
setup(
name='backdropsend',
version=backdropsend.__VERSION__,
packages=find_packages(exclude=['test*']),
scripts=['backdrop-send'],
# metadata for upload to PyPI
author=backdropsend.__AUTHOR__,
author_email=back... |
2a950c91416d3b92a91f4f245a37a95b418b4bab | custom/uth/tasks.py | custom/uth/tasks.py | from custom.uth.utils import create_case, match_case, attach_images_to_case, submit_error_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
import io
def get_files_from_doc(doc):
files = {}
for f in doc._attachments.keys():
files[f] = io.BytesIO(doc.fetch_atta... | from custom.uth.utils import create_case, match_case, attach_images_to_case, submit_error_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
import io
def get_files_from_doc(doc):
files = {}
for f in doc._attachments.keys():
files[f] = io.BytesIO(doc.fetch_atta... | Delete docs on task completion | Delete docs on task completion
| Python | bsd-3-clause | puttarajubr/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,SEL... | from custom.uth.utils import create_case, match_case, attach_images_to_case, submit_error_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
import io
def get_files_from_doc(doc):
files = {}
for f in doc._attachments.keys():
files[f] = io.BytesIO(doc.fetch_atta... | from custom.uth.utils import create_case, match_case, attach_images_to_case, submit_error_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
import io
def get_files_from_doc(doc):
files = {}
for f in doc._attachments.keys():
files[f] = io.BytesIO(doc.fetch_atta... | <commit_before>from custom.uth.utils import create_case, match_case, attach_images_to_case, submit_error_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
import io
def get_files_from_doc(doc):
files = {}
for f in doc._attachments.keys():
files[f] = io.BytesIO... | from custom.uth.utils import create_case, match_case, attach_images_to_case, submit_error_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
import io
def get_files_from_doc(doc):
files = {}
for f in doc._attachments.keys():
files[f] = io.BytesIO(doc.fetch_atta... | from custom.uth.utils import create_case, match_case, attach_images_to_case, submit_error_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
import io
def get_files_from_doc(doc):
files = {}
for f in doc._attachments.keys():
files[f] = io.BytesIO(doc.fetch_atta... | <commit_before>from custom.uth.utils import create_case, match_case, attach_images_to_case, submit_error_case
from custom.uth.models import SonositeUpload, VscanUpload
from celery.task import task
import io
def get_files_from_doc(doc):
files = {}
for f in doc._attachments.keys():
files[f] = io.BytesIO... |
5bb84d5eac353cd4bbe1843fccaca64161830591 | savu/__init__.py | savu/__init__.py | # Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... | # Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... | Update to make import of savu a little more useful | Update to make import of savu a little more useful | Python | apache-2.0 | mjn19172/Savu,swtp1v07/Savu,swtp1v07/Savu,swtp1v07/Savu,mjn19172/Savu,swtp1v07/Savu,mjn19172/Savu,mjn19172/Savu,mjn19172/Savu | # Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... | # Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... | <commit_before># Copyright 2014 Diamond Light Source Ltd.
#
# 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 2014 Diamond Light Source Ltd.
#
# 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 t... | # Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... | <commit_before># Copyright 2014 Diamond Light Source Ltd.
#
# 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 ... |
95ba22a3f8e4a8084fd19071a713be550158a569 | setup.py | setup.py | from setuptools import setup, find_packages
import sys
import versioneer
project_name = 'menpo3d'
# Versioneer allows us to automatically generate versioning from
# our git tagging system which makes releases simpler.
versioneer.VCS = 'git'
versioneer.versionfile_source = '{}/_version.py'.format(project_name)
version... | from setuptools import setup, find_packages
import sys
import versioneer
project_name = 'menpo3d'
# Versioneer allows us to automatically generate versioning from
# our git tagging system which makes releases simpler.
versioneer.VCS = 'git'
versioneer.versionfile_source = '{}/_version.py'.format(project_name)
version... | Include data folder and specific test dependencies | Include data folder and specific test dependencies
| Python | bsd-3-clause | grigorisg9gr/menpo3d,nontas/menpo3d,nontas/menpo3d,grigorisg9gr/menpo3d | from setuptools import setup, find_packages
import sys
import versioneer
project_name = 'menpo3d'
# Versioneer allows us to automatically generate versioning from
# our git tagging system which makes releases simpler.
versioneer.VCS = 'git'
versioneer.versionfile_source = '{}/_version.py'.format(project_name)
version... | from setuptools import setup, find_packages
import sys
import versioneer
project_name = 'menpo3d'
# Versioneer allows us to automatically generate versioning from
# our git tagging system which makes releases simpler.
versioneer.VCS = 'git'
versioneer.versionfile_source = '{}/_version.py'.format(project_name)
version... | <commit_before>from setuptools import setup, find_packages
import sys
import versioneer
project_name = 'menpo3d'
# Versioneer allows us to automatically generate versioning from
# our git tagging system which makes releases simpler.
versioneer.VCS = 'git'
versioneer.versionfile_source = '{}/_version.py'.format(projec... | from setuptools import setup, find_packages
import sys
import versioneer
project_name = 'menpo3d'
# Versioneer allows us to automatically generate versioning from
# our git tagging system which makes releases simpler.
versioneer.VCS = 'git'
versioneer.versionfile_source = '{}/_version.py'.format(project_name)
version... | from setuptools import setup, find_packages
import sys
import versioneer
project_name = 'menpo3d'
# Versioneer allows us to automatically generate versioning from
# our git tagging system which makes releases simpler.
versioneer.VCS = 'git'
versioneer.versionfile_source = '{}/_version.py'.format(project_name)
version... | <commit_before>from setuptools import setup, find_packages
import sys
import versioneer
project_name = 'menpo3d'
# Versioneer allows us to automatically generate versioning from
# our git tagging system which makes releases simpler.
versioneer.VCS = 'git'
versioneer.versionfile_source = '{}/_version.py'.format(projec... |
4531017c7c9e96a7a1108f39a906ddcac25ebd59 | setup.py | setup.py | import os
from setuptools import setup
from setuptools import find_packages
here = os.path.abspath(os.path.dirname(__file__))
try:
with open(os.path.join(here, 'README.rst')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.rst')) as f:
CHANGES = f.read()
except:
README = ''
... | import io
from setuptools import setup, find_packages
long_description = '\n'.join((
io.open('README.rst', encoding='utf-8').read(),
io.open('CHANGES.txt', encoding='utf-8').read()
))
setup(
name='importscan',
version='0.2.dev0',
description='Recursively import modules and sub-packages',
long_... | Use io.open with encoding='utf-8' and flake8 compliance | Use io.open with encoding='utf-8' and flake8 compliance
| Python | bsd-3-clause | faassen/importscan | import os
from setuptools import setup
from setuptools import find_packages
here = os.path.abspath(os.path.dirname(__file__))
try:
with open(os.path.join(here, 'README.rst')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.rst')) as f:
CHANGES = f.read()
except:
README = ''
... | import io
from setuptools import setup, find_packages
long_description = '\n'.join((
io.open('README.rst', encoding='utf-8').read(),
io.open('CHANGES.txt', encoding='utf-8').read()
))
setup(
name='importscan',
version='0.2.dev0',
description='Recursively import modules and sub-packages',
long_... | <commit_before>import os
from setuptools import setup
from setuptools import find_packages
here = os.path.abspath(os.path.dirname(__file__))
try:
with open(os.path.join(here, 'README.rst')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.rst')) as f:
CHANGES = f.read()
except:
... | import io
from setuptools import setup, find_packages
long_description = '\n'.join((
io.open('README.rst', encoding='utf-8').read(),
io.open('CHANGES.txt', encoding='utf-8').read()
))
setup(
name='importscan',
version='0.2.dev0',
description='Recursively import modules and sub-packages',
long_... | import os
from setuptools import setup
from setuptools import find_packages
here = os.path.abspath(os.path.dirname(__file__))
try:
with open(os.path.join(here, 'README.rst')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.rst')) as f:
CHANGES = f.read()
except:
README = ''
... | <commit_before>import os
from setuptools import setup
from setuptools import find_packages
here = os.path.abspath(os.path.dirname(__file__))
try:
with open(os.path.join(here, 'README.rst')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.rst')) as f:
CHANGES = f.read()
except:
... |
ed400cd2ad3a98af3ea02e41e54758c5d42e72d4 | setup.py | setup.py | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'pyramid_debugtoolbar',
'waitress',
]
test_requires = require... | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'pyramid_debugtoolbar',
'waitress',
]
test_requires = require... | Add coverage to test dependancies | Add coverage to test dependancies
| Python | agpl-3.0 | makinacorpus/convertit,makinacorpus/convertit | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'pyramid_debugtoolbar',
'waitress',
]
test_requires = require... | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'pyramid_debugtoolbar',
'waitress',
]
test_requires = require... | <commit_before>import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'pyramid_debugtoolbar',
'waitress',
]
test_req... | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'pyramid_debugtoolbar',
'waitress',
]
test_requires = require... | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'pyramid_debugtoolbar',
'waitress',
]
test_requires = require... | <commit_before>import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
requires = [
'pyramid',
'pyramid_debugtoolbar',
'waitress',
]
test_req... |
6e71b0de777bf516d376397961ec232ec39ea195 | setup.py | setup.py | from setuptools import setup
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
setup(name='centerline',
version='0.1',
descriptio... | from setuptools import setup
try:
from pypandoc import convert
def read_md():
return lambda f: convert(f, 'rst')
except ImportError:
print(
"warning: pypandoc module not found, could not convert Markdown to RST"
)
def read_md():
return lambda f: open(f, 'r').read()
setup... | Define a MD->RST conversion function | Define a MD->RST conversion function
| Python | mit | fitodic/centerline,fitodic/polygon-centerline,fitodic/centerline | from setuptools import setup
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
setup(name='centerline',
version='0.1',
descriptio... | from setuptools import setup
try:
from pypandoc import convert
def read_md():
return lambda f: convert(f, 'rst')
except ImportError:
print(
"warning: pypandoc module not found, could not convert Markdown to RST"
)
def read_md():
return lambda f: open(f, 'r').read()
setup... | <commit_before>from setuptools import setup
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
setup(name='centerline',
version='0.1',
... | from setuptools import setup
try:
from pypandoc import convert
def read_md():
return lambda f: convert(f, 'rst')
except ImportError:
print(
"warning: pypandoc module not found, could not convert Markdown to RST"
)
def read_md():
return lambda f: open(f, 'r').read()
setup... | from setuptools import setup
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
setup(name='centerline',
version='0.1',
descriptio... | <commit_before>from setuptools import setup
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
setup(name='centerline',
version='0.1',
... |
7cd2249d231e8afc1384bc3757856e8fdbb234bf | setup.py | setup.py | from setuptools import setup
from subprocess import check_output, CalledProcessError
try:
num_gpus = len(check_output(['nvidia-smi', '--query-gpu=gpu_name',
'--format=csv']).decode().strip().split('\n'))
tf = 'tensorflow-gpu' if num_gpus > 1 else 'tensorflow'
except CalledProce... | from setuptools import setup
from subprocess import check_output, CalledProcessError
try:
num_gpus = len(check_output(['nvidia-smi', '--query-gpu=gpu_name',
'--format=csv']).decode().strip().split('\n'))
tf = 'tensorflow-gpu' if num_gpus > 1 else 'tensorflow'
except CalledProce... | Make dependency check more stringent | Make dependency check more stringent
| Python | apache-2.0 | theislab/dca,theislab/dca,theislab/dca | from setuptools import setup
from subprocess import check_output, CalledProcessError
try:
num_gpus = len(check_output(['nvidia-smi', '--query-gpu=gpu_name',
'--format=csv']).decode().strip().split('\n'))
tf = 'tensorflow-gpu' if num_gpus > 1 else 'tensorflow'
except CalledProce... | from setuptools import setup
from subprocess import check_output, CalledProcessError
try:
num_gpus = len(check_output(['nvidia-smi', '--query-gpu=gpu_name',
'--format=csv']).decode().strip().split('\n'))
tf = 'tensorflow-gpu' if num_gpus > 1 else 'tensorflow'
except CalledProce... | <commit_before>from setuptools import setup
from subprocess import check_output, CalledProcessError
try:
num_gpus = len(check_output(['nvidia-smi', '--query-gpu=gpu_name',
'--format=csv']).decode().strip().split('\n'))
tf = 'tensorflow-gpu' if num_gpus > 1 else 'tensorflow'
exc... | from setuptools import setup
from subprocess import check_output, CalledProcessError
try:
num_gpus = len(check_output(['nvidia-smi', '--query-gpu=gpu_name',
'--format=csv']).decode().strip().split('\n'))
tf = 'tensorflow-gpu' if num_gpus > 1 else 'tensorflow'
except CalledProce... | from setuptools import setup
from subprocess import check_output, CalledProcessError
try:
num_gpus = len(check_output(['nvidia-smi', '--query-gpu=gpu_name',
'--format=csv']).decode().strip().split('\n'))
tf = 'tensorflow-gpu' if num_gpus > 1 else 'tensorflow'
except CalledProce... | <commit_before>from setuptools import setup
from subprocess import check_output, CalledProcessError
try:
num_gpus = len(check_output(['nvidia-smi', '--query-gpu=gpu_name',
'--format=csv']).decode().strip().split('\n'))
tf = 'tensorflow-gpu' if num_gpus > 1 else 'tensorflow'
exc... |
43ae9bdec900081d6ff91fc3847a4d8d9a42eaeb | contrib/plugins/w3cdate.py | contrib/plugins/w3cdate.py | """
Add a 'w3cdate' key to every entry -- this contains the date in ISO8601 format
WARNING: you must have PyXML installed as part of your python installation
in order for this plugin to work
Place this plugin early in your load_plugins list, so that the w3cdate will
be available to subsequent plugins
"""
__author__ ... | """
Add a 'w3cdate' key to every entry -- this contains the date in ISO8601 format
WARNING: you must have PyXML installed as part of your python installation
in order for this plugin to work
Place this plugin early in your load_plugins list, so that the w3cdate will
be available to subsequent plugins
"""
__author__ ... | Fix daylight savings time bug | Fix daylight savings time bug
| Python | mit | daitangio/pyblosxom,daitangio/pyblosxom,willkg/douglas,willkg/douglas | """
Add a 'w3cdate' key to every entry -- this contains the date in ISO8601 format
WARNING: you must have PyXML installed as part of your python installation
in order for this plugin to work
Place this plugin early in your load_plugins list, so that the w3cdate will
be available to subsequent plugins
"""
__author__ ... | """
Add a 'w3cdate' key to every entry -- this contains the date in ISO8601 format
WARNING: you must have PyXML installed as part of your python installation
in order for this plugin to work
Place this plugin early in your load_plugins list, so that the w3cdate will
be available to subsequent plugins
"""
__author__ ... | <commit_before>"""
Add a 'w3cdate' key to every entry -- this contains the date in ISO8601 format
WARNING: you must have PyXML installed as part of your python installation
in order for this plugin to work
Place this plugin early in your load_plugins list, so that the w3cdate will
be available to subsequent plugins
... | """
Add a 'w3cdate' key to every entry -- this contains the date in ISO8601 format
WARNING: you must have PyXML installed as part of your python installation
in order for this plugin to work
Place this plugin early in your load_plugins list, so that the w3cdate will
be available to subsequent plugins
"""
__author__ ... | """
Add a 'w3cdate' key to every entry -- this contains the date in ISO8601 format
WARNING: you must have PyXML installed as part of your python installation
in order for this plugin to work
Place this plugin early in your load_plugins list, so that the w3cdate will
be available to subsequent plugins
"""
__author__ ... | <commit_before>"""
Add a 'w3cdate' key to every entry -- this contains the date in ISO8601 format
WARNING: you must have PyXML installed as part of your python installation
in order for this plugin to work
Place this plugin early in your load_plugins list, so that the w3cdate will
be available to subsequent plugins
... |
e0a6ea3d48691bedfb39a0a92d569ea4aaf61810 | pavement.py | pavement.py | import paver.doctools
import paver.setuputils
from schevo.release import setup_meta
options(
setup=setup_meta,
sphinx=Bunch(
docroot='doc',
builddir='build',
sourcedir='source',
),
)
@task
@needs('paver.doctools.html')
def openhtml():
index_file = path('doc/build/html/index.... | from schevo.release import setup_meta
options(
setup=setup_meta,
sphinx=Bunch(
docroot='doc',
builddir='build',
sourcedir='source',
),
)
try:
import paver.doctools
except ImportError:
pass
else:
@task
@needs('paver.doctools.html')
def openhtml():
index... | Make paver.doctools optional, to allow for downloading of ==dev eggs | Make paver.doctools optional, to allow for downloading of ==dev eggs
Signed-off-by: Matthew R. Scott <[email protected]>
| Python | mit | Schevo/schevo,Schevo/schevo | import paver.doctools
import paver.setuputils
from schevo.release import setup_meta
options(
setup=setup_meta,
sphinx=Bunch(
docroot='doc',
builddir='build',
sourcedir='source',
),
)
@task
@needs('paver.doctools.html')
def openhtml():
index_file = path('doc/build/html/index.... | from schevo.release import setup_meta
options(
setup=setup_meta,
sphinx=Bunch(
docroot='doc',
builddir='build',
sourcedir='source',
),
)
try:
import paver.doctools
except ImportError:
pass
else:
@task
@needs('paver.doctools.html')
def openhtml():
index... | <commit_before>import paver.doctools
import paver.setuputils
from schevo.release import setup_meta
options(
setup=setup_meta,
sphinx=Bunch(
docroot='doc',
builddir='build',
sourcedir='source',
),
)
@task
@needs('paver.doctools.html')
def openhtml():
index_file = path('doc/bu... | from schevo.release import setup_meta
options(
setup=setup_meta,
sphinx=Bunch(
docroot='doc',
builddir='build',
sourcedir='source',
),
)
try:
import paver.doctools
except ImportError:
pass
else:
@task
@needs('paver.doctools.html')
def openhtml():
index... | import paver.doctools
import paver.setuputils
from schevo.release import setup_meta
options(
setup=setup_meta,
sphinx=Bunch(
docroot='doc',
builddir='build',
sourcedir='source',
),
)
@task
@needs('paver.doctools.html')
def openhtml():
index_file = path('doc/build/html/index.... | <commit_before>import paver.doctools
import paver.setuputils
from schevo.release import setup_meta
options(
setup=setup_meta,
sphinx=Bunch(
docroot='doc',
builddir='build',
sourcedir='source',
),
)
@task
@needs('paver.doctools.html')
def openhtml():
index_file = path('doc/bu... |
910d848f9c7ceb9133fe52c0c3f2df6c8ed4e4aa | phi/flow.py | phi/flow.py | # pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.flow`.
"""
# Mod... | # pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.flow`.
"""
# Mod... | Add Tensor to standard imports | [Φ] Add Tensor to standard imports
| Python | mit | tum-pbs/PhiFlow,tum-pbs/PhiFlow | # pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.flow`.
"""
# Mod... | # pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.flow`.
"""
# Mod... | <commit_before># pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.fl... | # pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.flow`.
"""
# Mod... | # pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.flow`.
"""
# Mod... | <commit_before># pylint: disable-msg = unused-import
"""
*Main PhiFlow import:* `from phi.flow import *`
Imports important functions and classes from
`math`, `geom`, `field`, `physics` and `vis` (including sub-modules)
as well as the modules and sub-modules themselves.
See `phi.tf.flow`, `phi.torch.flow`, `phi.jax.fl... |
f408d7e61753ecdeb280e59ecb35485385ec3f6a | Tools/compiler/compile.py | Tools/compiler/compile.py | import sys
import getopt
from compiler import compile, visitor
##import profile
def main():
VERBOSE = 0
DISPLAY = 0
CONTINUE = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqdc')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE = visitor.ASTVis... | import sys
import getopt
from compiler import compile, visitor
import profile
def main():
VERBOSE = 0
DISPLAY = 0
PROFILE = 0
CONTINUE = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqdcp')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE =... | Add -p option to invoke Python profiler | Add -p option to invoke Python profiler
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | import sys
import getopt
from compiler import compile, visitor
##import profile
def main():
VERBOSE = 0
DISPLAY = 0
CONTINUE = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqdc')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE = visitor.ASTVis... | import sys
import getopt
from compiler import compile, visitor
import profile
def main():
VERBOSE = 0
DISPLAY = 0
PROFILE = 0
CONTINUE = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqdcp')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE =... | <commit_before>import sys
import getopt
from compiler import compile, visitor
##import profile
def main():
VERBOSE = 0
DISPLAY = 0
CONTINUE = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqdc')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE =... | import sys
import getopt
from compiler import compile, visitor
import profile
def main():
VERBOSE = 0
DISPLAY = 0
PROFILE = 0
CONTINUE = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqdcp')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE =... | import sys
import getopt
from compiler import compile, visitor
##import profile
def main():
VERBOSE = 0
DISPLAY = 0
CONTINUE = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqdc')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE = visitor.ASTVis... | <commit_before>import sys
import getopt
from compiler import compile, visitor
##import profile
def main():
VERBOSE = 0
DISPLAY = 0
CONTINUE = 0
opts, args = getopt.getopt(sys.argv[1:], 'vqdc')
for k, v in opts:
if k == '-v':
VERBOSE = 1
visitor.ASTVisitor.VERBOSE =... |
a67176ba0ba06d1a7cfff5d8e21446bb78a30518 | subscription/api.py | subscription/api.py | from tastypie import fields
from tastypie.resources import ModelResource, ALL
from tastypie.authentication import ApiKeyAuthentication
from tastypie.authorization import Authorization
from subscription.models import Subscription, MessageSet
from djcelery.models import PeriodicTask
class PeriodicTaskResource(ModelResou... | from tastypie import fields
from tastypie.resources import ModelResource, ALL
from tastypie.authentication import ApiKeyAuthentication
from tastypie.authorization import Authorization
from subscription.models import Subscription, MessageSet
from djcelery.models import PeriodicTask
class PeriodicTaskResource(ModelResou... | Update tastypie methods allowed for subscriptions | Update tastypie methods allowed for subscriptions
| Python | bsd-3-clause | praekelt/ndoh-control,praekelt/ndoh-control,praekelt/ndoh-control,praekelt/ndoh-control | from tastypie import fields
from tastypie.resources import ModelResource, ALL
from tastypie.authentication import ApiKeyAuthentication
from tastypie.authorization import Authorization
from subscription.models import Subscription, MessageSet
from djcelery.models import PeriodicTask
class PeriodicTaskResource(ModelResou... | from tastypie import fields
from tastypie.resources import ModelResource, ALL
from tastypie.authentication import ApiKeyAuthentication
from tastypie.authorization import Authorization
from subscription.models import Subscription, MessageSet
from djcelery.models import PeriodicTask
class PeriodicTaskResource(ModelResou... | <commit_before>from tastypie import fields
from tastypie.resources import ModelResource, ALL
from tastypie.authentication import ApiKeyAuthentication
from tastypie.authorization import Authorization
from subscription.models import Subscription, MessageSet
from djcelery.models import PeriodicTask
class PeriodicTaskReso... | from tastypie import fields
from tastypie.resources import ModelResource, ALL
from tastypie.authentication import ApiKeyAuthentication
from tastypie.authorization import Authorization
from subscription.models import Subscription, MessageSet
from djcelery.models import PeriodicTask
class PeriodicTaskResource(ModelResou... | from tastypie import fields
from tastypie.resources import ModelResource, ALL
from tastypie.authentication import ApiKeyAuthentication
from tastypie.authorization import Authorization
from subscription.models import Subscription, MessageSet
from djcelery.models import PeriodicTask
class PeriodicTaskResource(ModelResou... | <commit_before>from tastypie import fields
from tastypie.resources import ModelResource, ALL
from tastypie.authentication import ApiKeyAuthentication
from tastypie.authorization import Authorization
from subscription.models import Subscription, MessageSet
from djcelery.models import PeriodicTask
class PeriodicTaskReso... |
dfb6d41be3acf5fc4d4d0f3d8a7fb9d3507e9ae7 | labware/microplates.py | labware/microplates.py | from .grid import GridContainer, GridItem
from .liquids import LiquidWell
class Microplate(GridContainer):
rows = 12
cols = 8
volume = 100
min_vol = 50
max_vol = 90
height = 14.45
length = 127.76
width = 85.47
diameter = 7.15
depth = 3.25
a1... | from .grid import GridContainer, GridItem
from .liquids import LiquidWell
class Microplate(GridContainer):
rows = 12
cols = 8
volume = 100
min_vol = 50
max_vol = 90
height = 14.45
length = 127.76
width = 85.47
diameter = 7.15
depth = 3.25
a1... | Revert of af99d4483acb36eda65b; Microplate subsets are special and important. | Revert of af99d4483acb36eda65b; Microplate subsets are special and important.
| Python | apache-2.0 | OpenTrons/opentrons-api,OpenTrons/opentrons-api,Opentrons/labware,OpenTrons/opentrons-api,OpenTrons/opentrons-api,OpenTrons/opentrons_sdk,OpenTrons/opentrons-api | from .grid import GridContainer, GridItem
from .liquids import LiquidWell
class Microplate(GridContainer):
rows = 12
cols = 8
volume = 100
min_vol = 50
max_vol = 90
height = 14.45
length = 127.76
width = 85.47
diameter = 7.15
depth = 3.25
a1... | from .grid import GridContainer, GridItem
from .liquids import LiquidWell
class Microplate(GridContainer):
rows = 12
cols = 8
volume = 100
min_vol = 50
max_vol = 90
height = 14.45
length = 127.76
width = 85.47
diameter = 7.15
depth = 3.25
a1... | <commit_before>from .grid import GridContainer, GridItem
from .liquids import LiquidWell
class Microplate(GridContainer):
rows = 12
cols = 8
volume = 100
min_vol = 50
max_vol = 90
height = 14.45
length = 127.76
width = 85.47
diameter = 7.15
depth ... | from .grid import GridContainer, GridItem
from .liquids import LiquidWell
class Microplate(GridContainer):
rows = 12
cols = 8
volume = 100
min_vol = 50
max_vol = 90
height = 14.45
length = 127.76
width = 85.47
diameter = 7.15
depth = 3.25
a1... | from .grid import GridContainer, GridItem
from .liquids import LiquidWell
class Microplate(GridContainer):
rows = 12
cols = 8
volume = 100
min_vol = 50
max_vol = 90
height = 14.45
length = 127.76
width = 85.47
diameter = 7.15
depth = 3.25
a1... | <commit_before>from .grid import GridContainer, GridItem
from .liquids import LiquidWell
class Microplate(GridContainer):
rows = 12
cols = 8
volume = 100
min_vol = 50
max_vol = 90
height = 14.45
length = 127.76
width = 85.47
diameter = 7.15
depth ... |
abd4859f8bac46fd6d114352ffad4ee9af28aa5f | common/lib/xmodule/xmodule/tests/test_mongo_utils.py | common/lib/xmodule/xmodule/tests/test_mongo_utils.py | """Tests for methods defined in mongo_utils.py"""
import os
from unittest import TestCase
from uuid import uuid4
from pymongo import ReadPreference
from django.conf import settings
from xmodule.mongo_utils import connect_to_mongodb
class MongoUtilsTests(TestCase):
"""
Tests for methods exposed in mongo_uti... | """
Tests for methods defined in mongo_utils.py
"""
import ddt
import os
from unittest import TestCase
from uuid import uuid4
from pymongo import ReadPreference
from django.conf import settings
from xmodule.mongo_utils import connect_to_mongodb
@ddt.ddt
class MongoUtilsTests(TestCase):
"""
Tests for method... | Convert test to DDT and test for primary, nearest modes. | Convert test to DDT and test for primary, nearest modes.
| Python | agpl-3.0 | teltek/edx-platform,arbrandes/edx-platform,kmoocdev2/edx-platform,CredoReference/edx-platform,Stanford-Online/edx-platform,eduNEXT/edx-platform,EDUlib/edx-platform,appsembler/edx-platform,ahmedaljazzar/edx-platform,appsembler/edx-platform,gsehub/edx-platform,gymnasium/edx-platform,jolyonb/edx-platform,a-parhom/edx-plat... | """Tests for methods defined in mongo_utils.py"""
import os
from unittest import TestCase
from uuid import uuid4
from pymongo import ReadPreference
from django.conf import settings
from xmodule.mongo_utils import connect_to_mongodb
class MongoUtilsTests(TestCase):
"""
Tests for methods exposed in mongo_uti... | """
Tests for methods defined in mongo_utils.py
"""
import ddt
import os
from unittest import TestCase
from uuid import uuid4
from pymongo import ReadPreference
from django.conf import settings
from xmodule.mongo_utils import connect_to_mongodb
@ddt.ddt
class MongoUtilsTests(TestCase):
"""
Tests for method... | <commit_before>"""Tests for methods defined in mongo_utils.py"""
import os
from unittest import TestCase
from uuid import uuid4
from pymongo import ReadPreference
from django.conf import settings
from xmodule.mongo_utils import connect_to_mongodb
class MongoUtilsTests(TestCase):
"""
Tests for methods expos... | """
Tests for methods defined in mongo_utils.py
"""
import ddt
import os
from unittest import TestCase
from uuid import uuid4
from pymongo import ReadPreference
from django.conf import settings
from xmodule.mongo_utils import connect_to_mongodb
@ddt.ddt
class MongoUtilsTests(TestCase):
"""
Tests for method... | """Tests for methods defined in mongo_utils.py"""
import os
from unittest import TestCase
from uuid import uuid4
from pymongo import ReadPreference
from django.conf import settings
from xmodule.mongo_utils import connect_to_mongodb
class MongoUtilsTests(TestCase):
"""
Tests for methods exposed in mongo_uti... | <commit_before>"""Tests for methods defined in mongo_utils.py"""
import os
from unittest import TestCase
from uuid import uuid4
from pymongo import ReadPreference
from django.conf import settings
from xmodule.mongo_utils import connect_to_mongodb
class MongoUtilsTests(TestCase):
"""
Tests for methods expos... |
956cb919554c8103149fa6442254bdfed0ce32d1 | lms/djangoapps/experiments/factories.py | lms/djangoapps/experiments/factories.py | import factory
from experiments.models import ExperimentData, ExperimentKeyValue
from student.tests.factories import UserFactory
class ExperimentDataFactory(factory.DjangoModelFactory):
class Meta(object):
model = ExperimentData
user = factory.SubFactory(UserFactory)
experiment_id = factory.fuzz... | import factory
import factory.fuzzy
from experiments.models import ExperimentData, ExperimentKeyValue
from student.tests.factories import UserFactory
class ExperimentDataFactory(factory.DjangoModelFactory):
class Meta(object):
model = ExperimentData
user = factory.SubFactory(UserFactory)
experim... | Add an import of a submodule to make pytest less complainy | Add an import of a submodule to make pytest less complainy
| Python | agpl-3.0 | angelapper/edx-platform,TeachAtTUM/edx-platform,a-parhom/edx-platform,CredoReference/edx-platform,gsehub/edx-platform,eduNEXT/edunext-platform,eduNEXT/edx-platform,stvstnfrd/edx-platform,eduNEXT/edx-platform,TeachAtTUM/edx-platform,Stanford-Online/edx-platform,a-parhom/edx-platform,eduNEXT/edx-platform,ahmedaljazzar/ed... | import factory
from experiments.models import ExperimentData, ExperimentKeyValue
from student.tests.factories import UserFactory
class ExperimentDataFactory(factory.DjangoModelFactory):
class Meta(object):
model = ExperimentData
user = factory.SubFactory(UserFactory)
experiment_id = factory.fuzz... | import factory
import factory.fuzzy
from experiments.models import ExperimentData, ExperimentKeyValue
from student.tests.factories import UserFactory
class ExperimentDataFactory(factory.DjangoModelFactory):
class Meta(object):
model = ExperimentData
user = factory.SubFactory(UserFactory)
experim... | <commit_before>import factory
from experiments.models import ExperimentData, ExperimentKeyValue
from student.tests.factories import UserFactory
class ExperimentDataFactory(factory.DjangoModelFactory):
class Meta(object):
model = ExperimentData
user = factory.SubFactory(UserFactory)
experiment_id... | import factory
import factory.fuzzy
from experiments.models import ExperimentData, ExperimentKeyValue
from student.tests.factories import UserFactory
class ExperimentDataFactory(factory.DjangoModelFactory):
class Meta(object):
model = ExperimentData
user = factory.SubFactory(UserFactory)
experim... | import factory
from experiments.models import ExperimentData, ExperimentKeyValue
from student.tests.factories import UserFactory
class ExperimentDataFactory(factory.DjangoModelFactory):
class Meta(object):
model = ExperimentData
user = factory.SubFactory(UserFactory)
experiment_id = factory.fuzz... | <commit_before>import factory
from experiments.models import ExperimentData, ExperimentKeyValue
from student.tests.factories import UserFactory
class ExperimentDataFactory(factory.DjangoModelFactory):
class Meta(object):
model = ExperimentData
user = factory.SubFactory(UserFactory)
experiment_id... |
ea3e9270788b251440b5f6fab1605361e0dc2ade | inonemonth/challenges/tests/test_forms.py | inonemonth/challenges/tests/test_forms.py | import unittest
import django.test
from django.core.exceptions import ValidationError
from core.tests.setups import RobrechtSocialUserFactory
from ..validators import RepoExistanceValidator
###############################################################################
# Forms ... | import unittest
import django.test
from django.core.exceptions import ValidationError
from core.tests.setups import RobrechtSocialUserFactory
from ..validators import RepoExistanceValidator
###############################################################################
# Forms ... | Add Comment to RepoExistanceValidator test and correct test name | Add Comment to RepoExistanceValidator test and correct test name
| Python | mit | robrechtdr/inonemonth,robrechtdr/inonemonth,robrechtdr/inonemonth,robrechtdr/inonemonth | import unittest
import django.test
from django.core.exceptions import ValidationError
from core.tests.setups import RobrechtSocialUserFactory
from ..validators import RepoExistanceValidator
###############################################################################
# Forms ... | import unittest
import django.test
from django.core.exceptions import ValidationError
from core.tests.setups import RobrechtSocialUserFactory
from ..validators import RepoExistanceValidator
###############################################################################
# Forms ... | <commit_before>import unittest
import django.test
from django.core.exceptions import ValidationError
from core.tests.setups import RobrechtSocialUserFactory
from ..validators import RepoExistanceValidator
###############################################################################
# ... | import unittest
import django.test
from django.core.exceptions import ValidationError
from core.tests.setups import RobrechtSocialUserFactory
from ..validators import RepoExistanceValidator
###############################################################################
# Forms ... | import unittest
import django.test
from django.core.exceptions import ValidationError
from core.tests.setups import RobrechtSocialUserFactory
from ..validators import RepoExistanceValidator
###############################################################################
# Forms ... | <commit_before>import unittest
import django.test
from django.core.exceptions import ValidationError
from core.tests.setups import RobrechtSocialUserFactory
from ..validators import RepoExistanceValidator
###############################################################################
# ... |
0bdcb1c36432cfa0506c6dd667e4e1910edcd371 | ixprofile_client/management/commands/createsuperuser.py | ixprofile_client/management/commands/createsuperuser.py | """
A management command to create a user with a given email.
"""
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand, CommandError
from ixprofile_client.webservice import UserWebService
from optparse import make_option
class Command(BaseCommand):
"""
The command... | """
A management command to create a user with a given email.
"""
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from ixprofile_client.webservice import UserWebService
from optparse import make_option
class Command(Bas... | Handle the case where the user may already exist in the database | Handle the case where the user may already exist in the database
| Python | mit | infoxchange/ixprofile-client,infoxchange/ixprofile-client | """
A management command to create a user with a given email.
"""
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand, CommandError
from ixprofile_client.webservice import UserWebService
from optparse import make_option
class Command(BaseCommand):
"""
The command... | """
A management command to create a user with a given email.
"""
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from ixprofile_client.webservice import UserWebService
from optparse import make_option
class Command(Bas... | <commit_before>"""
A management command to create a user with a given email.
"""
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand, CommandError
from ixprofile_client.webservice import UserWebService
from optparse import make_option
class Command(BaseCommand):
"""
... | """
A management command to create a user with a given email.
"""
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from ixprofile_client.webservice import UserWebService
from optparse import make_option
class Command(Bas... | """
A management command to create a user with a given email.
"""
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand, CommandError
from ixprofile_client.webservice import UserWebService
from optparse import make_option
class Command(BaseCommand):
"""
The command... | <commit_before>"""
A management command to create a user with a given email.
"""
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand, CommandError
from ixprofile_client.webservice import UserWebService
from optparse import make_option
class Command(BaseCommand):
"""
... |
1cd3096322b5d4b4c4df0f1fba6891e29c911c53 | spaces/utils.py | spaces/utils.py |
import re
import os
def normalize_path(path):
"""
Normalizes a path:
* Removes extra and trailing slashes
* Converts special characters to underscore
"""
path = re.sub(r'/+', '/', path) # repeated slash
path = re.sub(r'/*$', '', path) # trailing slash
path = [to_slug(p)... |
import re
import os
def normalize_path(path):
"""
Normalizes a path:
* Removes extra and trailing slashes
* Converts special characters to underscore
"""
if path is None:
return ""
path = re.sub(r'/+', '/', path) # repeated slash
path = re.sub(r'/*$', '', path) # tr... | Convert path to lowercase when normalizing | Convert path to lowercase when normalizing
| Python | mit | jgillick/Spaces,jgillick/Spaces,jgillick/Spaces,jgillick/Spaces,jgillick/Spaces,jgillick/Spaces |
import re
import os
def normalize_path(path):
"""
Normalizes a path:
* Removes extra and trailing slashes
* Converts special characters to underscore
"""
path = re.sub(r'/+', '/', path) # repeated slash
path = re.sub(r'/*$', '', path) # trailing slash
path = [to_slug(p)... |
import re
import os
def normalize_path(path):
"""
Normalizes a path:
* Removes extra and trailing slashes
* Converts special characters to underscore
"""
if path is None:
return ""
path = re.sub(r'/+', '/', path) # repeated slash
path = re.sub(r'/*$', '', path) # tr... | <commit_before>
import re
import os
def normalize_path(path):
"""
Normalizes a path:
* Removes extra and trailing slashes
* Converts special characters to underscore
"""
path = re.sub(r'/+', '/', path) # repeated slash
path = re.sub(r'/*$', '', path) # trailing slash
pat... |
import re
import os
def normalize_path(path):
"""
Normalizes a path:
* Removes extra and trailing slashes
* Converts special characters to underscore
"""
if path is None:
return ""
path = re.sub(r'/+', '/', path) # repeated slash
path = re.sub(r'/*$', '', path) # tr... |
import re
import os
def normalize_path(path):
"""
Normalizes a path:
* Removes extra and trailing slashes
* Converts special characters to underscore
"""
path = re.sub(r'/+', '/', path) # repeated slash
path = re.sub(r'/*$', '', path) # trailing slash
path = [to_slug(p)... | <commit_before>
import re
import os
def normalize_path(path):
"""
Normalizes a path:
* Removes extra and trailing slashes
* Converts special characters to underscore
"""
path = re.sub(r'/+', '/', path) # repeated slash
path = re.sub(r'/*$', '', path) # trailing slash
pat... |
33c03c8d50524dca3b9c5990958a0b44e9fe399e | isserviceup/services/models/statuspage.py | isserviceup/services/models/statuspage.py | import requests
from bs4 import BeautifulSoup
from isserviceup.services.models.service import Service, Status
class StatusPagePlugin(Service):
def get_status(self):
r = requests.get(self.status_url)
if r.status_code != 200:
return Status.unavailable
b = BeautifulSoup(r.conte... | import requests
from bs4 import BeautifulSoup
from isserviceup.services.models.service import Service, Status
class StatusPagePlugin(Service):
def get_status(self):
r = requests.get(self.status_url)
if r.status_code != 200:
return Status.unavailable
b = BeautifulSoup(r.conte... | Use unresolved-incidents when page-status is empty | Use unresolved-incidents when page-status is empty
| Python | apache-2.0 | marcopaz/is-service-up,marcopaz/is-service-up,marcopaz/is-service-up | import requests
from bs4 import BeautifulSoup
from isserviceup.services.models.service import Service, Status
class StatusPagePlugin(Service):
def get_status(self):
r = requests.get(self.status_url)
if r.status_code != 200:
return Status.unavailable
b = BeautifulSoup(r.conte... | import requests
from bs4 import BeautifulSoup
from isserviceup.services.models.service import Service, Status
class StatusPagePlugin(Service):
def get_status(self):
r = requests.get(self.status_url)
if r.status_code != 200:
return Status.unavailable
b = BeautifulSoup(r.conte... | <commit_before>import requests
from bs4 import BeautifulSoup
from isserviceup.services.models.service import Service, Status
class StatusPagePlugin(Service):
def get_status(self):
r = requests.get(self.status_url)
if r.status_code != 200:
return Status.unavailable
b = Beauti... | import requests
from bs4 import BeautifulSoup
from isserviceup.services.models.service import Service, Status
class StatusPagePlugin(Service):
def get_status(self):
r = requests.get(self.status_url)
if r.status_code != 200:
return Status.unavailable
b = BeautifulSoup(r.conte... | import requests
from bs4 import BeautifulSoup
from isserviceup.services.models.service import Service, Status
class StatusPagePlugin(Service):
def get_status(self):
r = requests.get(self.status_url)
if r.status_code != 200:
return Status.unavailable
b = BeautifulSoup(r.conte... | <commit_before>import requests
from bs4 import BeautifulSoup
from isserviceup.services.models.service import Service, Status
class StatusPagePlugin(Service):
def get_status(self):
r = requests.get(self.status_url)
if r.status_code != 200:
return Status.unavailable
b = Beauti... |
e49ac8daeabf82708f2ba7bb623d7db73e1fcaff | readthedocs/core/subdomain_urls.py | readthedocs/core/subdomain_urls.py | from django.conf.urls.defaults import url, patterns
from urls import urlpatterns as main_patterns
urlpatterns = patterns('',
url(r'^projects/(?P<project_slug>[\w.-]+)/(?P<lang_slug>\w{2})/(?P<version_slug>[\w.-]+)/(?P<filename>.*)$',
'core.views.subproject_serve_docs',
name='subproject_docs_detail... | from django.conf.urls.defaults import url, patterns
from urls import urlpatterns as main_patterns
urlpatterns = patterns('',
url(r'^projects/(?P<project_slug>[\w.-]+)/(?P<lang_slug>\w{2})/(?P<version_slug>[\w.-]+)/(?P<filename>.*)$',
'core.views.subproject_serve_docs',
name='subproject_docs_detail... | Add verison_slug redirection back in for now. | Add verison_slug redirection back in for now.
| Python | mit | agjohnson/readthedocs.org,kdkeyser/readthedocs.org,istresearch/readthedocs.org,davidfischer/readthedocs.org,KamranMackey/readthedocs.org,espdev/readthedocs.org,ojii/readthedocs.org,singingwolfboy/readthedocs.org,michaelmcandrew/readthedocs.org,SteveViss/readthedocs.org,hach-que/readthedocs.org,raven47git/readthedocs.or... | from django.conf.urls.defaults import url, patterns
from urls import urlpatterns as main_patterns
urlpatterns = patterns('',
url(r'^projects/(?P<project_slug>[\w.-]+)/(?P<lang_slug>\w{2})/(?P<version_slug>[\w.-]+)/(?P<filename>.*)$',
'core.views.subproject_serve_docs',
name='subproject_docs_detail... | from django.conf.urls.defaults import url, patterns
from urls import urlpatterns as main_patterns
urlpatterns = patterns('',
url(r'^projects/(?P<project_slug>[\w.-]+)/(?P<lang_slug>\w{2})/(?P<version_slug>[\w.-]+)/(?P<filename>.*)$',
'core.views.subproject_serve_docs',
name='subproject_docs_detail... | <commit_before>from django.conf.urls.defaults import url, patterns
from urls import urlpatterns as main_patterns
urlpatterns = patterns('',
url(r'^projects/(?P<project_slug>[\w.-]+)/(?P<lang_slug>\w{2})/(?P<version_slug>[\w.-]+)/(?P<filename>.*)$',
'core.views.subproject_serve_docs',
name='subproj... | from django.conf.urls.defaults import url, patterns
from urls import urlpatterns as main_patterns
urlpatterns = patterns('',
url(r'^projects/(?P<project_slug>[\w.-]+)/(?P<lang_slug>\w{2})/(?P<version_slug>[\w.-]+)/(?P<filename>.*)$',
'core.views.subproject_serve_docs',
name='subproject_docs_detail... | from django.conf.urls.defaults import url, patterns
from urls import urlpatterns as main_patterns
urlpatterns = patterns('',
url(r'^projects/(?P<project_slug>[\w.-]+)/(?P<lang_slug>\w{2})/(?P<version_slug>[\w.-]+)/(?P<filename>.*)$',
'core.views.subproject_serve_docs',
name='subproject_docs_detail... | <commit_before>from django.conf.urls.defaults import url, patterns
from urls import urlpatterns as main_patterns
urlpatterns = patterns('',
url(r'^projects/(?P<project_slug>[\w.-]+)/(?P<lang_slug>\w{2})/(?P<version_slug>[\w.-]+)/(?P<filename>.*)$',
'core.views.subproject_serve_docs',
name='subproj... |
0484d3f14f29aa489bc848f1d83a9fb20183532e | plaidml/keras/tile_sandbox.py | plaidml/keras/tile_sandbox.py | from collections import OrderedDict
import numpy as np
import plaidml
import plaidml.keras
plaidml.keras.install_backend()
import keras.backend as K
def main(code, tensor_A, tensor_B, output_shape):
print(K.backend())
op = K._Op('sandbox_op', A.dtype, output_shape, code,
OrderedDict([('A', tens... | from collections import OrderedDict
import numpy as np
import plaidml
import plaidml.tile as tile
import plaidml.keras
plaidml.keras.install_backend()
import keras.backend as K
class SandboxOp(tile.Operation):
def __init__(self, code, a, b, output_shape):
super(SandboxOp, self).__init__(code, [('A', a), ... | Update Tile sandbox for op lib | Update Tile sandbox for op lib
| Python | apache-2.0 | plaidml/plaidml,plaidml/plaidml,plaidml/plaidml,plaidml/plaidml | from collections import OrderedDict
import numpy as np
import plaidml
import plaidml.keras
plaidml.keras.install_backend()
import keras.backend as K
def main(code, tensor_A, tensor_B, output_shape):
print(K.backend())
op = K._Op('sandbox_op', A.dtype, output_shape, code,
OrderedDict([('A', tens... | from collections import OrderedDict
import numpy as np
import plaidml
import plaidml.tile as tile
import plaidml.keras
plaidml.keras.install_backend()
import keras.backend as K
class SandboxOp(tile.Operation):
def __init__(self, code, a, b, output_shape):
super(SandboxOp, self).__init__(code, [('A', a), ... | <commit_before>from collections import OrderedDict
import numpy as np
import plaidml
import plaidml.keras
plaidml.keras.install_backend()
import keras.backend as K
def main(code, tensor_A, tensor_B, output_shape):
print(K.backend())
op = K._Op('sandbox_op', A.dtype, output_shape, code,
OrderedD... | from collections import OrderedDict
import numpy as np
import plaidml
import plaidml.tile as tile
import plaidml.keras
plaidml.keras.install_backend()
import keras.backend as K
class SandboxOp(tile.Operation):
def __init__(self, code, a, b, output_shape):
super(SandboxOp, self).__init__(code, [('A', a), ... | from collections import OrderedDict
import numpy as np
import plaidml
import plaidml.keras
plaidml.keras.install_backend()
import keras.backend as K
def main(code, tensor_A, tensor_B, output_shape):
print(K.backend())
op = K._Op('sandbox_op', A.dtype, output_shape, code,
OrderedDict([('A', tens... | <commit_before>from collections import OrderedDict
import numpy as np
import plaidml
import plaidml.keras
plaidml.keras.install_backend()
import keras.backend as K
def main(code, tensor_A, tensor_B, output_shape):
print(K.backend())
op = K._Op('sandbox_op', A.dtype, output_shape, code,
OrderedD... |
583c946061f8af815c32254655f4aed8f0c18dc9 | watcher/tests/api/test_config.py | watcher/tests/api/test_config.py | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | Use importlib to take place of im module | Use importlib to take place of im module
The imp module is deprecated[1] since version 3.4, use importlib to
instead
1: https://docs.python.org/3/library/imp.html#imp.reload
Change-Id: Ic126bc8e0936e5d7a2c7a910b54b7348026fedcb
| Python | apache-2.0 | openstack/watcher,openstack/watcher | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | <commit_before># All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | <commit_before># All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... |
ed5a151942ff6aeddeaab0fb2e23428821f89fc4 | rovercode/drivers/grovepi_ultrasonic_ranger_binary.py | rovercode/drivers/grovepi_ultrasonic_ranger_binary.py | """
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from GrovePi.Software.Python.grovepi import ultrasonicRead
except ImportError:
L... | """
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from grovepi import ultrasonicRead
except ImportError:
LOGGER.warning("GrovePi l... | Fix grovepi import in sensor driver | Fix grovepi import in sensor driver
| Python | apache-2.0 | aninternetof/rover-code,aninternetof/rover-code,aninternetof/rover-code | """
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from GrovePi.Software.Python.grovepi import ultrasonicRead
except ImportError:
L... | """
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from grovepi import ultrasonicRead
except ImportError:
LOGGER.warning("GrovePi l... | <commit_before>"""
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from GrovePi.Software.Python.grovepi import ultrasonicRead
except Imp... | """
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from grovepi import ultrasonicRead
except ImportError:
LOGGER.warning("GrovePi l... | """
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from GrovePi.Software.Python.grovepi import ultrasonicRead
except ImportError:
L... | <commit_before>"""
Class for communicating with the GrovePi ultrasonic ranger.
Here we treat it as a binary sensor.
"""
import logging
logging.basicConfig()
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.getLevelName('INFO'))
try:
from GrovePi.Software.Python.grovepi import ultrasonicRead
except Imp... |
95788f09949e83cf39588444b44eda55e13c6071 | wluopensource/accounts/models.py | wluopensource/accounts/models.py | from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
class UserProfile(models.Model):
user = models.ForeignKey(User, blank=True, unique=True)
url = models.URLField("Website", blank=True, verify_exists=False)
def __unicode__(self):
... | from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
class UserProfile(models.Model):
user = models.ForeignKey(User, blank=True, unique=True)
url = models.URLField("Website", blank=True)
def __unicode__(self):
return self.user.... | Remove verify false from user URL to match up with comment URL | Remove verify false from user URL to match up with comment URL
| Python | bsd-3-clause | jeffcharles/Open-Source-at-Laurier-Website,jeffcharles/Open-Source-at-Laurier-Website,jeffcharles/Open-Source-at-Laurier-Website,jeffcharles/Open-Source-at-Laurier-Website | from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
class UserProfile(models.Model):
user = models.ForeignKey(User, blank=True, unique=True)
url = models.URLField("Website", blank=True, verify_exists=False)
def __unicode__(self):
... | from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
class UserProfile(models.Model):
user = models.ForeignKey(User, blank=True, unique=True)
url = models.URLField("Website", blank=True)
def __unicode__(self):
return self.user.... | <commit_before>from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
class UserProfile(models.Model):
user = models.ForeignKey(User, blank=True, unique=True)
url = models.URLField("Website", blank=True, verify_exists=False)
def __unicod... | from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
class UserProfile(models.Model):
user = models.ForeignKey(User, blank=True, unique=True)
url = models.URLField("Website", blank=True)
def __unicode__(self):
return self.user.... | from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
class UserProfile(models.Model):
user = models.ForeignKey(User, blank=True, unique=True)
url = models.URLField("Website", blank=True, verify_exists=False)
def __unicode__(self):
... | <commit_before>from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_save
class UserProfile(models.Model):
user = models.ForeignKey(User, blank=True, unique=True)
url = models.URLField("Website", blank=True, verify_exists=False)
def __unicod... |
d3bc714478c3f7a665b39dfb1b8d65e7bc59ccd0 | utuputki-webui/utuputki/handlers/logout.py | utuputki-webui/utuputki/handlers/logout.py | # -*- coding: utf-8 -*-
from handlers.handlerbase import HandlerBase
from db import db_session, Session
class LogoutHandler(HandlerBase):
def handle(self, packet_msg):
# Remove session
s = db_session()
s.query(Session).filter_by(key=self.sock.sid).delete()
s.commit()
s.clo... | # -*- coding: utf-8 -*-
from handlers.handlerbase import HandlerBase
from db import db_session, Session
class LogoutHandler(HandlerBase):
def handle(self, packet_msg):
# Remove session
s = db_session()
s.query(Session).filter_by(key=self.sock.sid).delete()
s.commit()
s.clo... | Clear all session data from websocket obj | Clear all session data from websocket obj
| Python | mit | katajakasa/utuputki2,katajakasa/utuputki2,katajakasa/utuputki2,katajakasa/utuputki2 | # -*- coding: utf-8 -*-
from handlers.handlerbase import HandlerBase
from db import db_session, Session
class LogoutHandler(HandlerBase):
def handle(self, packet_msg):
# Remove session
s = db_session()
s.query(Session).filter_by(key=self.sock.sid).delete()
s.commit()
s.clo... | # -*- coding: utf-8 -*-
from handlers.handlerbase import HandlerBase
from db import db_session, Session
class LogoutHandler(HandlerBase):
def handle(self, packet_msg):
# Remove session
s = db_session()
s.query(Session).filter_by(key=self.sock.sid).delete()
s.commit()
s.clo... | <commit_before># -*- coding: utf-8 -*-
from handlers.handlerbase import HandlerBase
from db import db_session, Session
class LogoutHandler(HandlerBase):
def handle(self, packet_msg):
# Remove session
s = db_session()
s.query(Session).filter_by(key=self.sock.sid).delete()
s.commit(... | # -*- coding: utf-8 -*-
from handlers.handlerbase import HandlerBase
from db import db_session, Session
class LogoutHandler(HandlerBase):
def handle(self, packet_msg):
# Remove session
s = db_session()
s.query(Session).filter_by(key=self.sock.sid).delete()
s.commit()
s.clo... | # -*- coding: utf-8 -*-
from handlers.handlerbase import HandlerBase
from db import db_session, Session
class LogoutHandler(HandlerBase):
def handle(self, packet_msg):
# Remove session
s = db_session()
s.query(Session).filter_by(key=self.sock.sid).delete()
s.commit()
s.clo... | <commit_before># -*- coding: utf-8 -*-
from handlers.handlerbase import HandlerBase
from db import db_session, Session
class LogoutHandler(HandlerBase):
def handle(self, packet_msg):
# Remove session
s = db_session()
s.query(Session).filter_by(key=self.sock.sid).delete()
s.commit(... |
5bcd0d538bad1393d2ecbc1f91556a7b873343c8 | subprocrunner/_logger/_logger.py | subprocrunner/_logger/_logger.py | """
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from typing import Callable, Optional
from ._null_logger import NullLogger
MODULE_NAME = "subprocrunner"
DEFAULT_ERROR_LOG_LEVEL = "WARNING"
try:
from loguru import logger
LOGURU_INSTALLED = True
logger.disable(MODULE_NAME)
exce... | """
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from typing import Callable, Optional
from ._null_logger import NullLogger
MODULE_NAME = "subprocrunner"
DEFAULT_ERROR_LOG_LEVEL = "WARNING"
try:
from loguru import logger
LOGURU_INSTALLED = True
logger.disable(MODULE_NAME)
exce... | Apply upper to the argument value | Apply upper to the argument value
| Python | mit | thombashi/subprocrunner,thombashi/subprocrunner | """
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from typing import Callable, Optional
from ._null_logger import NullLogger
MODULE_NAME = "subprocrunner"
DEFAULT_ERROR_LOG_LEVEL = "WARNING"
try:
from loguru import logger
LOGURU_INSTALLED = True
logger.disable(MODULE_NAME)
exce... | """
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from typing import Callable, Optional
from ._null_logger import NullLogger
MODULE_NAME = "subprocrunner"
DEFAULT_ERROR_LOG_LEVEL = "WARNING"
try:
from loguru import logger
LOGURU_INSTALLED = True
logger.disable(MODULE_NAME)
exce... | <commit_before>"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from typing import Callable, Optional
from ._null_logger import NullLogger
MODULE_NAME = "subprocrunner"
DEFAULT_ERROR_LOG_LEVEL = "WARNING"
try:
from loguru import logger
LOGURU_INSTALLED = True
logger.disable(MO... | """
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from typing import Callable, Optional
from ._null_logger import NullLogger
MODULE_NAME = "subprocrunner"
DEFAULT_ERROR_LOG_LEVEL = "WARNING"
try:
from loguru import logger
LOGURU_INSTALLED = True
logger.disable(MODULE_NAME)
exce... | """
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from typing import Callable, Optional
from ._null_logger import NullLogger
MODULE_NAME = "subprocrunner"
DEFAULT_ERROR_LOG_LEVEL = "WARNING"
try:
from loguru import logger
LOGURU_INSTALLED = True
logger.disable(MODULE_NAME)
exce... | <commit_before>"""
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
"""
from typing import Callable, Optional
from ._null_logger import NullLogger
MODULE_NAME = "subprocrunner"
DEFAULT_ERROR_LOG_LEVEL = "WARNING"
try:
from loguru import logger
LOGURU_INSTALLED = True
logger.disable(MO... |
5d5b59bde655fbeb2d07bd5539c2ff9b29879d1d | pythontutorials/books/AutomateTheBoringStuff/Ch14/P2_writeCSV.py | pythontutorials/books/AutomateTheBoringStuff/Ch14/P2_writeCSV.py | # This program uses the csv module to manipulate .csv files
import csv
# Writer Objects
outputFile = open("output.csv", "w", newline='')
outputWriter = csv.writer(outputFile)
print(outputWriter.writerow(['spam', 'eggs', 'bacon', 'ham']))
print(outputWriter.writerow(['Hello, world!', 'eggs', 'bacon', 'ham']))
print(ou... | """Write CSV
This program uses :py:mod:`csv` to write .csv files.
Note:
Creates 'output.csv' and 'example.tsv' files.
"""
def main():
import csv
# Writer Objects
outputFile = open("output.csv", "w", newline='')
outputWriter = csv.writer(outputFile)
print(outputWriter.writerow(['spam', 'egg... | Update P1_writeCSV.py added docstring and wrapped in main function | Update P1_writeCSV.py
added docstring and wrapped in main function
| Python | mit | JoseALermaIII/python-tutorials,JoseALermaIII/python-tutorials | # This program uses the csv module to manipulate .csv files
import csv
# Writer Objects
outputFile = open("output.csv", "w", newline='')
outputWriter = csv.writer(outputFile)
print(outputWriter.writerow(['spam', 'eggs', 'bacon', 'ham']))
print(outputWriter.writerow(['Hello, world!', 'eggs', 'bacon', 'ham']))
print(ou... | """Write CSV
This program uses :py:mod:`csv` to write .csv files.
Note:
Creates 'output.csv' and 'example.tsv' files.
"""
def main():
import csv
# Writer Objects
outputFile = open("output.csv", "w", newline='')
outputWriter = csv.writer(outputFile)
print(outputWriter.writerow(['spam', 'egg... | <commit_before># This program uses the csv module to manipulate .csv files
import csv
# Writer Objects
outputFile = open("output.csv", "w", newline='')
outputWriter = csv.writer(outputFile)
print(outputWriter.writerow(['spam', 'eggs', 'bacon', 'ham']))
print(outputWriter.writerow(['Hello, world!', 'eggs', 'bacon', 'h... | """Write CSV
This program uses :py:mod:`csv` to write .csv files.
Note:
Creates 'output.csv' and 'example.tsv' files.
"""
def main():
import csv
# Writer Objects
outputFile = open("output.csv", "w", newline='')
outputWriter = csv.writer(outputFile)
print(outputWriter.writerow(['spam', 'egg... | # This program uses the csv module to manipulate .csv files
import csv
# Writer Objects
outputFile = open("output.csv", "w", newline='')
outputWriter = csv.writer(outputFile)
print(outputWriter.writerow(['spam', 'eggs', 'bacon', 'ham']))
print(outputWriter.writerow(['Hello, world!', 'eggs', 'bacon', 'ham']))
print(ou... | <commit_before># This program uses the csv module to manipulate .csv files
import csv
# Writer Objects
outputFile = open("output.csv", "w", newline='')
outputWriter = csv.writer(outputFile)
print(outputWriter.writerow(['spam', 'eggs', 'bacon', 'ham']))
print(outputWriter.writerow(['Hello, world!', 'eggs', 'bacon', 'h... |
20d94336b163c1e98458f14ab44651e2df8ed659 | web/social/management/commands/stream_twitter.py | web/social/management/commands/stream_twitter.py | import logging
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from social.models import *
from social.utils import *
from tweetstream import FilterStream
class Command(BaseCommand):
help = "Start Twitter streaming"
def handle(self, *args, **options):
... | import logging
import time
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from social.models import *
from social.utils import *
from tweetstream import FilterStream, ConnectionError
class Command(BaseCommand):
help = "Start Twitter streaming"
def handle(sel... | Add ConnectionError handling and reconnection to Twitter streamer | Add ConnectionError handling and reconnection to Twitter streamer
| Python | agpl-3.0 | kansanmuisti/datavaalit,kansanmuisti/datavaalit | import logging
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from social.models import *
from social.utils import *
from tweetstream import FilterStream
class Command(BaseCommand):
help = "Start Twitter streaming"
def handle(self, *args, **options):
... | import logging
import time
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from social.models import *
from social.utils import *
from tweetstream import FilterStream, ConnectionError
class Command(BaseCommand):
help = "Start Twitter streaming"
def handle(sel... | <commit_before>import logging
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from social.models import *
from social.utils import *
from tweetstream import FilterStream
class Command(BaseCommand):
help = "Start Twitter streaming"
def handle(self, *args, **op... | import logging
import time
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from social.models import *
from social.utils import *
from tweetstream import FilterStream, ConnectionError
class Command(BaseCommand):
help = "Start Twitter streaming"
def handle(sel... | import logging
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from social.models import *
from social.utils import *
from tweetstream import FilterStream
class Command(BaseCommand):
help = "Start Twitter streaming"
def handle(self, *args, **options):
... | <commit_before>import logging
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from social.models import *
from social.utils import *
from tweetstream import FilterStream
class Command(BaseCommand):
help = "Start Twitter streaming"
def handle(self, *args, **op... |
72919640ac70da7f05ba36e345666909eb002187 | python/ramldoc/django_urls.py | python/ramldoc/django_urls.py | import re as regex
from django.conf.urls import patterns, url
def build_patterns(modules, version):
pattern_list = []
for module in modules:
url_string = r'^'
url_string += str(version) + r'/'
# NOTE, the assumption here is that get_path() is an instance of the AnnotationBaseClass:
... | import re as regex
from django.conf.urls import patterns, url
def build_patterns(modules, version):
pattern_list = []
for module in modules:
url_string = r'^'
url_string += str(version) + r'/'
# NOTE, the assumption here is that get_path() is an instance of the AnnotationBaseClass:
... | Fix for supporting special characters in the url. | Fix for supporting special characters in the url. | Python | apache-2.0 | SungardAS-CloudDevelopers/ramldoc | import re as regex
from django.conf.urls import patterns, url
def build_patterns(modules, version):
pattern_list = []
for module in modules:
url_string = r'^'
url_string += str(version) + r'/'
# NOTE, the assumption here is that get_path() is an instance of the AnnotationBaseClass:
... | import re as regex
from django.conf.urls import patterns, url
def build_patterns(modules, version):
pattern_list = []
for module in modules:
url_string = r'^'
url_string += str(version) + r'/'
# NOTE, the assumption here is that get_path() is an instance of the AnnotationBaseClass:
... | <commit_before>import re as regex
from django.conf.urls import patterns, url
def build_patterns(modules, version):
pattern_list = []
for module in modules:
url_string = r'^'
url_string += str(version) + r'/'
# NOTE, the assumption here is that get_path() is an instance of the Annotat... | import re as regex
from django.conf.urls import patterns, url
def build_patterns(modules, version):
pattern_list = []
for module in modules:
url_string = r'^'
url_string += str(version) + r'/'
# NOTE, the assumption here is that get_path() is an instance of the AnnotationBaseClass:
... | import re as regex
from django.conf.urls import patterns, url
def build_patterns(modules, version):
pattern_list = []
for module in modules:
url_string = r'^'
url_string += str(version) + r'/'
# NOTE, the assumption here is that get_path() is an instance of the AnnotationBaseClass:
... | <commit_before>import re as regex
from django.conf.urls import patterns, url
def build_patterns(modules, version):
pattern_list = []
for module in modules:
url_string = r'^'
url_string += str(version) + r'/'
# NOTE, the assumption here is that get_path() is an instance of the Annotat... |
e2eab36586652b2c7fe37ca96fedea89760665fc | kpcc_backroom_handshakes/urls.py | kpcc_backroom_handshakes/urls.py | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.generic import TemplateView
from django.views.generic import RedirectView
from django.contrib import admin
import os
import logging
logger = logging.getLogger("kpcc_backro... | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.generic import TemplateView
from django.views.generic import RedirectView
from django.contrib import admin
import os
import logging
logger = logging.getLogger("kpcc_backro... | Disable redirect that prevented access to the admin panel. | Disable redirect that prevented access to the admin panel.
| Python | mit | SCPR/kpcc_backroom_handshakes,SCPR/kpcc_backroom_handshakes,SCPR/kpcc_backroom_handshakes | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.generic import TemplateView
from django.views.generic import RedirectView
from django.contrib import admin
import os
import logging
logger = logging.getLogger("kpcc_backro... | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.generic import TemplateView
from django.views.generic import RedirectView
from django.contrib import admin
import os
import logging
logger = logging.getLogger("kpcc_backro... | <commit_before>from django.conf import settings
from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.generic import TemplateView
from django.views.generic import RedirectView
from django.contrib import admin
import os
import logging
logger = logging.getLogg... | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.generic import TemplateView
from django.views.generic import RedirectView
from django.contrib import admin
import os
import logging
logger = logging.getLogger("kpcc_backro... | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.generic import TemplateView
from django.views.generic import RedirectView
from django.contrib import admin
import os
import logging
logger = logging.getLogger("kpcc_backro... | <commit_before>from django.conf import settings
from django.conf.urls import patterns, include, url
from django.core.urlresolvers import reverse
from django.views.generic import TemplateView
from django.views.generic import RedirectView
from django.contrib import admin
import os
import logging
logger = logging.getLogg... |
415e34fb913feaf623320827fb7680ee56c9d335 | gunicorn.conf.py | gunicorn.conf.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
bind = '127.0.0.1:8001'
workers = 6
proc_name = 'lastuser'
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
bind = '127.0.0.1:8002'
workers = 6
proc_name = 'lastuser'
| Use a different port for lastuser | Use a different port for lastuser
| Python | bsd-2-clause | hasgeek/lastuser,hasgeek/lastuser,sindhus/lastuser,hasgeek/lastuser,sindhus/lastuser,hasgeek/funnel,hasgeek/funnel,hasgeek/funnel,hasgeek/funnel,hasgeek/lastuser,sindhus/lastuser,sindhus/lastuser,sindhus/lastuser,hasgeek/funnel,hasgeek/lastuser | #!/usr/bin/env python
# -*- coding: utf-8 -*-
bind = '127.0.0.1:8001'
workers = 6
proc_name = 'lastuser'
Use a different port for lastuser | #!/usr/bin/env python
# -*- coding: utf-8 -*-
bind = '127.0.0.1:8002'
workers = 6
proc_name = 'lastuser'
| <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
bind = '127.0.0.1:8001'
workers = 6
proc_name = 'lastuser'
<commit_msg>Use a different port for lastuser<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
bind = '127.0.0.1:8002'
workers = 6
proc_name = 'lastuser'
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
bind = '127.0.0.1:8001'
workers = 6
proc_name = 'lastuser'
Use a different port for lastuser#!/usr/bin/env python
# -*- coding: utf-8 -*-
bind = '127.0.0.1:8002'
workers = 6
proc_name = 'lastuser'
| <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
bind = '127.0.0.1:8001'
workers = 6
proc_name = 'lastuser'
<commit_msg>Use a different port for lastuser<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
bind = '127.0.0.1:8002'
workers = 6
proc_name = 'lastuser'
|
6bf762b7aeabcb47571fe4d23fe13ae8e4b3ebc3 | editorsnotes/main/views.py | editorsnotes/main/views.py | from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from models import Term, Reference
@login_required
def index(request):
o = {}
o['term_list'] = Term.objects.all()
return render_to_... | from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import render_to_response, get_object_or_404
from django.contrib.auth.decorators import login_required
from models import Term, Reference
@login_required
def index(request):
o = {}
o['term_list'] = Term.objects.all()
... | Throw 404 for non-existent terms. | Throw 404 for non-existent terms.
| Python | agpl-3.0 | editorsnotes/editorsnotes,editorsnotes/editorsnotes | from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from models import Term, Reference
@login_required
def index(request):
o = {}
o['term_list'] = Term.objects.all()
return render_to_... | from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import render_to_response, get_object_or_404
from django.contrib.auth.decorators import login_required
from models import Term, Reference
@login_required
def index(request):
o = {}
o['term_list'] = Term.objects.all()
... | <commit_before>from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from models import Term, Reference
@login_required
def index(request):
o = {}
o['term_list'] = Term.objects.all()
re... | from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import render_to_response, get_object_or_404
from django.contrib.auth.decorators import login_required
from models import Term, Reference
@login_required
def index(request):
o = {}
o['term_list'] = Term.objects.all()
... | from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from models import Term, Reference
@login_required
def index(request):
o = {}
o['term_list'] = Term.objects.all()
return render_to_... | <commit_before>from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from models import Term, Reference
@login_required
def index(request):
o = {}
o['term_list'] = Term.objects.all()
re... |
2bf3e59e5ec0ca5d1003cd52f06a8f12a5ee7caf | tools/metrics/apk_size.py | tools/metrics/apk_size.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Check APK file size for limit
from os import path, listdir, stat
from sys import exit
SIZE_LIMIT = 4194304
PATH = pa... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Check APK file size for limit
from os import path, listdir, stat
from sys import exit
SIZE_LIMIT = 4500000
PATH = pa... | Increase apk size limit to 4.5MB | Increase apk size limit to 4.5MB
| Python | mpl-2.0 | pocmo/focus-android,mozilla-mobile/focus-android,ekager/focus-android,pocmo/focus-android,mastizada/focus-android,liuche/focus-android,pocmo/focus-android,pocmo/focus-android,jonalmeida/focus-android,mozilla-mobile/focus-android,jonalmeida/focus-android,Benestar/focus-android,mozilla-mobile/focus-android,mastizada/focu... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Check APK file size for limit
from os import path, listdir, stat
from sys import exit
SIZE_LIMIT = 4194304
PATH = pa... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Check APK file size for limit
from os import path, listdir, stat
from sys import exit
SIZE_LIMIT = 4500000
PATH = pa... | <commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Check APK file size for limit
from os import path, listdir, stat
from sys import exit
SIZE_LIMIT = 41... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Check APK file size for limit
from os import path, listdir, stat
from sys import exit
SIZE_LIMIT = 4500000
PATH = pa... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Check APK file size for limit
from os import path, listdir, stat
from sys import exit
SIZE_LIMIT = 4194304
PATH = pa... | <commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Check APK file size for limit
from os import path, listdir, stat
from sys import exit
SIZE_LIMIT = 41... |
1fa22ca68394d4ce55a4e10aa7c23f7bcfa02f79 | zc_common/remote_resource/mixins.py | zc_common/remote_resource/mixins.py | """
Class Mixins.
"""
from django.db import IntegrityError
from django.http import Http404
class MultipleIDMixin(object):
"""
Override get_queryset for multiple id support
"""
def get_queryset(self):
"""
Override :meth:``get_queryset``
"""
if hasattr(self.request, 'quer... | """
Class Mixins.
"""
from django.db import IntegrityError
from django.http import Http404
class MultipleIDMixin(object):
"""
Override get_queryset for multiple id support
"""
def get_queryset(self):
"""
Override :meth:``get_queryset``
"""
if hasattr(self.request, 'quer... | Update query param for mixin | Update query param for mixin
| Python | mit | ZeroCater/zc_common,ZeroCater/zc_common | """
Class Mixins.
"""
from django.db import IntegrityError
from django.http import Http404
class MultipleIDMixin(object):
"""
Override get_queryset for multiple id support
"""
def get_queryset(self):
"""
Override :meth:``get_queryset``
"""
if hasattr(self.request, 'quer... | """
Class Mixins.
"""
from django.db import IntegrityError
from django.http import Http404
class MultipleIDMixin(object):
"""
Override get_queryset for multiple id support
"""
def get_queryset(self):
"""
Override :meth:``get_queryset``
"""
if hasattr(self.request, 'quer... | <commit_before>"""
Class Mixins.
"""
from django.db import IntegrityError
from django.http import Http404
class MultipleIDMixin(object):
"""
Override get_queryset for multiple id support
"""
def get_queryset(self):
"""
Override :meth:``get_queryset``
"""
if hasattr(self... | """
Class Mixins.
"""
from django.db import IntegrityError
from django.http import Http404
class MultipleIDMixin(object):
"""
Override get_queryset for multiple id support
"""
def get_queryset(self):
"""
Override :meth:``get_queryset``
"""
if hasattr(self.request, 'quer... | """
Class Mixins.
"""
from django.db import IntegrityError
from django.http import Http404
class MultipleIDMixin(object):
"""
Override get_queryset for multiple id support
"""
def get_queryset(self):
"""
Override :meth:``get_queryset``
"""
if hasattr(self.request, 'quer... | <commit_before>"""
Class Mixins.
"""
from django.db import IntegrityError
from django.http import Http404
class MultipleIDMixin(object):
"""
Override get_queryset for multiple id support
"""
def get_queryset(self):
"""
Override :meth:``get_queryset``
"""
if hasattr(self... |
c5f6a9632b6d996fc988bfc9317915208ff69a42 | domain/companies.py | domain/companies.py | # -*- coding: utf-8 -*-
"""
'companies' resource and schema settings.
:copyright: (c) 2014 by Nicola Iarocci and CIR2000.
:license: BSD, see LICENSE for more details.
"""
from common import required_string
_schema = {
# company id ('id')
'n': required_string, # name
'p': ... | # -*- coding: utf-8 -*-
"""
'companies' resource and schema settings.
:copyright: (c) 2014 by Nicola Iarocci and CIR2000.
:license: BSD, see LICENSE for more details.
"""
from common import required_string
_schema = {
# company id ('id')
'name': required_string,
'password': {'type': 'string', ... | Add a snake_cased field to the test document. | Add a snake_cased field to the test document.
| Python | bsd-3-clause | nicolaiarocci/Eve.NET-testbed | # -*- coding: utf-8 -*-
"""
'companies' resource and schema settings.
:copyright: (c) 2014 by Nicola Iarocci and CIR2000.
:license: BSD, see LICENSE for more details.
"""
from common import required_string
_schema = {
# company id ('id')
'n': required_string, # name
'p': ... | # -*- coding: utf-8 -*-
"""
'companies' resource and schema settings.
:copyright: (c) 2014 by Nicola Iarocci and CIR2000.
:license: BSD, see LICENSE for more details.
"""
from common import required_string
_schema = {
# company id ('id')
'name': required_string,
'password': {'type': 'string', ... | <commit_before># -*- coding: utf-8 -*-
"""
'companies' resource and schema settings.
:copyright: (c) 2014 by Nicola Iarocci and CIR2000.
:license: BSD, see LICENSE for more details.
"""
from common import required_string
_schema = {
# company id ('id')
'n': required_string, #... | # -*- coding: utf-8 -*-
"""
'companies' resource and schema settings.
:copyright: (c) 2014 by Nicola Iarocci and CIR2000.
:license: BSD, see LICENSE for more details.
"""
from common import required_string
_schema = {
# company id ('id')
'name': required_string,
'password': {'type': 'string', ... | # -*- coding: utf-8 -*-
"""
'companies' resource and schema settings.
:copyright: (c) 2014 by Nicola Iarocci and CIR2000.
:license: BSD, see LICENSE for more details.
"""
from common import required_string
_schema = {
# company id ('id')
'n': required_string, # name
'p': ... | <commit_before># -*- coding: utf-8 -*-
"""
'companies' resource and schema settings.
:copyright: (c) 2014 by Nicola Iarocci and CIR2000.
:license: BSD, see LICENSE for more details.
"""
from common import required_string
_schema = {
# company id ('id')
'n': required_string, #... |
9502de0e6be30e4592f4f0cf141abc27db64ccf4 | dependencies.py | dependencies.py | import os
import pkgutil
import site
if pkgutil.find_loader("gi"):
try:
import gi
print('Found gi:', os.path.abspath(gi.__file__))
gi.require_version('Gst', '1.0')
# from gi.repository import GLib, Gst
except ValueError:
print('Couldn\'t find Gst')
print('Please ... | import os
import pkgutil
import site
from sys import exit
if pkgutil.find_loader('gi'):
try:
import gi
print("Found gi at:", os.path.abspath(gi.__file__))
gi.require_version('Gst', '1.0')
# from gi.repository import Gst
except ValueError:
print("Couldn\'t find Gst",
... | Clean up of text Proper exit when exception has been raised | Clean up of text
Proper exit when exception has been raised
| Python | mit | Kane610/axis | import os
import pkgutil
import site
if pkgutil.find_loader("gi"):
try:
import gi
print('Found gi:', os.path.abspath(gi.__file__))
gi.require_version('Gst', '1.0')
# from gi.repository import GLib, Gst
except ValueError:
print('Couldn\'t find Gst')
print('Please ... | import os
import pkgutil
import site
from sys import exit
if pkgutil.find_loader('gi'):
try:
import gi
print("Found gi at:", os.path.abspath(gi.__file__))
gi.require_version('Gst', '1.0')
# from gi.repository import Gst
except ValueError:
print("Couldn\'t find Gst",
... | <commit_before>import os
import pkgutil
import site
if pkgutil.find_loader("gi"):
try:
import gi
print('Found gi:', os.path.abspath(gi.__file__))
gi.require_version('Gst', '1.0')
# from gi.repository import GLib, Gst
except ValueError:
print('Couldn\'t find Gst')
... | import os
import pkgutil
import site
from sys import exit
if pkgutil.find_loader('gi'):
try:
import gi
print("Found gi at:", os.path.abspath(gi.__file__))
gi.require_version('Gst', '1.0')
# from gi.repository import Gst
except ValueError:
print("Couldn\'t find Gst",
... | import os
import pkgutil
import site
if pkgutil.find_loader("gi"):
try:
import gi
print('Found gi:', os.path.abspath(gi.__file__))
gi.require_version('Gst', '1.0')
# from gi.repository import GLib, Gst
except ValueError:
print('Couldn\'t find Gst')
print('Please ... | <commit_before>import os
import pkgutil
import site
if pkgutil.find_loader("gi"):
try:
import gi
print('Found gi:', os.path.abspath(gi.__file__))
gi.require_version('Gst', '1.0')
# from gi.repository import GLib, Gst
except ValueError:
print('Couldn\'t find Gst')
... |
099892e56f02c683879d05625b1215212fda7c9e | links/views.py | links/views.py | from django.shortcuts import render, redirect
from django.http import Http404
from .models import Link, LinkForm
from urlparse import urlparse
def catchall(request, id):
try:
link = Link.objects.get(id=id)
return redirect(link.url)
except:
parsed = urlparse(id)
if parsed.netloc:
... | from django.shortcuts import render, redirect
from django.http import Http404
from .models import Link, LinkForm
from urlparse import urlparse
def catchall(request, id):
try:
link = Link.objects.get(id=id)
return redirect(link.url)
except:
parsed = urlparse(id)
if parsed.netloc:
... | Update post handling after migration | Update post handling after migration
| Python | mit | kudos/min.ie,kudos/min.ie | from django.shortcuts import render, redirect
from django.http import Http404
from .models import Link, LinkForm
from urlparse import urlparse
def catchall(request, id):
try:
link = Link.objects.get(id=id)
return redirect(link.url)
except:
parsed = urlparse(id)
if parsed.netloc:
... | from django.shortcuts import render, redirect
from django.http import Http404
from .models import Link, LinkForm
from urlparse import urlparse
def catchall(request, id):
try:
link = Link.objects.get(id=id)
return redirect(link.url)
except:
parsed = urlparse(id)
if parsed.netloc:
... | <commit_before>from django.shortcuts import render, redirect
from django.http import Http404
from .models import Link, LinkForm
from urlparse import urlparse
def catchall(request, id):
try:
link = Link.objects.get(id=id)
return redirect(link.url)
except:
parsed = urlparse(id)
if parsed.... | from django.shortcuts import render, redirect
from django.http import Http404
from .models import Link, LinkForm
from urlparse import urlparse
def catchall(request, id):
try:
link = Link.objects.get(id=id)
return redirect(link.url)
except:
parsed = urlparse(id)
if parsed.netloc:
... | from django.shortcuts import render, redirect
from django.http import Http404
from .models import Link, LinkForm
from urlparse import urlparse
def catchall(request, id):
try:
link = Link.objects.get(id=id)
return redirect(link.url)
except:
parsed = urlparse(id)
if parsed.netloc:
... | <commit_before>from django.shortcuts import render, redirect
from django.http import Http404
from .models import Link, LinkForm
from urlparse import urlparse
def catchall(request, id):
try:
link = Link.objects.get(id=id)
return redirect(link.url)
except:
parsed = urlparse(id)
if parsed.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.