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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c89e30d1a33df2d9d8c5ceb03df98d29b3b08724 | spacy/tests/en/test_exceptions.py | spacy/tests/en/test_exceptions.py | # coding: utf-8
"""Test that tokenizer exceptions are handled correctly."""
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize('text', ["e.g.", "p.m.", "Jan.", "Dec.", "Inc."])
def test_tokenizer_handles_abbr(en_tokenizer, text):
tokens = en_tokenizer(text)
assert len(tokens) ==... | # coding: utf-8
"""Test that tokenizer exceptions are handled correctly."""
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize('text', ["e.g.", "p.m.", "Jan.", "Dec.", "Inc."])
def test_tokenizer_handles_abbr(en_tokenizer, text):
tokens = en_tokenizer(text)
assert len(tokens) ==... | Add test for English time exceptions ("1a.m." etc.) | Add test for English time exceptions ("1a.m." etc.)
| Python | mit | honnibal/spaCy,spacy-io/spaCy,Gregory-Howard/spaCy,recognai/spaCy,raphael0202/spaCy,aikramer2/spaCy,explosion/spaCy,aikramer2/spaCy,Gregory-Howard/spaCy,raphael0202/spaCy,honnibal/spaCy,explosion/spaCy,raphael0202/spaCy,spacy-io/spaCy,honnibal/spaCy,oroszgy/spaCy.hu,aikramer2/spaCy,Gregory-Howard/spaCy,spacy-io/spaCy,r... | # coding: utf-8
"""Test that tokenizer exceptions are handled correctly."""
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize('text', ["e.g.", "p.m.", "Jan.", "Dec.", "Inc."])
def test_tokenizer_handles_abbr(en_tokenizer, text):
tokens = en_tokenizer(text)
assert len(tokens) ==... | # coding: utf-8
"""Test that tokenizer exceptions are handled correctly."""
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize('text', ["e.g.", "p.m.", "Jan.", "Dec.", "Inc."])
def test_tokenizer_handles_abbr(en_tokenizer, text):
tokens = en_tokenizer(text)
assert len(tokens) ==... | <commit_before># coding: utf-8
"""Test that tokenizer exceptions are handled correctly."""
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize('text', ["e.g.", "p.m.", "Jan.", "Dec.", "Inc."])
def test_tokenizer_handles_abbr(en_tokenizer, text):
tokens = en_tokenizer(text)
assert... | # coding: utf-8
"""Test that tokenizer exceptions are handled correctly."""
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize('text', ["e.g.", "p.m.", "Jan.", "Dec.", "Inc."])
def test_tokenizer_handles_abbr(en_tokenizer, text):
tokens = en_tokenizer(text)
assert len(tokens) ==... | # coding: utf-8
"""Test that tokenizer exceptions are handled correctly."""
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize('text', ["e.g.", "p.m.", "Jan.", "Dec.", "Inc."])
def test_tokenizer_handles_abbr(en_tokenizer, text):
tokens = en_tokenizer(text)
assert len(tokens) ==... | <commit_before># coding: utf-8
"""Test that tokenizer exceptions are handled correctly."""
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize('text', ["e.g.", "p.m.", "Jan.", "Dec.", "Inc."])
def test_tokenizer_handles_abbr(en_tokenizer, text):
tokens = en_tokenizer(text)
assert... |
99b1610fad7224d2efe03547c5114d2f046f50ca | bin/cgroup-limits.py | bin/cgroup-limits.py | #!/usr/bin/python
env_vars = {}
def read_file(path):
try:
with open(path, 'r') as f:
return f.read().strip()
except IOError:
return None
def get_memory_limit():
limit = read_file('/sys/fs/cgroup/memory/memory.limit_in_bytes')
if limit:
env_vars['MEMORY_LIMIT_IN_B... | #!/usr/bin/python
from __future__ import print_function
import sys
env_vars = {}
def read_file(path):
try:
with open(path, 'r') as f:
return f.read().strip()
except IOError:
return None
def get_memory_limit():
limit = read_file('/sys/fs/cgroup/memory/memory.limit_in_bytes')... | Print warnings to standard error | Print warnings to standard error
| Python | apache-2.0 | soltysh/sti-base,mfojtik/sti-base,hhorak/sti-base,bparees/sti-base,openshift/sti-base,sclorg/s2i-base-container,openshift/sti-base,mfojtik/sti-base,bparees/sti-base | #!/usr/bin/python
env_vars = {}
def read_file(path):
try:
with open(path, 'r') as f:
return f.read().strip()
except IOError:
return None
def get_memory_limit():
limit = read_file('/sys/fs/cgroup/memory/memory.limit_in_bytes')
if limit:
env_vars['MEMORY_LIMIT_IN_B... | #!/usr/bin/python
from __future__ import print_function
import sys
env_vars = {}
def read_file(path):
try:
with open(path, 'r') as f:
return f.read().strip()
except IOError:
return None
def get_memory_limit():
limit = read_file('/sys/fs/cgroup/memory/memory.limit_in_bytes')... | <commit_before>#!/usr/bin/python
env_vars = {}
def read_file(path):
try:
with open(path, 'r') as f:
return f.read().strip()
except IOError:
return None
def get_memory_limit():
limit = read_file('/sys/fs/cgroup/memory/memory.limit_in_bytes')
if limit:
env_vars['ME... | #!/usr/bin/python
from __future__ import print_function
import sys
env_vars = {}
def read_file(path):
try:
with open(path, 'r') as f:
return f.read().strip()
except IOError:
return None
def get_memory_limit():
limit = read_file('/sys/fs/cgroup/memory/memory.limit_in_bytes')... | #!/usr/bin/python
env_vars = {}
def read_file(path):
try:
with open(path, 'r') as f:
return f.read().strip()
except IOError:
return None
def get_memory_limit():
limit = read_file('/sys/fs/cgroup/memory/memory.limit_in_bytes')
if limit:
env_vars['MEMORY_LIMIT_IN_B... | <commit_before>#!/usr/bin/python
env_vars = {}
def read_file(path):
try:
with open(path, 'r') as f:
return f.read().strip()
except IOError:
return None
def get_memory_limit():
limit = read_file('/sys/fs/cgroup/memory/memory.limit_in_bytes')
if limit:
env_vars['ME... |
e93dadc8215f3946e4e7b64ca8ab3481fcf3c197 | froide/foirequestfollower/apps.py | froide/foirequestfollower/apps.py | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class FoiRequestFollowerConfig(AppConfig):
name = 'froide.foirequestfollower'
verbose_name = _('FOI Request Follower')
def ready(self):
from froide.account import account_canceled
import froide.foire... | import json
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class FoiRequestFollowerConfig(AppConfig):
name = 'froide.foirequestfollower'
verbose_name = _('FOI Request Follower')
def ready(self):
from froide.account import account_canceled
import... | Add user data export for foirequest follower | Add user data export for foirequest follower | Python | mit | fin/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide,stefanw/froide,stefanw/froide,fin/froide | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class FoiRequestFollowerConfig(AppConfig):
name = 'froide.foirequestfollower'
verbose_name = _('FOI Request Follower')
def ready(self):
from froide.account import account_canceled
import froide.foire... | import json
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class FoiRequestFollowerConfig(AppConfig):
name = 'froide.foirequestfollower'
verbose_name = _('FOI Request Follower')
def ready(self):
from froide.account import account_canceled
import... | <commit_before>from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class FoiRequestFollowerConfig(AppConfig):
name = 'froide.foirequestfollower'
verbose_name = _('FOI Request Follower')
def ready(self):
from froide.account import account_canceled
impo... | import json
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class FoiRequestFollowerConfig(AppConfig):
name = 'froide.foirequestfollower'
verbose_name = _('FOI Request Follower')
def ready(self):
from froide.account import account_canceled
import... | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class FoiRequestFollowerConfig(AppConfig):
name = 'froide.foirequestfollower'
verbose_name = _('FOI Request Follower')
def ready(self):
from froide.account import account_canceled
import froide.foire... | <commit_before>from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class FoiRequestFollowerConfig(AppConfig):
name = 'froide.foirequestfollower'
verbose_name = _('FOI Request Follower')
def ready(self):
from froide.account import account_canceled
impo... |
482205f4235f5a741e55fd560bab4a4d75cb5303 | versailes2geojson.py | versailes2geojson.py | import pandas as pd
import geojson
from geojson import FeatureCollection, Feature, Point
# read in original data
csv = pd.read_csv("versaille_stock.csv", sep="\t")
# fetch properties, remove Long and Lat
props = list(csv.columns.values)
props = [p for p in props if p not in ["Longitude",
... | import pandas as pd
import geojson
from geojson import FeatureCollection, Feature, Point
# read in original data
csv = pd.read_csv("versaille_stock.csv", sep="\t")
# fetch properties, remove Long and Lat
props = list(csv.columns.values)
props = [p for p in props if p not in ["Longitude",
... | Correct the order of coordinates. | Correct the order of coordinates.
Geojson expects lon, lat.
| Python | apache-2.0 | mkuzak/atmap | import pandas as pd
import geojson
from geojson import FeatureCollection, Feature, Point
# read in original data
csv = pd.read_csv("versaille_stock.csv", sep="\t")
# fetch properties, remove Long and Lat
props = list(csv.columns.values)
props = [p for p in props if p not in ["Longitude",
... | import pandas as pd
import geojson
from geojson import FeatureCollection, Feature, Point
# read in original data
csv = pd.read_csv("versaille_stock.csv", sep="\t")
# fetch properties, remove Long and Lat
props = list(csv.columns.values)
props = [p for p in props if p not in ["Longitude",
... | <commit_before>import pandas as pd
import geojson
from geojson import FeatureCollection, Feature, Point
# read in original data
csv = pd.read_csv("versaille_stock.csv", sep="\t")
# fetch properties, remove Long and Lat
props = list(csv.columns.values)
props = [p for p in props if p not in ["Longitude",
... | import pandas as pd
import geojson
from geojson import FeatureCollection, Feature, Point
# read in original data
csv = pd.read_csv("versaille_stock.csv", sep="\t")
# fetch properties, remove Long and Lat
props = list(csv.columns.values)
props = [p for p in props if p not in ["Longitude",
... | import pandas as pd
import geojson
from geojson import FeatureCollection, Feature, Point
# read in original data
csv = pd.read_csv("versaille_stock.csv", sep="\t")
# fetch properties, remove Long and Lat
props = list(csv.columns.values)
props = [p for p in props if p not in ["Longitude",
... | <commit_before>import pandas as pd
import geojson
from geojson import FeatureCollection, Feature, Point
# read in original data
csv = pd.read_csv("versaille_stock.csv", sep="\t")
# fetch properties, remove Long and Lat
props = list(csv.columns.values)
props = [p for p in props if p not in ["Longitude",
... |
29ffe1df88927aa568d3e86b07e372e5ba589310 | indra/sources/eidos/server.py | indra/sources/eidos/server.py | """This is a Python-based web server that can be run to
read with Eidos. To run the server, do
python -m indra.sources.eidos.server
and then submit POST requests to the `localhost:5000/process_text` endpoint
with JSON content as `{'text': 'text to read'}`. The response will be the
Eidos JSON-LD output.
"""
impor... | """This is a Python-based web server that can be run to
read with Eidos. To run the server, do
python -m indra.sources.eidos.server
and then submit POST requests to the `localhost:5000/process_text` endpoint
with JSON content as `{'text': 'text to read'}`. The response will be the
Eidos JSON-LD output.
"""
impor... | Allow one or multiple texts to reground | Allow one or multiple texts to reground
| Python | bsd-2-clause | sorgerlab/belpy,johnbachman/indra,bgyori/indra,johnbachman/belpy,bgyori/indra,johnbachman/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/belpy,bgyori/indra,sorgerlab/belpy,sorgerlab/indra | """This is a Python-based web server that can be run to
read with Eidos. To run the server, do
python -m indra.sources.eidos.server
and then submit POST requests to the `localhost:5000/process_text` endpoint
with JSON content as `{'text': 'text to read'}`. The response will be the
Eidos JSON-LD output.
"""
impor... | """This is a Python-based web server that can be run to
read with Eidos. To run the server, do
python -m indra.sources.eidos.server
and then submit POST requests to the `localhost:5000/process_text` endpoint
with JSON content as `{'text': 'text to read'}`. The response will be the
Eidos JSON-LD output.
"""
impor... | <commit_before>"""This is a Python-based web server that can be run to
read with Eidos. To run the server, do
python -m indra.sources.eidos.server
and then submit POST requests to the `localhost:5000/process_text` endpoint
with JSON content as `{'text': 'text to read'}`. The response will be the
Eidos JSON-LD out... | """This is a Python-based web server that can be run to
read with Eidos. To run the server, do
python -m indra.sources.eidos.server
and then submit POST requests to the `localhost:5000/process_text` endpoint
with JSON content as `{'text': 'text to read'}`. The response will be the
Eidos JSON-LD output.
"""
impor... | """This is a Python-based web server that can be run to
read with Eidos. To run the server, do
python -m indra.sources.eidos.server
and then submit POST requests to the `localhost:5000/process_text` endpoint
with JSON content as `{'text': 'text to read'}`. The response will be the
Eidos JSON-LD output.
"""
impor... | <commit_before>"""This is a Python-based web server that can be run to
read with Eidos. To run the server, do
python -m indra.sources.eidos.server
and then submit POST requests to the `localhost:5000/process_text` endpoint
with JSON content as `{'text': 'text to read'}`. The response will be the
Eidos JSON-LD out... |
46b60e3bb2b84685e27035a270e8ae81551f3f72 | silver/management/commands/generate_docs.py | silver/management/commands/generate_docs.py | from optparse import make_option
from datetime import datetime as dt
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
from dateutil.relativedelta import *
from silver.documents_generator import DocumentsGenerator
from silver.models import Subscr... | from optparse import make_option
from datetime import datetime as dt
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
from dateutil.relativedelta import *
from silver.documents_generator import DocumentsGenerator
from silver.models import Subscr... | Add language code in the command | Add language code in the command
| Python | apache-2.0 | PressLabs/silver,PressLabs/silver,PressLabs/silver | from optparse import make_option
from datetime import datetime as dt
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
from dateutil.relativedelta import *
from silver.documents_generator import DocumentsGenerator
from silver.models import Subscr... | from optparse import make_option
from datetime import datetime as dt
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
from dateutil.relativedelta import *
from silver.documents_generator import DocumentsGenerator
from silver.models import Subscr... | <commit_before>from optparse import make_option
from datetime import datetime as dt
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
from dateutil.relativedelta import *
from silver.documents_generator import DocumentsGenerator
from silver.model... | from optparse import make_option
from datetime import datetime as dt
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
from dateutil.relativedelta import *
from silver.documents_generator import DocumentsGenerator
from silver.models import Subscr... | from optparse import make_option
from datetime import datetime as dt
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
from dateutil.relativedelta import *
from silver.documents_generator import DocumentsGenerator
from silver.models import Subscr... | <commit_before>from optparse import make_option
from datetime import datetime as dt
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
from dateutil.relativedelta import *
from silver.documents_generator import DocumentsGenerator
from silver.model... |
13be198c8aec08f5738eecbb7da2bfdcafd57a48 | pygraphc/clustering/MaxCliquesPercolationSA.py | pygraphc/clustering/MaxCliquesPercolationSA.py | from MaxCliquesPercolation import MaxCliquesPercolationWeighted
class MaxCliquesPercolationSA(MaxCliquesPercolationWeighted):
def __init__(self, graph, edges_weight, nodes_id, k, threshold):
super(MaxCliquesPercolationSA, self).__init__(graph, edges_weight, nodes_id, k, threshold)
def get_maxcliques_... | from MaxCliquesPercolation import MaxCliquesPercolationWeighted
from pygraphc.optimization.SimulatedAnnealing import SimulatedAnnealing
from numpy import linspace
class MaxCliquesPercolationSA(MaxCliquesPercolationWeighted):
def __init__(self, graph, edges_weight, nodes_id, k, threshold, tmin, tmax, alpha, energy... | Add constructor and get method with SA | Add constructor and get method with SA
| Python | mit | studiawan/pygraphc | from MaxCliquesPercolation import MaxCliquesPercolationWeighted
class MaxCliquesPercolationSA(MaxCliquesPercolationWeighted):
def __init__(self, graph, edges_weight, nodes_id, k, threshold):
super(MaxCliquesPercolationSA, self).__init__(graph, edges_weight, nodes_id, k, threshold)
def get_maxcliques_... | from MaxCliquesPercolation import MaxCliquesPercolationWeighted
from pygraphc.optimization.SimulatedAnnealing import SimulatedAnnealing
from numpy import linspace
class MaxCliquesPercolationSA(MaxCliquesPercolationWeighted):
def __init__(self, graph, edges_weight, nodes_id, k, threshold, tmin, tmax, alpha, energy... | <commit_before>from MaxCliquesPercolation import MaxCliquesPercolationWeighted
class MaxCliquesPercolationSA(MaxCliquesPercolationWeighted):
def __init__(self, graph, edges_weight, nodes_id, k, threshold):
super(MaxCliquesPercolationSA, self).__init__(graph, edges_weight, nodes_id, k, threshold)
def ... | from MaxCliquesPercolation import MaxCliquesPercolationWeighted
from pygraphc.optimization.SimulatedAnnealing import SimulatedAnnealing
from numpy import linspace
class MaxCliquesPercolationSA(MaxCliquesPercolationWeighted):
def __init__(self, graph, edges_weight, nodes_id, k, threshold, tmin, tmax, alpha, energy... | from MaxCliquesPercolation import MaxCliquesPercolationWeighted
class MaxCliquesPercolationSA(MaxCliquesPercolationWeighted):
def __init__(self, graph, edges_weight, nodes_id, k, threshold):
super(MaxCliquesPercolationSA, self).__init__(graph, edges_weight, nodes_id, k, threshold)
def get_maxcliques_... | <commit_before>from MaxCliquesPercolation import MaxCliquesPercolationWeighted
class MaxCliquesPercolationSA(MaxCliquesPercolationWeighted):
def __init__(self, graph, edges_weight, nodes_id, k, threshold):
super(MaxCliquesPercolationSA, self).__init__(graph, edges_weight, nodes_id, k, threshold)
def ... |
33309df85823bde19fcdd2b21b73db9f1da131ab | requests_oauthlib/compliance_fixes/facebook.py | requests_oauthlib/compliance_fixes/facebook.py | from json import dumps
from oauthlib.common import urldecode
from urlparse import parse_qsl
def facebook_compliance_fix(session):
def _compliance_fix(r):
# if Facebook claims to be sending us json, let's trust them.
if 'application/json' in r.headers['content-type']:
return r
... | from json import dumps
try:
from urlparse import parse_qsl
except ImportError:
from urllib.parse import parse_qsl
def facebook_compliance_fix(session):
def _compliance_fix(r):
# if Facebook claims to be sending us json, let's trust them.
if 'application/json' in r.headers['content-type']:... | Remove unused import. Facebook compliance support python3 | Remove unused import. Facebook compliance support python3
| Python | isc | abhi931375/requests-oauthlib,gras100/asks-oauthlib,requests/requests-oauthlib,singingwolfboy/requests-oauthlib,jayvdb/requests-oauthlib,lucidbard/requests-oauthlib,dongguangming/requests-oauthlib,jsfan/requests-oauthlib,jayvdb/requests-oauthlib,sigmavirus24/requests-oauthlib,elafarge/requests-oauthlib | from json import dumps
from oauthlib.common import urldecode
from urlparse import parse_qsl
def facebook_compliance_fix(session):
def _compliance_fix(r):
# if Facebook claims to be sending us json, let's trust them.
if 'application/json' in r.headers['content-type']:
return r
... | from json import dumps
try:
from urlparse import parse_qsl
except ImportError:
from urllib.parse import parse_qsl
def facebook_compliance_fix(session):
def _compliance_fix(r):
# if Facebook claims to be sending us json, let's trust them.
if 'application/json' in r.headers['content-type']:... | <commit_before>from json import dumps
from oauthlib.common import urldecode
from urlparse import parse_qsl
def facebook_compliance_fix(session):
def _compliance_fix(r):
# if Facebook claims to be sending us json, let's trust them.
if 'application/json' in r.headers['content-type']:
re... | from json import dumps
try:
from urlparse import parse_qsl
except ImportError:
from urllib.parse import parse_qsl
def facebook_compliance_fix(session):
def _compliance_fix(r):
# if Facebook claims to be sending us json, let's trust them.
if 'application/json' in r.headers['content-type']:... | from json import dumps
from oauthlib.common import urldecode
from urlparse import parse_qsl
def facebook_compliance_fix(session):
def _compliance_fix(r):
# if Facebook claims to be sending us json, let's trust them.
if 'application/json' in r.headers['content-type']:
return r
... | <commit_before>from json import dumps
from oauthlib.common import urldecode
from urlparse import parse_qsl
def facebook_compliance_fix(session):
def _compliance_fix(r):
# if Facebook claims to be sending us json, let's trust them.
if 'application/json' in r.headers['content-type']:
re... |
60a9ace22f219f7b125b3a618090c4dd36cded4c | api/base/exceptions.py | api/base/exceptions.py |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array
"""
from rest_framework.views import exception_handler
response = exception_handler(exc, context)
... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array
"""
from rest_framework.views import exception_handler
response = exception_handler(exc, context)
... | Add additional error detail to cover other circumstances that intend to throw 401 | Add additional error detail to cover other circumstances that intend to throw 401
| Python | apache-2.0 | abought/osf.io,mfraezz/osf.io,rdhyee/osf.io,GageGaskins/osf.io,TomHeatwole/osf.io,Ghalko/osf.io,pattisdr/osf.io,HalcyonChimera/osf.io,billyhunt/osf.io,brianjgeiger/osf.io,cosenal/osf.io,danielneis/osf.io,caseyrygt/osf.io,haoyuchen1992/osf.io,cslzchen/osf.io,acshi/osf.io,emetsger/osf.io,Nesiehr/osf.io,samanehsan/osf.io,... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array
"""
from rest_framework.views import exception_handler
response = exception_handler(exc, context)
... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array
"""
from rest_framework.views import exception_handler
response = exception_handler(exc, context)
... | <commit_before>
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array
"""
from rest_framework.views import exception_handler
response = exception_handler... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array
"""
from rest_framework.views import exception_handler
response = exception_handler(exc, context)
... |
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array
"""
from rest_framework.views import exception_handler
response = exception_handler(exc, context)
... | <commit_before>
from rest_framework import status
from rest_framework.exceptions import APIException
def json_api_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array
"""
from rest_framework.views import exception_handler
response = exception_handler... |
18d06379a2dd89ef3d8db0d045f563b8f38f57db | badgekit_webhooks/urls.py | badgekit_webhooks/urls.py | from __future__ import unicode_literals
from django.conf.urls import patterns, url
from . import views
from django.contrib.admin.views.decorators import staff_member_required
urlpatterns = patterns(
"",
url(r"^hello/$", "badgekit_webhooks.views.hello", name="badgekit_webhooks_hello"),
url(r"^issued/$", "b... | from __future__ import unicode_literals
from django.conf.urls import patterns, url
from . import views
from django.contrib.admin.views.decorators import staff_member_required
urlpatterns = patterns(
"",
url(r"^hello/$", "badgekit_webhooks.views.hello", name="badgekit_webhooks_hello"),
url(r"^issued/$", "b... | Mark instance list as staff-only, and give it a view name | Mark instance list as staff-only, and give it a view name
| Python | mit | tgs/django-badgekit-webhooks | from __future__ import unicode_literals
from django.conf.urls import patterns, url
from . import views
from django.contrib.admin.views.decorators import staff_member_required
urlpatterns = patterns(
"",
url(r"^hello/$", "badgekit_webhooks.views.hello", name="badgekit_webhooks_hello"),
url(r"^issued/$", "b... | from __future__ import unicode_literals
from django.conf.urls import patterns, url
from . import views
from django.contrib.admin.views.decorators import staff_member_required
urlpatterns = patterns(
"",
url(r"^hello/$", "badgekit_webhooks.views.hello", name="badgekit_webhooks_hello"),
url(r"^issued/$", "b... | <commit_before>from __future__ import unicode_literals
from django.conf.urls import patterns, url
from . import views
from django.contrib.admin.views.decorators import staff_member_required
urlpatterns = patterns(
"",
url(r"^hello/$", "badgekit_webhooks.views.hello", name="badgekit_webhooks_hello"),
url(r... | from __future__ import unicode_literals
from django.conf.urls import patterns, url
from . import views
from django.contrib.admin.views.decorators import staff_member_required
urlpatterns = patterns(
"",
url(r"^hello/$", "badgekit_webhooks.views.hello", name="badgekit_webhooks_hello"),
url(r"^issued/$", "b... | from __future__ import unicode_literals
from django.conf.urls import patterns, url
from . import views
from django.contrib.admin.views.decorators import staff_member_required
urlpatterns = patterns(
"",
url(r"^hello/$", "badgekit_webhooks.views.hello", name="badgekit_webhooks_hello"),
url(r"^issued/$", "b... | <commit_before>from __future__ import unicode_literals
from django.conf.urls import patterns, url
from . import views
from django.contrib.admin.views.decorators import staff_member_required
urlpatterns = patterns(
"",
url(r"^hello/$", "badgekit_webhooks.views.hello", name="badgekit_webhooks_hello"),
url(r... |
fb15b0735a8d2710baa33ac4e74d1dc88de209bc | suplemon/lexer.py | suplemon/lexer.py | # -*- encoding: utf-8
import pygments
import pygments.lexers
class Lexer:
def __init__(self, app):
self.app = app
def lex(self, code, lex):
"""Return tokenified code.
Return a list of tuples (scope, word) where word is the word to be
printed and scope the scope name represen... | # -*- encoding: utf-8
import pygments
import pygments.lexers
class Lexer:
def __init__(self, app):
self.app = app
def lex(self, code, lex):
"""Return tokenified code.
Return a list of tuples (scope, word) where word is the word to be
printed and scope the scope name represen... | Make sure that Lexer.lex() returns str instead of bytes | Make sure that Lexer.lex() returns str instead of bytes
| Python | mit | twolfson/suplemon,richrd/suplemon,richrd/suplemon,severin31/suplemon,twolfson/suplemon,trylle/suplemon | # -*- encoding: utf-8
import pygments
import pygments.lexers
class Lexer:
def __init__(self, app):
self.app = app
def lex(self, code, lex):
"""Return tokenified code.
Return a list of tuples (scope, word) where word is the word to be
printed and scope the scope name represen... | # -*- encoding: utf-8
import pygments
import pygments.lexers
class Lexer:
def __init__(self, app):
self.app = app
def lex(self, code, lex):
"""Return tokenified code.
Return a list of tuples (scope, word) where word is the word to be
printed and scope the scope name represen... | <commit_before># -*- encoding: utf-8
import pygments
import pygments.lexers
class Lexer:
def __init__(self, app):
self.app = app
def lex(self, code, lex):
"""Return tokenified code.
Return a list of tuples (scope, word) where word is the word to be
printed and scope the scop... | # -*- encoding: utf-8
import pygments
import pygments.lexers
class Lexer:
def __init__(self, app):
self.app = app
def lex(self, code, lex):
"""Return tokenified code.
Return a list of tuples (scope, word) where word is the word to be
printed and scope the scope name represen... | # -*- encoding: utf-8
import pygments
import pygments.lexers
class Lexer:
def __init__(self, app):
self.app = app
def lex(self, code, lex):
"""Return tokenified code.
Return a list of tuples (scope, word) where word is the word to be
printed and scope the scope name represen... | <commit_before># -*- encoding: utf-8
import pygments
import pygments.lexers
class Lexer:
def __init__(self, app):
self.app = app
def lex(self, code, lex):
"""Return tokenified code.
Return a list of tuples (scope, word) where word is the word to be
printed and scope the scop... |
85d6a10891e8c8c3f800a28db28a8d6a1c5684be | src/texas_choropleth/settings/production.py | src/texas_choropleth/settings/production.py | from .base import *
# Debug Settings
DEBUG = False
TEMPLATE_DEBUG = False
# Media Settings
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# Staticfile Setttings
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATIC_ROOT = os.path.join(BASE_DIR, 'static_final')
# TMP Dir for Choropleth Screenshots
IMA... | from .base import *
# Debug Settings
DEBUG = False
TEMPLATE_DEBUG = False
# Media Settings
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# Staticfile Setttings
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATIC_ROOT = os.path.join(BASE_DIR, 'static_final')
# TMP Dir for Choropleth Screenshots
IMA... | Use the get_secret function to grab the database configuration. | Use the get_secret function to grab the database configuration.
git-svn-id: d73fdb991549f9d1a0affa567d55bb0fdbd453f3@8412 f04a3889-0f81-4131-97fb-bc517d1f583d
| Python | bsd-3-clause | unt-libraries/texas-choropleth,unt-libraries/texas-choropleth,damonkelley/texas-choropleth,damonkelley/texas-choropleth,unt-libraries/texas-choropleth,damonkelley/texas-choropleth,damonkelley/texas-choropleth,unt-libraries/texas-choropleth | from .base import *
# Debug Settings
DEBUG = False
TEMPLATE_DEBUG = False
# Media Settings
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# Staticfile Setttings
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATIC_ROOT = os.path.join(BASE_DIR, 'static_final')
# TMP Dir for Choropleth Screenshots
IMA... | from .base import *
# Debug Settings
DEBUG = False
TEMPLATE_DEBUG = False
# Media Settings
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# Staticfile Setttings
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATIC_ROOT = os.path.join(BASE_DIR, 'static_final')
# TMP Dir for Choropleth Screenshots
IMA... | <commit_before>from .base import *
# Debug Settings
DEBUG = False
TEMPLATE_DEBUG = False
# Media Settings
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# Staticfile Setttings
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATIC_ROOT = os.path.join(BASE_DIR, 'static_final')
# TMP Dir for Choropleth ... | from .base import *
# Debug Settings
DEBUG = False
TEMPLATE_DEBUG = False
# Media Settings
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# Staticfile Setttings
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATIC_ROOT = os.path.join(BASE_DIR, 'static_final')
# TMP Dir for Choropleth Screenshots
IMA... | from .base import *
# Debug Settings
DEBUG = False
TEMPLATE_DEBUG = False
# Media Settings
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# Staticfile Setttings
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATIC_ROOT = os.path.join(BASE_DIR, 'static_final')
# TMP Dir for Choropleth Screenshots
IMA... | <commit_before>from .base import *
# Debug Settings
DEBUG = False
TEMPLATE_DEBUG = False
# Media Settings
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# Staticfile Setttings
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATIC_ROOT = os.path.join(BASE_DIR, 'static_final')
# TMP Dir for Choropleth ... |
d8247d43c8026a8de39b09856a3f7beb235dc4f6 | antxetamedia/multimedia/handlers.py | antxetamedia/multimedia/handlers.py | from boto.s3.connection import S3Connection
from boto.exception import S3ResponseError
from django.conf import settings
def upload(user, passwd, bucket, metadata, key, fd):
conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False)
while bucket.endswith('-'):
bucket = bucket[:-1]
t... | from boto.s3.connection import S3Connection
from boto.s3.bucket import Bucket
from boto.exception import S3ResponseError, S3CreateError
from django.conf import settings
def upload(user, passwd, bucket, metadata, key, fd):
conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False)
while bucket... | Handle the case where the bucket already exists | Handle the case where the bucket already exists
| Python | agpl-3.0 | GISAElkartea/antxetamedia,GISAElkartea/antxetamedia,GISAElkartea/antxetamedia | from boto.s3.connection import S3Connection
from boto.exception import S3ResponseError
from django.conf import settings
def upload(user, passwd, bucket, metadata, key, fd):
conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False)
while bucket.endswith('-'):
bucket = bucket[:-1]
t... | from boto.s3.connection import S3Connection
from boto.s3.bucket import Bucket
from boto.exception import S3ResponseError, S3CreateError
from django.conf import settings
def upload(user, passwd, bucket, metadata, key, fd):
conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False)
while bucket... | <commit_before>from boto.s3.connection import S3Connection
from boto.exception import S3ResponseError
from django.conf import settings
def upload(user, passwd, bucket, metadata, key, fd):
conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False)
while bucket.endswith('-'):
bucket = bu... | from boto.s3.connection import S3Connection
from boto.s3.bucket import Bucket
from boto.exception import S3ResponseError, S3CreateError
from django.conf import settings
def upload(user, passwd, bucket, metadata, key, fd):
conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False)
while bucket... | from boto.s3.connection import S3Connection
from boto.exception import S3ResponseError
from django.conf import settings
def upload(user, passwd, bucket, metadata, key, fd):
conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False)
while bucket.endswith('-'):
bucket = bucket[:-1]
t... | <commit_before>from boto.s3.connection import S3Connection
from boto.exception import S3ResponseError
from django.conf import settings
def upload(user, passwd, bucket, metadata, key, fd):
conn = S3Connection(user, passwd, host=settings.S3_HOST, is_secure=False)
while bucket.endswith('-'):
bucket = bu... |
2da190d0a6b6f8b6acc70b7e2b6e903283a1e735 | taggit_bootstrap/widgets.py | taggit_bootstrap/widgets.py | from django import forms
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.forms.util import flatatt
from django.utils.encoding import force_text
from taggit.utils import parse_tags, edit_string_for_tags
from django.utils import six
class TagsInput(forms.Tex... | from django import forms
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.forms.utils import flatatt
from django.utils.encoding import force_text
from taggit.utils import parse_tags, edit_string_for_tags
from django.utils import six
class TagsInput(forms.Te... | Update the django path to flatatt module | Update the django path to flatatt module | Python | mit | mi6gan/django-taggit-bootstrap,mi6gan/django-taggit-bootstrap | from django import forms
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.forms.util import flatatt
from django.utils.encoding import force_text
from taggit.utils import parse_tags, edit_string_for_tags
from django.utils import six
class TagsInput(forms.Tex... | from django import forms
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.forms.utils import flatatt
from django.utils.encoding import force_text
from taggit.utils import parse_tags, edit_string_for_tags
from django.utils import six
class TagsInput(forms.Te... | <commit_before>from django import forms
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.forms.util import flatatt
from django.utils.encoding import force_text
from taggit.utils import parse_tags, edit_string_for_tags
from django.utils import six
class Tags... | from django import forms
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.forms.utils import flatatt
from django.utils.encoding import force_text
from taggit.utils import parse_tags, edit_string_for_tags
from django.utils import six
class TagsInput(forms.Te... | from django import forms
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.forms.util import flatatt
from django.utils.encoding import force_text
from taggit.utils import parse_tags, edit_string_for_tags
from django.utils import six
class TagsInput(forms.Tex... | <commit_before>from django import forms
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.forms.util import flatatt
from django.utils.encoding import force_text
from taggit.utils import parse_tags, edit_string_for_tags
from django.utils import six
class Tags... |
e61bd9a56b31dde461ad0cb82e3140bd0dbfa958 | ckanext/tayside/logic/action/update.py | ckanext/tayside/logic/action/update.py | from ckan.logic.action import update as update_core
import ckan.lib.uploader as uploader
def config_option_update(context, data_dict):
upload = uploader.get_uploader('admin')
upload.update_data_dict(data_dict, 'hero_image_url', 'hero_image_upload',
'clear_hero_image_upload')
up... | from ckan.logic.action import update as update_core
import ckan.lib.uploader as uploader
def config_option_update(context, data_dict):
upload = uploader.get_uploader('admin')
upload.update_data_dict(data_dict, 'hero_image_url', 'hero_image_upload',
'clear_hero_image_upload')
... | Fix bug for saving images in config | Fix bug for saving images in config
| Python | agpl-3.0 | ViderumGlobal/ckanext-tayside,ViderumGlobal/ckanext-tayside,ViderumGlobal/ckanext-tayside,ViderumGlobal/ckanext-tayside | from ckan.logic.action import update as update_core
import ckan.lib.uploader as uploader
def config_option_update(context, data_dict):
upload = uploader.get_uploader('admin')
upload.update_data_dict(data_dict, 'hero_image_url', 'hero_image_upload',
'clear_hero_image_upload')
up... | from ckan.logic.action import update as update_core
import ckan.lib.uploader as uploader
def config_option_update(context, data_dict):
upload = uploader.get_uploader('admin')
upload.update_data_dict(data_dict, 'hero_image_url', 'hero_image_upload',
'clear_hero_image_upload')
... | <commit_before>from ckan.logic.action import update as update_core
import ckan.lib.uploader as uploader
def config_option_update(context, data_dict):
upload = uploader.get_uploader('admin')
upload.update_data_dict(data_dict, 'hero_image_url', 'hero_image_upload',
'clear_hero_image_... | from ckan.logic.action import update as update_core
import ckan.lib.uploader as uploader
def config_option_update(context, data_dict):
upload = uploader.get_uploader('admin')
upload.update_data_dict(data_dict, 'hero_image_url', 'hero_image_upload',
'clear_hero_image_upload')
... | from ckan.logic.action import update as update_core
import ckan.lib.uploader as uploader
def config_option_update(context, data_dict):
upload = uploader.get_uploader('admin')
upload.update_data_dict(data_dict, 'hero_image_url', 'hero_image_upload',
'clear_hero_image_upload')
up... | <commit_before>from ckan.logic.action import update as update_core
import ckan.lib.uploader as uploader
def config_option_update(context, data_dict):
upload = uploader.get_uploader('admin')
upload.update_data_dict(data_dict, 'hero_image_url', 'hero_image_upload',
'clear_hero_image_... |
b0fd983269fca4c514a8a21d0bb17d47d46780c3 | system_maintenance/tests/functional/base.py | system_maintenance/tests/functional/base.py | from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from system_maintenance.tests.utilities import populate_test_db
class FunctionalTest(StaticLiveServerTestCase):
def setUp(self):
populate_test_db()
... | from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from system_maintenance.tests.utilities import populate_test_db
class FunctionalTest(StaticLiveServerTestCase):
def setUp(self):
populate_test_db()
... | Make functional testing compatible with selenium 3.141.0 | Make functional testing compatible with selenium 3.141.0
| Python | bsd-3-clause | mfcovington/django-system-maintenance,mfcovington/django-system-maintenance,mfcovington/django-system-maintenance | from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from system_maintenance.tests.utilities import populate_test_db
class FunctionalTest(StaticLiveServerTestCase):
def setUp(self):
populate_test_db()
... | from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from system_maintenance.tests.utilities import populate_test_db
class FunctionalTest(StaticLiveServerTestCase):
def setUp(self):
populate_test_db()
... | <commit_before>from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from system_maintenance.tests.utilities import populate_test_db
class FunctionalTest(StaticLiveServerTestCase):
def setUp(self):
populate... | from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from system_maintenance.tests.utilities import populate_test_db
class FunctionalTest(StaticLiveServerTestCase):
def setUp(self):
populate_test_db()
... | from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from system_maintenance.tests.utilities import populate_test_db
class FunctionalTest(StaticLiveServerTestCase):
def setUp(self):
populate_test_db()
... | <commit_before>from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from system_maintenance.tests.utilities import populate_test_db
class FunctionalTest(StaticLiveServerTestCase):
def setUp(self):
populate... |
1ec98e066eda1faa212816abf1de99c4ed87f8a0 | mysite/multitenancy/models.py | mysite/multitenancy/models.py | import os
from django.conf import settings
from django.db import models
from . import tenant
if 'DJANGO_TENANT' in os.environ:
tenant._set_for_tenant(os.environ['DJANGO_TENANT'])
else:
tenant._set_default()
tenant._patch_table_names()
class Tenant(models.Model):
user = models.OneToOneField(setting... | import os
from django.conf import settings
from django.db import models
from . import tenant
if 'DJANGO_TENANT' in os.environ:
tenant._set_for_tenant(os.environ['DJANGO_TENANT'])
else:
tenant._set_default()
tenant._patch_table_names()
class Tenant(models.Model):
user = models.OneToOneField(setting... | Make network name and slug unique | Make network name and slug unique
| Python | bsd-3-clause | Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto,Kvoti/ditto | import os
from django.conf import settings
from django.db import models
from . import tenant
if 'DJANGO_TENANT' in os.environ:
tenant._set_for_tenant(os.environ['DJANGO_TENANT'])
else:
tenant._set_default()
tenant._patch_table_names()
class Tenant(models.Model):
user = models.OneToOneField(setting... | import os
from django.conf import settings
from django.db import models
from . import tenant
if 'DJANGO_TENANT' in os.environ:
tenant._set_for_tenant(os.environ['DJANGO_TENANT'])
else:
tenant._set_default()
tenant._patch_table_names()
class Tenant(models.Model):
user = models.OneToOneField(setting... | <commit_before>import os
from django.conf import settings
from django.db import models
from . import tenant
if 'DJANGO_TENANT' in os.environ:
tenant._set_for_tenant(os.environ['DJANGO_TENANT'])
else:
tenant._set_default()
tenant._patch_table_names()
class Tenant(models.Model):
user = models.OneToO... | import os
from django.conf import settings
from django.db import models
from . import tenant
if 'DJANGO_TENANT' in os.environ:
tenant._set_for_tenant(os.environ['DJANGO_TENANT'])
else:
tenant._set_default()
tenant._patch_table_names()
class Tenant(models.Model):
user = models.OneToOneField(setting... | import os
from django.conf import settings
from django.db import models
from . import tenant
if 'DJANGO_TENANT' in os.environ:
tenant._set_for_tenant(os.environ['DJANGO_TENANT'])
else:
tenant._set_default()
tenant._patch_table_names()
class Tenant(models.Model):
user = models.OneToOneField(setting... | <commit_before>import os
from django.conf import settings
from django.db import models
from . import tenant
if 'DJANGO_TENANT' in os.environ:
tenant._set_for_tenant(os.environ['DJANGO_TENANT'])
else:
tenant._set_default()
tenant._patch_table_names()
class Tenant(models.Model):
user = models.OneToO... |
7408862af1a6dc618e9dd78ece2120533466ab75 | test/settings/gyptest-settings.py | test/settings/gyptest-settings.py | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('settings.gyp')
test.build('test.gyp', test.AL... | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
# 'settings' is only supported for make and scons (and will be removed there as
# we... | Make new settings test not run for xcode generator. | Make new settings test not run for xcode generator.
TBR=evan
Review URL: http://codereview.chromium.org/7472006
| Python | bsd-3-clause | csulmone/gyp,csulmone/gyp,csulmone/gyp,csulmone/gyp | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('settings.gyp')
test.build('test.gyp', test.AL... | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
# 'settings' is only supported for make and scons (and will be removed there as
# we... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('settings.gyp')
test.build('tes... | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
# 'settings' is only supported for make and scons (and will be removed there as
# we... | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('settings.gyp')
test.build('test.gyp', test.AL... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Smoke-tests 'settings' blocks.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('settings.gyp')
test.build('tes... |
ff2def37816fbf1a8cf726914368036c0081e869 | tests/integration/shared.py | tests/integration/shared.py |
class ServiceTests(object):
def test_bash(self):
return self.check(
input='bc -q\n1+1\nquit()',
type='org.tyrion.service.bash',
output='2',
error='',
code='0',
)
def test_python(self):
return self.check(
input='pr... |
class ServiceTests(object):
def test_bash(self):
return self.check(
input='bc -q\n1+1\nquit()',
type='org.tyrion.service.bash',
output='2',
error='',
code='0',
)
def test_python(self):
return self.check(
input='pr... | Tweak integration timeout test to match gtest | Tweak integration timeout test to match gtest
| Python | mit | silas/tyrion,silas/tyrion,silas/tyrion,silas/tyrion,silas/tyrion |
class ServiceTests(object):
def test_bash(self):
return self.check(
input='bc -q\n1+1\nquit()',
type='org.tyrion.service.bash',
output='2',
error='',
code='0',
)
def test_python(self):
return self.check(
input='pr... |
class ServiceTests(object):
def test_bash(self):
return self.check(
input='bc -q\n1+1\nquit()',
type='org.tyrion.service.bash',
output='2',
error='',
code='0',
)
def test_python(self):
return self.check(
input='pr... | <commit_before>
class ServiceTests(object):
def test_bash(self):
return self.check(
input='bc -q\n1+1\nquit()',
type='org.tyrion.service.bash',
output='2',
error='',
code='0',
)
def test_python(self):
return self.check(
... |
class ServiceTests(object):
def test_bash(self):
return self.check(
input='bc -q\n1+1\nquit()',
type='org.tyrion.service.bash',
output='2',
error='',
code='0',
)
def test_python(self):
return self.check(
input='pr... |
class ServiceTests(object):
def test_bash(self):
return self.check(
input='bc -q\n1+1\nquit()',
type='org.tyrion.service.bash',
output='2',
error='',
code='0',
)
def test_python(self):
return self.check(
input='pr... | <commit_before>
class ServiceTests(object):
def test_bash(self):
return self.check(
input='bc -q\n1+1\nquit()',
type='org.tyrion.service.bash',
output='2',
error='',
code='0',
)
def test_python(self):
return self.check(
... |
9aaf3bd6c376f608911b232d5f811e0b7964022f | tests/django_mysql_tests/tests.py | tests/django_mysql_tests/tests.py | # -*- coding:utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from django.test import TestCase
from django_mysql_tests.models import MyModel
class SimpleTests(TestCase):
def test_simple(self):
MyModel.objects.create()
| # -*- coding:utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from django.test import TestCase
from django_mysql_tests.models import MyModel
class SimpleTests(TestCase):
def test_simple(self):
MyModel.objects.create()
def test_t... | Add second test, trying to trigger travis | Add second test, trying to trigger travis
| Python | mit | nickmeharry/django-mysql,nickmeharry/django-mysql,arnau126/django-mysql,adamchainz/django-mysql,arnau126/django-mysql,graingert/django-mysql,graingert/django-mysql | # -*- coding:utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from django.test import TestCase
from django_mysql_tests.models import MyModel
class SimpleTests(TestCase):
def test_simple(self):
MyModel.objects.create()
Add second test... | # -*- coding:utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from django.test import TestCase
from django_mysql_tests.models import MyModel
class SimpleTests(TestCase):
def test_simple(self):
MyModel.objects.create()
def test_t... | <commit_before># -*- coding:utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from django.test import TestCase
from django_mysql_tests.models import MyModel
class SimpleTests(TestCase):
def test_simple(self):
MyModel.objects.create()
... | # -*- coding:utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from django.test import TestCase
from django_mysql_tests.models import MyModel
class SimpleTests(TestCase):
def test_simple(self):
MyModel.objects.create()
def test_t... | # -*- coding:utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from django.test import TestCase
from django_mysql_tests.models import MyModel
class SimpleTests(TestCase):
def test_simple(self):
MyModel.objects.create()
Add second test... | <commit_before># -*- coding:utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from django.test import TestCase
from django_mysql_tests.models import MyModel
class SimpleTests(TestCase):
def test_simple(self):
MyModel.objects.create()
... |
b0dd95950058d174e50589ceeb18c6a0e2a16ec8 | docs/source/_static/export_all_data.py | docs/source/_static/export_all_data.py | #!/usr/bin/env python
"""export_all_data.py - script for exporting all available data"""
import os
from collectionbatchtool import *
def export_all_data(output_dir=None):
"""
Export table data to CSV files.
Parameters
----------
output_dir : str
Path to the output directory.
"""
... | #!/usr/bin/env python
"""export_all_data.py - script for exporting all available data"""
import os
from collectionbatchtool import *
def export_all_data(output_dir=None, quiet=True):
"""
Export table data to CSV files.
Parameters
----------
output_dir : str
Path to the output directory.... | Add parameter "quiet" to export function | Add parameter "quiet" to export function
| Python | mit | jmenglund/CollectionBatchTool | #!/usr/bin/env python
"""export_all_data.py - script for exporting all available data"""
import os
from collectionbatchtool import *
def export_all_data(output_dir=None):
"""
Export table data to CSV files.
Parameters
----------
output_dir : str
Path to the output directory.
"""
... | #!/usr/bin/env python
"""export_all_data.py - script for exporting all available data"""
import os
from collectionbatchtool import *
def export_all_data(output_dir=None, quiet=True):
"""
Export table data to CSV files.
Parameters
----------
output_dir : str
Path to the output directory.... | <commit_before>#!/usr/bin/env python
"""export_all_data.py - script for exporting all available data"""
import os
from collectionbatchtool import *
def export_all_data(output_dir=None):
"""
Export table data to CSV files.
Parameters
----------
output_dir : str
Path to the output directo... | #!/usr/bin/env python
"""export_all_data.py - script for exporting all available data"""
import os
from collectionbatchtool import *
def export_all_data(output_dir=None, quiet=True):
"""
Export table data to CSV files.
Parameters
----------
output_dir : str
Path to the output directory.... | #!/usr/bin/env python
"""export_all_data.py - script for exporting all available data"""
import os
from collectionbatchtool import *
def export_all_data(output_dir=None):
"""
Export table data to CSV files.
Parameters
----------
output_dir : str
Path to the output directory.
"""
... | <commit_before>#!/usr/bin/env python
"""export_all_data.py - script for exporting all available data"""
import os
from collectionbatchtool import *
def export_all_data(output_dir=None):
"""
Export table data to CSV files.
Parameters
----------
output_dir : str
Path to the output directo... |
1a575129299985471c69cef083224f939c68052f | tests/test-empty-results.py | tests/test-empty-results.py | #!/usr/bin/env python
import unittest
import waybackpack
import sys, os
# via https://github.com/jsvine/waybackpack/issues/39
URL = "https://indianexpress.com/section/lifestyle/health/feed/"
class Test(unittest.TestCase):
def test_empty_result(self):
timestamps = waybackpack.search(URL, from_date = "2020... | #!/usr/bin/env python
import unittest
import waybackpack
import sys, os
# via https://github.com/jsvine/waybackpack/issues/39
URL = "https://indianexpress.com/section/lifestyle/health/feed/"
class Test(unittest.TestCase):
def test_empty_result(self):
timestamps = waybackpack.search(URL, from_date = "2080... | Update test (endpoint was no longer result-less) | Update test (endpoint was no longer result-less)
| Python | mit | jsvine/waybackpack | #!/usr/bin/env python
import unittest
import waybackpack
import sys, os
# via https://github.com/jsvine/waybackpack/issues/39
URL = "https://indianexpress.com/section/lifestyle/health/feed/"
class Test(unittest.TestCase):
def test_empty_result(self):
timestamps = waybackpack.search(URL, from_date = "2020... | #!/usr/bin/env python
import unittest
import waybackpack
import sys, os
# via https://github.com/jsvine/waybackpack/issues/39
URL = "https://indianexpress.com/section/lifestyle/health/feed/"
class Test(unittest.TestCase):
def test_empty_result(self):
timestamps = waybackpack.search(URL, from_date = "2080... | <commit_before>#!/usr/bin/env python
import unittest
import waybackpack
import sys, os
# via https://github.com/jsvine/waybackpack/issues/39
URL = "https://indianexpress.com/section/lifestyle/health/feed/"
class Test(unittest.TestCase):
def test_empty_result(self):
timestamps = waybackpack.search(URL, fr... | #!/usr/bin/env python
import unittest
import waybackpack
import sys, os
# via https://github.com/jsvine/waybackpack/issues/39
URL = "https://indianexpress.com/section/lifestyle/health/feed/"
class Test(unittest.TestCase):
def test_empty_result(self):
timestamps = waybackpack.search(URL, from_date = "2080... | #!/usr/bin/env python
import unittest
import waybackpack
import sys, os
# via https://github.com/jsvine/waybackpack/issues/39
URL = "https://indianexpress.com/section/lifestyle/health/feed/"
class Test(unittest.TestCase):
def test_empty_result(self):
timestamps = waybackpack.search(URL, from_date = "2020... | <commit_before>#!/usr/bin/env python
import unittest
import waybackpack
import sys, os
# via https://github.com/jsvine/waybackpack/issues/39
URL = "https://indianexpress.com/section/lifestyle/health/feed/"
class Test(unittest.TestCase):
def test_empty_result(self):
timestamps = waybackpack.search(URL, fr... |
3d027b8d4d39fcdbc839bd0e186ea225e1c7b976 | tests/__init__.py | tests/__init__.py | from .test_great_expectations import *
from .test_util import *
from .test_dataset import *
from .test_pandas_dataset import *
from tests.pandas.test_pandas_dataset_distributional_expectations import *
from .test_expectation_decorators import *
from .test_cli import *
| # from .test_great_expectations import *
# from .test_util import *
# from .test_dataset import *
# from .test_pandas_dataset import *
# from tests.pandas.test_pandas_dataset_distributional_expectations import *
# from .test_expectation_decorators import *
# from .test_cli import *
| Remove explicit import in tests module. | Remove explicit import in tests module.
| Python | apache-2.0 | great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations | from .test_great_expectations import *
from .test_util import *
from .test_dataset import *
from .test_pandas_dataset import *
from tests.pandas.test_pandas_dataset_distributional_expectations import *
from .test_expectation_decorators import *
from .test_cli import *
Remove explicit import in tests module. | # from .test_great_expectations import *
# from .test_util import *
# from .test_dataset import *
# from .test_pandas_dataset import *
# from tests.pandas.test_pandas_dataset_distributional_expectations import *
# from .test_expectation_decorators import *
# from .test_cli import *
| <commit_before>from .test_great_expectations import *
from .test_util import *
from .test_dataset import *
from .test_pandas_dataset import *
from tests.pandas.test_pandas_dataset_distributional_expectations import *
from .test_expectation_decorators import *
from .test_cli import *
<commit_msg>Remove explicit import i... | # from .test_great_expectations import *
# from .test_util import *
# from .test_dataset import *
# from .test_pandas_dataset import *
# from tests.pandas.test_pandas_dataset_distributional_expectations import *
# from .test_expectation_decorators import *
# from .test_cli import *
| from .test_great_expectations import *
from .test_util import *
from .test_dataset import *
from .test_pandas_dataset import *
from tests.pandas.test_pandas_dataset_distributional_expectations import *
from .test_expectation_decorators import *
from .test_cli import *
Remove explicit import in tests module.# from .test... | <commit_before>from .test_great_expectations import *
from .test_util import *
from .test_dataset import *
from .test_pandas_dataset import *
from tests.pandas.test_pandas_dataset_distributional_expectations import *
from .test_expectation_decorators import *
from .test_cli import *
<commit_msg>Remove explicit import i... |
fa1b111e63ebd069c027a3b969f679b2de54949f | tests/conftest.py | tests/conftest.py | import pytest
from sanic import Sanic
from sanic_openapi import swagger_blueprint
@pytest.fixture()
def app():
app = Sanic('test')
app.blueprint(swagger_blueprint)
return app
| import pytest
from sanic import Sanic
import sanic_openapi
@pytest.fixture()
def app():
app = Sanic("test")
app.blueprint(sanic_openapi.swagger_blueprint)
yield app
# Clean up
sanic_openapi.swagger.definitions = {}
sanic_openapi.swagger._spec = {}
| Add clean up in app fixture | Test: Add clean up in app fixture
| Python | mit | channelcat/sanic-openapi,channelcat/sanic-openapi | import pytest
from sanic import Sanic
from sanic_openapi import swagger_blueprint
@pytest.fixture()
def app():
app = Sanic('test')
app.blueprint(swagger_blueprint)
return app
Test: Add clean up in app fixture | import pytest
from sanic import Sanic
import sanic_openapi
@pytest.fixture()
def app():
app = Sanic("test")
app.blueprint(sanic_openapi.swagger_blueprint)
yield app
# Clean up
sanic_openapi.swagger.definitions = {}
sanic_openapi.swagger._spec = {}
| <commit_before>import pytest
from sanic import Sanic
from sanic_openapi import swagger_blueprint
@pytest.fixture()
def app():
app = Sanic('test')
app.blueprint(swagger_blueprint)
return app
<commit_msg>Test: Add clean up in app fixture<commit_after> | import pytest
from sanic import Sanic
import sanic_openapi
@pytest.fixture()
def app():
app = Sanic("test")
app.blueprint(sanic_openapi.swagger_blueprint)
yield app
# Clean up
sanic_openapi.swagger.definitions = {}
sanic_openapi.swagger._spec = {}
| import pytest
from sanic import Sanic
from sanic_openapi import swagger_blueprint
@pytest.fixture()
def app():
app = Sanic('test')
app.blueprint(swagger_blueprint)
return app
Test: Add clean up in app fixtureimport pytest
from sanic import Sanic
import sanic_openapi
@pytest.fixture()
def app():
app... | <commit_before>import pytest
from sanic import Sanic
from sanic_openapi import swagger_blueprint
@pytest.fixture()
def app():
app = Sanic('test')
app.blueprint(swagger_blueprint)
return app
<commit_msg>Test: Add clean up in app fixture<commit_after>import pytest
from sanic import Sanic
import sanic_opena... |
04e5083006ee1faffbbdc73bd71b4601ff1db3ae | tests/workers/test_merge.py | tests/workers/test_merge.py | import pytest
from mock import patch, MagicMock
from gitfs.worker.merge import MergeWorker
class TestMergeWorker(object):
def test_run(self):
mocked_queue = MagicMock()
mocked_idle = MagicMock(side_effect=ValueError)
mocked_queue.get.side_effect = ValueError()
worker = MergeWork... | import pytest
from mock import patch, MagicMock
from gitfs.worker.merge import MergeWorker
class TestMergeWorker(object):
def test_run(self):
mocked_queue = MagicMock()
mocked_idle = MagicMock(side_effect=ValueError)
mocked_queue.get.side_effect = ValueError()
worker = MergeWork... | Test merge worker with commits and merges | test: Test merge worker with commits and merges
| Python | apache-2.0 | rowhit/gitfs,bussiere/gitfs,PressLabs/gitfs,PressLabs/gitfs,ksmaheshkumar/gitfs | import pytest
from mock import patch, MagicMock
from gitfs.worker.merge import MergeWorker
class TestMergeWorker(object):
def test_run(self):
mocked_queue = MagicMock()
mocked_idle = MagicMock(side_effect=ValueError)
mocked_queue.get.side_effect = ValueError()
worker = MergeWork... | import pytest
from mock import patch, MagicMock
from gitfs.worker.merge import MergeWorker
class TestMergeWorker(object):
def test_run(self):
mocked_queue = MagicMock()
mocked_idle = MagicMock(side_effect=ValueError)
mocked_queue.get.side_effect = ValueError()
worker = MergeWork... | <commit_before>import pytest
from mock import patch, MagicMock
from gitfs.worker.merge import MergeWorker
class TestMergeWorker(object):
def test_run(self):
mocked_queue = MagicMock()
mocked_idle = MagicMock(side_effect=ValueError)
mocked_queue.get.side_effect = ValueError()
wor... | import pytest
from mock import patch, MagicMock
from gitfs.worker.merge import MergeWorker
class TestMergeWorker(object):
def test_run(self):
mocked_queue = MagicMock()
mocked_idle = MagicMock(side_effect=ValueError)
mocked_queue.get.side_effect = ValueError()
worker = MergeWork... | import pytest
from mock import patch, MagicMock
from gitfs.worker.merge import MergeWorker
class TestMergeWorker(object):
def test_run(self):
mocked_queue = MagicMock()
mocked_idle = MagicMock(side_effect=ValueError)
mocked_queue.get.side_effect = ValueError()
worker = MergeWork... | <commit_before>import pytest
from mock import patch, MagicMock
from gitfs.worker.merge import MergeWorker
class TestMergeWorker(object):
def test_run(self):
mocked_queue = MagicMock()
mocked_idle = MagicMock(side_effect=ValueError)
mocked_queue.get.side_effect = ValueError()
wor... |
3a2936bf55019dfd9203031ebe73966846b6f041 | tests/test_dpp.py | tests/test_dpp.py | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from agents.dpp import DPP
import replay_buffer
from test_dqn_like import _TestDQNLike
from chainer ... | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from agents.dpp import DPP
from agents.dpp import DPPL
from agents.dpp import DPPGreedy
import repl... | Add tests for DPPL and DPPGreedy. | Add tests for DPPL and DPPGreedy.
| Python | mit | toslunar/chainerrl,toslunar/chainerrl | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from agents.dpp import DPP
import replay_buffer
from test_dqn_like import _TestDQNLike
from chainer ... | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from agents.dpp import DPP
from agents.dpp import DPPL
from agents.dpp import DPPGreedy
import repl... | <commit_before>from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from agents.dpp import DPP
import replay_buffer
from test_dqn_like import _TestDQNLik... | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from agents.dpp import DPP
from agents.dpp import DPPL
from agents.dpp import DPPGreedy
import repl... | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from agents.dpp import DPP
import replay_buffer
from test_dqn_like import _TestDQNLike
from chainer ... | <commit_before>from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from agents.dpp import DPP
import replay_buffer
from test_dqn_like import _TestDQNLik... |
7c1b539436b1f27896bc0e193b52838e2323519b | tutorials/urls.py | tutorials/urls.py | from django.conf.urls import include, url
from tutorials import views
urlpatterns = [
url(r'^$', views.ListTutorials.as_view()),
url(r'add/', views.NewTutorial.as_view(), name='add_tutorial'),
url(r'(?P<tutorial_id>[\w\-]+)/edit/', views.EditTutorials.as_view(), name='edit_tutorial'),
# This must be ... | from django.conf.urls import include, url
from tutorials import views
urlpatterns = [
url(r'^$', views.ListTutorials.as_view(), name='list_tutorials'),
url(r'add/', views.CreateNewTutorial.as_view(), name='add_tutorial'),
url(r'(?P<tutorial_id>[\w\-]+)/edit/', views.EditTutorials.as_view(), name='edit_tut... | Add url name to ListView, New url for delete view, Refactor ViewClass name for NewTutorials to CreateNewTutorials | Add url name to ListView, New url for delete view, Refactor ViewClass name for NewTutorials to CreateNewTutorials
| Python | agpl-3.0 | openego/oeplatform,openego/oeplatform,openego/oeplatform,openego/oeplatform | from django.conf.urls import include, url
from tutorials import views
urlpatterns = [
url(r'^$', views.ListTutorials.as_view()),
url(r'add/', views.NewTutorial.as_view(), name='add_tutorial'),
url(r'(?P<tutorial_id>[\w\-]+)/edit/', views.EditTutorials.as_view(), name='edit_tutorial'),
# This must be ... | from django.conf.urls import include, url
from tutorials import views
urlpatterns = [
url(r'^$', views.ListTutorials.as_view(), name='list_tutorials'),
url(r'add/', views.CreateNewTutorial.as_view(), name='add_tutorial'),
url(r'(?P<tutorial_id>[\w\-]+)/edit/', views.EditTutorials.as_view(), name='edit_tut... | <commit_before>from django.conf.urls import include, url
from tutorials import views
urlpatterns = [
url(r'^$', views.ListTutorials.as_view()),
url(r'add/', views.NewTutorial.as_view(), name='add_tutorial'),
url(r'(?P<tutorial_id>[\w\-]+)/edit/', views.EditTutorials.as_view(), name='edit_tutorial'),
... | from django.conf.urls import include, url
from tutorials import views
urlpatterns = [
url(r'^$', views.ListTutorials.as_view(), name='list_tutorials'),
url(r'add/', views.CreateNewTutorial.as_view(), name='add_tutorial'),
url(r'(?P<tutorial_id>[\w\-]+)/edit/', views.EditTutorials.as_view(), name='edit_tut... | from django.conf.urls import include, url
from tutorials import views
urlpatterns = [
url(r'^$', views.ListTutorials.as_view()),
url(r'add/', views.NewTutorial.as_view(), name='add_tutorial'),
url(r'(?P<tutorial_id>[\w\-]+)/edit/', views.EditTutorials.as_view(), name='edit_tutorial'),
# This must be ... | <commit_before>from django.conf.urls import include, url
from tutorials import views
urlpatterns = [
url(r'^$', views.ListTutorials.as_view()),
url(r'add/', views.NewTutorial.as_view(), name='add_tutorial'),
url(r'(?P<tutorial_id>[\w\-]+)/edit/', views.EditTutorials.as_view(), name='edit_tutorial'),
... |
835b8adfb610cdac0233840497f3a1cf9860f946 | cerebro/tests/core/test_usecases.py | cerebro/tests/core/test_usecases.py | import unittest
import cerebro.core.entities as en
import cerebro.core.usecases as uc
class TestUseCases(unittest.TestCase):
def setUp(self):
self.neurons_path = ["./cerebro/neurons"]
self.neuron_test = ("system check")
self.neuron_test_response = "All working properly."
self.com... | import unittest
import cerebro.core.entities as en
import cerebro.core.usecases as uc
class TestUseCases(unittest.TestCase):
def setUp(self):
self.neurons_path = ["./cerebro/neurons"]
self.neuron_test = ("system check")
self.neuron_test_response = "All working properly."
self.com... | Test cases changed and minor optimization | Test cases changed and minor optimization
| Python | mit | Le-Bot/cerebro | import unittest
import cerebro.core.entities as en
import cerebro.core.usecases as uc
class TestUseCases(unittest.TestCase):
def setUp(self):
self.neurons_path = ["./cerebro/neurons"]
self.neuron_test = ("system check")
self.neuron_test_response = "All working properly."
self.com... | import unittest
import cerebro.core.entities as en
import cerebro.core.usecases as uc
class TestUseCases(unittest.TestCase):
def setUp(self):
self.neurons_path = ["./cerebro/neurons"]
self.neuron_test = ("system check")
self.neuron_test_response = "All working properly."
self.com... | <commit_before>import unittest
import cerebro.core.entities as en
import cerebro.core.usecases as uc
class TestUseCases(unittest.TestCase):
def setUp(self):
self.neurons_path = ["./cerebro/neurons"]
self.neuron_test = ("system check")
self.neuron_test_response = "All working properly."
... | import unittest
import cerebro.core.entities as en
import cerebro.core.usecases as uc
class TestUseCases(unittest.TestCase):
def setUp(self):
self.neurons_path = ["./cerebro/neurons"]
self.neuron_test = ("system check")
self.neuron_test_response = "All working properly."
self.com... | import unittest
import cerebro.core.entities as en
import cerebro.core.usecases as uc
class TestUseCases(unittest.TestCase):
def setUp(self):
self.neurons_path = ["./cerebro/neurons"]
self.neuron_test = ("system check")
self.neuron_test_response = "All working properly."
self.com... | <commit_before>import unittest
import cerebro.core.entities as en
import cerebro.core.usecases as uc
class TestUseCases(unittest.TestCase):
def setUp(self):
self.neurons_path = ["./cerebro/neurons"]
self.neuron_test = ("system check")
self.neuron_test_response = "All working properly."
... |
8aabbacd06e0b634b40a77270e6bf20257289f56 | bin/combine_results.py | bin/combine_results.py | #!/usr/bin/env python
"""
Simple script to combine JUnit test results into a single XML file.
Useful for Jenkins.
TODO: Pretty indentation
"""
import os
from xml.etree import cElementTree as ET
def find_all(name, path):
result = []
for root, dirs, files in os.walk(path):
if name in files:
... | #!/usr/bin/env python
"""
Simple script to combine JUnit test results into a single XML file.
Useful for Jenkins.
TODO: Pretty indentation
"""
import os
from xml.etree import cElementTree as ET
def find_all(name, path):
result = []
for root, dirs, files in os.walk(path):
if name in files:
... | Change output filename for combined results to avoid recursive accumulation | Change output filename for combined results to avoid recursive accumulation
| Python | bsd-3-clause | stuarthodgson/cocotb,mkreider/cocotb2,stuarthodgson/cocotb,mkreider/cocotb2,mkreider/cocotb2,stuarthodgson/cocotb | #!/usr/bin/env python
"""
Simple script to combine JUnit test results into a single XML file.
Useful for Jenkins.
TODO: Pretty indentation
"""
import os
from xml.etree import cElementTree as ET
def find_all(name, path):
result = []
for root, dirs, files in os.walk(path):
if name in files:
... | #!/usr/bin/env python
"""
Simple script to combine JUnit test results into a single XML file.
Useful for Jenkins.
TODO: Pretty indentation
"""
import os
from xml.etree import cElementTree as ET
def find_all(name, path):
result = []
for root, dirs, files in os.walk(path):
if name in files:
... | <commit_before>#!/usr/bin/env python
"""
Simple script to combine JUnit test results into a single XML file.
Useful for Jenkins.
TODO: Pretty indentation
"""
import os
from xml.etree import cElementTree as ET
def find_all(name, path):
result = []
for root, dirs, files in os.walk(path):
if name in fi... | #!/usr/bin/env python
"""
Simple script to combine JUnit test results into a single XML file.
Useful for Jenkins.
TODO: Pretty indentation
"""
import os
from xml.etree import cElementTree as ET
def find_all(name, path):
result = []
for root, dirs, files in os.walk(path):
if name in files:
... | #!/usr/bin/env python
"""
Simple script to combine JUnit test results into a single XML file.
Useful for Jenkins.
TODO: Pretty indentation
"""
import os
from xml.etree import cElementTree as ET
def find_all(name, path):
result = []
for root, dirs, files in os.walk(path):
if name in files:
... | <commit_before>#!/usr/bin/env python
"""
Simple script to combine JUnit test results into a single XML file.
Useful for Jenkins.
TODO: Pretty indentation
"""
import os
from xml.etree import cElementTree as ET
def find_all(name, path):
result = []
for root, dirs, files in os.walk(path):
if name in fi... |
a0775510c81494777ab1adf7c822c4ca9a0227b2 | tensorbayes/distributions.py | tensorbayes/distributions.py | """ Assumes softplus activations for gaussian
"""
import tensorflow as tf
import numpy as np
def log_bernoulli_with_logits(x, logits):
return -tf.reduce_sum(tf.nn.sigmoid_cross_entropy_with_logits(logits, x), 1)
def log_normal(x, mu, var):
return -0.5 * tf.reduce_sum(tf.log(2 * np.pi) + tf.log(var) + tf.squar... | """ Assumes softplus activations for gaussian
"""
import tensorflow as tf
import numpy as np
def log_bernoulli_with_logits(x, logits, eps=0.0):
if eps > 0.0:
max_val = np.log(1.0 - eps) - np.log(eps)
logits = tf.clip_by_value(logits, -max_val, max_val, name='clipped_logit')
return -tf.reduce_su... | Add eps factor for numerical stability | Add eps factor for numerical stability
| Python | mit | RuiShu/tensorbayes | """ Assumes softplus activations for gaussian
"""
import tensorflow as tf
import numpy as np
def log_bernoulli_with_logits(x, logits):
return -tf.reduce_sum(tf.nn.sigmoid_cross_entropy_with_logits(logits, x), 1)
def log_normal(x, mu, var):
return -0.5 * tf.reduce_sum(tf.log(2 * np.pi) + tf.log(var) + tf.squar... | """ Assumes softplus activations for gaussian
"""
import tensorflow as tf
import numpy as np
def log_bernoulli_with_logits(x, logits, eps=0.0):
if eps > 0.0:
max_val = np.log(1.0 - eps) - np.log(eps)
logits = tf.clip_by_value(logits, -max_val, max_val, name='clipped_logit')
return -tf.reduce_su... | <commit_before>""" Assumes softplus activations for gaussian
"""
import tensorflow as tf
import numpy as np
def log_bernoulli_with_logits(x, logits):
return -tf.reduce_sum(tf.nn.sigmoid_cross_entropy_with_logits(logits, x), 1)
def log_normal(x, mu, var):
return -0.5 * tf.reduce_sum(tf.log(2 * np.pi) + tf.log(... | """ Assumes softplus activations for gaussian
"""
import tensorflow as tf
import numpy as np
def log_bernoulli_with_logits(x, logits, eps=0.0):
if eps > 0.0:
max_val = np.log(1.0 - eps) - np.log(eps)
logits = tf.clip_by_value(logits, -max_val, max_val, name='clipped_logit')
return -tf.reduce_su... | """ Assumes softplus activations for gaussian
"""
import tensorflow as tf
import numpy as np
def log_bernoulli_with_logits(x, logits):
return -tf.reduce_sum(tf.nn.sigmoid_cross_entropy_with_logits(logits, x), 1)
def log_normal(x, mu, var):
return -0.5 * tf.reduce_sum(tf.log(2 * np.pi) + tf.log(var) + tf.squar... | <commit_before>""" Assumes softplus activations for gaussian
"""
import tensorflow as tf
import numpy as np
def log_bernoulli_with_logits(x, logits):
return -tf.reduce_sum(tf.nn.sigmoid_cross_entropy_with_logits(logits, x), 1)
def log_normal(x, mu, var):
return -0.5 * tf.reduce_sum(tf.log(2 * np.pi) + tf.log(... |
477822717759df88624644df8b4e64aa81463c42 | kippt_reader/settings/production.py | kippt_reader/settings/production.py | from os import environ
import dj_database_url
from .base import *
INSTALLED_APPS += (
'djangosecure',
)
PRODUCTION_MIDDLEWARE_CLASSES = (
'djangosecure.middleware.SecurityMiddleware',
)
MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES
DATABASES = {'default': dj_database_url.config(... | from os import environ
import dj_database_url
from .base import *
INSTALLED_APPS += (
'djangosecure',
)
PRODUCTION_MIDDLEWARE_CLASSES = (
'djangosecure.middleware.SecurityMiddleware',
)
MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES
DATABASES = {'default': dj_database_url.config(... | Remove exempt for hub url | Remove exempt for hub url
| Python | mit | jpadilla/feedleap,jpadilla/feedleap | from os import environ
import dj_database_url
from .base import *
INSTALLED_APPS += (
'djangosecure',
)
PRODUCTION_MIDDLEWARE_CLASSES = (
'djangosecure.middleware.SecurityMiddleware',
)
MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES
DATABASES = {'default': dj_database_url.config(... | from os import environ
import dj_database_url
from .base import *
INSTALLED_APPS += (
'djangosecure',
)
PRODUCTION_MIDDLEWARE_CLASSES = (
'djangosecure.middleware.SecurityMiddleware',
)
MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES
DATABASES = {'default': dj_database_url.config(... | <commit_before>from os import environ
import dj_database_url
from .base import *
INSTALLED_APPS += (
'djangosecure',
)
PRODUCTION_MIDDLEWARE_CLASSES = (
'djangosecure.middleware.SecurityMiddleware',
)
MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES
DATABASES = {'default': dj_datab... | from os import environ
import dj_database_url
from .base import *
INSTALLED_APPS += (
'djangosecure',
)
PRODUCTION_MIDDLEWARE_CLASSES = (
'djangosecure.middleware.SecurityMiddleware',
)
MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES
DATABASES = {'default': dj_database_url.config(... | from os import environ
import dj_database_url
from .base import *
INSTALLED_APPS += (
'djangosecure',
)
PRODUCTION_MIDDLEWARE_CLASSES = (
'djangosecure.middleware.SecurityMiddleware',
)
MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES
DATABASES = {'default': dj_database_url.config(... | <commit_before>from os import environ
import dj_database_url
from .base import *
INSTALLED_APPS += (
'djangosecure',
)
PRODUCTION_MIDDLEWARE_CLASSES = (
'djangosecure.middleware.SecurityMiddleware',
)
MIDDLEWARE_CLASSES = PRODUCTION_MIDDLEWARE_CLASSES + MIDDLEWARE_CLASSES
DATABASES = {'default': dj_datab... |
f603d382ab8b93677713d6c9c26f9b6a2616ba13 | src/utils/indices.py | src/utils/indices.py | import json
import os
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Index
from model import APIDoc
_dirname = os.path.dirname(__file__)
with open(os.path.join(_dirname, 'mapping.json'), 'r') as file:
SMARTAPI_MAPPING = json.load(file)
def setup():
"""
Setup Elasticsearch Index.
... | import json
import os
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Index
from model import APIDoc
_dirname = os.path.dirname(__file__)
with open(os.path.join(_dirname, 'mapping.json'), 'r') as file:
SMARTAPI_MAPPING = json.load(file)
def exists():
return Index(APIDoc.Index.name).exi... | Add a few methods used in admin.py | Add a few methods used in admin.py
| Python | mit | Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI | import json
import os
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Index
from model import APIDoc
_dirname = os.path.dirname(__file__)
with open(os.path.join(_dirname, 'mapping.json'), 'r') as file:
SMARTAPI_MAPPING = json.load(file)
def setup():
"""
Setup Elasticsearch Index.
... | import json
import os
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Index
from model import APIDoc
_dirname = os.path.dirname(__file__)
with open(os.path.join(_dirname, 'mapping.json'), 'r') as file:
SMARTAPI_MAPPING = json.load(file)
def exists():
return Index(APIDoc.Index.name).exi... | <commit_before>import json
import os
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Index
from model import APIDoc
_dirname = os.path.dirname(__file__)
with open(os.path.join(_dirname, 'mapping.json'), 'r') as file:
SMARTAPI_MAPPING = json.load(file)
def setup():
"""
Setup Elastic... | import json
import os
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Index
from model import APIDoc
_dirname = os.path.dirname(__file__)
with open(os.path.join(_dirname, 'mapping.json'), 'r') as file:
SMARTAPI_MAPPING = json.load(file)
def exists():
return Index(APIDoc.Index.name).exi... | import json
import os
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Index
from model import APIDoc
_dirname = os.path.dirname(__file__)
with open(os.path.join(_dirname, 'mapping.json'), 'r') as file:
SMARTAPI_MAPPING = json.load(file)
def setup():
"""
Setup Elasticsearch Index.
... | <commit_before>import json
import os
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Index
from model import APIDoc
_dirname = os.path.dirname(__file__)
with open(os.path.join(_dirname, 'mapping.json'), 'r') as file:
SMARTAPI_MAPPING = json.load(file)
def setup():
"""
Setup Elastic... |
2cee4fbfee7d922dfb83d154c2fa023cb647c4b3 | sslify/middleware.py | sslify/middleware.py | from django.conf import settings
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settings.DEBUG`` is False.
.. ... | from django.conf import settings
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settings.DEBUG`` is False.
.. ... | Allow using sslify even in DEBUG mode. | Allow using sslify even in DEBUG mode.
| Python | unlicense | rdegges/django-sslify | from django.conf import settings
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settings.DEBUG`` is False.
.. ... | from django.conf import settings
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settings.DEBUG`` is False.
.. ... | <commit_before>from django.conf import settings
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settings.DEBUG`` is ... | from django.conf import settings
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settings.DEBUG`` is False.
.. ... | from django.conf import settings
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settings.DEBUG`` is False.
.. ... | <commit_before>from django.conf import settings
from django.http import HttpResponsePermanentRedirect
class SSLifyMiddleware(object):
"""Force all requests to use HTTPs. If we get an HTTP request, we'll just
force a redirect to HTTPs.
.. note::
This will only take effect if ``settings.DEBUG`` is ... |
e28c9da712574618eb28b6ff82631462fee67c16 | changes/utils/times.py | changes/utils/times.py | def duration(value):
ONE_SECOND = 1000
ONE_MINUTE = ONE_SECOND * 60
if not value:
return '0 s'
if value < 3 * ONE_SECOND:
return '%d ms' % (value,)
elif value < 5 * ONE_MINUTE:
return '%d s' % (value / ONE_SECOND,)
else:
return '%d m' % (value / ONE_MINUTE,)
| def duration(value):
ONE_SECOND = 1000
ONE_MINUTE = ONE_SECOND * 60
if not value:
return '0 s'
abs_value = abs(value)
if abs_value < 3 * ONE_SECOND:
return '%d ms' % (value,)
elif abs_value < 5 * ONE_MINUTE:
return '%d s' % (value / ONE_SECOND,)
else:
retur... | Fix for negative values in duration | Fix for negative values in duration
| Python | apache-2.0 | bowlofstew/changes,wfxiang08/changes,dropbox/changes,wfxiang08/changes,wfxiang08/changes,dropbox/changes,dropbox/changes,bowlofstew/changes,dropbox/changes,bowlofstew/changes,bowlofstew/changes,wfxiang08/changes | def duration(value):
ONE_SECOND = 1000
ONE_MINUTE = ONE_SECOND * 60
if not value:
return '0 s'
if value < 3 * ONE_SECOND:
return '%d ms' % (value,)
elif value < 5 * ONE_MINUTE:
return '%d s' % (value / ONE_SECOND,)
else:
return '%d m' % (value / ONE_MINUTE,)
Fix... | def duration(value):
ONE_SECOND = 1000
ONE_MINUTE = ONE_SECOND * 60
if not value:
return '0 s'
abs_value = abs(value)
if abs_value < 3 * ONE_SECOND:
return '%d ms' % (value,)
elif abs_value < 5 * ONE_MINUTE:
return '%d s' % (value / ONE_SECOND,)
else:
retur... | <commit_before>def duration(value):
ONE_SECOND = 1000
ONE_MINUTE = ONE_SECOND * 60
if not value:
return '0 s'
if value < 3 * ONE_SECOND:
return '%d ms' % (value,)
elif value < 5 * ONE_MINUTE:
return '%d s' % (value / ONE_SECOND,)
else:
return '%d m' % (value / O... | def duration(value):
ONE_SECOND = 1000
ONE_MINUTE = ONE_SECOND * 60
if not value:
return '0 s'
abs_value = abs(value)
if abs_value < 3 * ONE_SECOND:
return '%d ms' % (value,)
elif abs_value < 5 * ONE_MINUTE:
return '%d s' % (value / ONE_SECOND,)
else:
retur... | def duration(value):
ONE_SECOND = 1000
ONE_MINUTE = ONE_SECOND * 60
if not value:
return '0 s'
if value < 3 * ONE_SECOND:
return '%d ms' % (value,)
elif value < 5 * ONE_MINUTE:
return '%d s' % (value / ONE_SECOND,)
else:
return '%d m' % (value / ONE_MINUTE,)
Fix... | <commit_before>def duration(value):
ONE_SECOND = 1000
ONE_MINUTE = ONE_SECOND * 60
if not value:
return '0 s'
if value < 3 * ONE_SECOND:
return '%d ms' % (value,)
elif value < 5 * ONE_MINUTE:
return '%d s' % (value / ONE_SECOND,)
else:
return '%d m' % (value / O... |
d3d88d628c61a87b1a36f9a25bdea807dd2d12a2 | saleor/dashboard/settings/forms.py | saleor/dashboard/settings/forms.py | from django import forms
from django.utils.translation import ugettext_lazy as _
from ...setting.models import Setting
class SettingForm(forms.ModelForm):
class Meta:
model = Setting
exclude = []
def clean_name(self):
name = self.cleaned_data['name']
if len(name.split()) > 1:
... | from django import forms
from django.utils.translation import ugettext_lazy as _
from ...setting.models import Setting
class SettingForm(forms.ModelForm):
class Meta:
model = Setting
exclude = []
def clean_name(self):
name = self.cleaned_data['name']
if len(name.split()) > 1:... | Add missing newline between imports | Add missing newline between imports
| Python | bsd-3-clause | tfroehlich82/saleor,KenMutemi/saleor,itbabu/saleor,maferelo/saleor,KenMutemi/saleor,jreigel/saleor,tfroehlich82/saleor,HyperManTT/ECommerceSaleor,mociepka/saleor,KenMutemi/saleor,itbabu/saleor,mociepka/saleor,car3oon/saleor,HyperManTT/ECommerceSaleor,car3oon/saleor,car3oon/saleor,mociepka/saleor,UITools/saleor,UITools/... | from django import forms
from django.utils.translation import ugettext_lazy as _
from ...setting.models import Setting
class SettingForm(forms.ModelForm):
class Meta:
model = Setting
exclude = []
def clean_name(self):
name = self.cleaned_data['name']
if len(name.split()) > 1:
... | from django import forms
from django.utils.translation import ugettext_lazy as _
from ...setting.models import Setting
class SettingForm(forms.ModelForm):
class Meta:
model = Setting
exclude = []
def clean_name(self):
name = self.cleaned_data['name']
if len(name.split()) > 1:... | <commit_before>from django import forms
from django.utils.translation import ugettext_lazy as _
from ...setting.models import Setting
class SettingForm(forms.ModelForm):
class Meta:
model = Setting
exclude = []
def clean_name(self):
name = self.cleaned_data['name']
if len(name... | from django import forms
from django.utils.translation import ugettext_lazy as _
from ...setting.models import Setting
class SettingForm(forms.ModelForm):
class Meta:
model = Setting
exclude = []
def clean_name(self):
name = self.cleaned_data['name']
if len(name.split()) > 1:... | from django import forms
from django.utils.translation import ugettext_lazy as _
from ...setting.models import Setting
class SettingForm(forms.ModelForm):
class Meta:
model = Setting
exclude = []
def clean_name(self):
name = self.cleaned_data['name']
if len(name.split()) > 1:
... | <commit_before>from django import forms
from django.utils.translation import ugettext_lazy as _
from ...setting.models import Setting
class SettingForm(forms.ModelForm):
class Meta:
model = Setting
exclude = []
def clean_name(self):
name = self.cleaned_data['name']
if len(name... |
876d414f85297d45dca4f2c9158f9257dfd6cf5f | wagtailgeowidget/edit_handlers.py | wagtailgeowidget/edit_handlers.py | import warnings
import wagtail
if wagtail.VERSION < (2, 0):
warnings.warn("GeoPanel only works in Wagtail 2+", Warning) # NOQA
warnings.warn("Please import GeoPanel from wagtailgeowidget.legacy_edit_handlers instead", Warning) # NOQA
warnings.warn("All support for Wagtail 1.13 and below will be droppen ... | from wagtail.admin.edit_handlers import FieldPanel
from wagtailgeowidget.widgets import (
GeoField,
)
from wagtailgeowidget.app_settings import (
GEO_WIDGET_ZOOM
)
class GeoPanel(FieldPanel):
def __init__(self, *args, **kwargs):
self.classname = kwargs.pop('classname', "")
self.address_f... | Remove no-longer needed wagtail 2.0 warning | Remove no-longer needed wagtail 2.0 warning
| Python | mit | Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget,Frojd/wagtail-geo-widget | import warnings
import wagtail
if wagtail.VERSION < (2, 0):
warnings.warn("GeoPanel only works in Wagtail 2+", Warning) # NOQA
warnings.warn("Please import GeoPanel from wagtailgeowidget.legacy_edit_handlers instead", Warning) # NOQA
warnings.warn("All support for Wagtail 1.13 and below will be droppen ... | from wagtail.admin.edit_handlers import FieldPanel
from wagtailgeowidget.widgets import (
GeoField,
)
from wagtailgeowidget.app_settings import (
GEO_WIDGET_ZOOM
)
class GeoPanel(FieldPanel):
def __init__(self, *args, **kwargs):
self.classname = kwargs.pop('classname', "")
self.address_f... | <commit_before>import warnings
import wagtail
if wagtail.VERSION < (2, 0):
warnings.warn("GeoPanel only works in Wagtail 2+", Warning) # NOQA
warnings.warn("Please import GeoPanel from wagtailgeowidget.legacy_edit_handlers instead", Warning) # NOQA
warnings.warn("All support for Wagtail 1.13 and below w... | from wagtail.admin.edit_handlers import FieldPanel
from wagtailgeowidget.widgets import (
GeoField,
)
from wagtailgeowidget.app_settings import (
GEO_WIDGET_ZOOM
)
class GeoPanel(FieldPanel):
def __init__(self, *args, **kwargs):
self.classname = kwargs.pop('classname', "")
self.address_f... | import warnings
import wagtail
if wagtail.VERSION < (2, 0):
warnings.warn("GeoPanel only works in Wagtail 2+", Warning) # NOQA
warnings.warn("Please import GeoPanel from wagtailgeowidget.legacy_edit_handlers instead", Warning) # NOQA
warnings.warn("All support for Wagtail 1.13 and below will be droppen ... | <commit_before>import warnings
import wagtail
if wagtail.VERSION < (2, 0):
warnings.warn("GeoPanel only works in Wagtail 2+", Warning) # NOQA
warnings.warn("Please import GeoPanel from wagtailgeowidget.legacy_edit_handlers instead", Warning) # NOQA
warnings.warn("All support for Wagtail 1.13 and below w... |
d466785a4faaf1c01519935317ededf336f9dd14 | contentstore/management/commands/tests/test_sync_schedules.py | contentstore/management/commands/tests/test_sync_schedules.py | from six import BytesIO
from django.core.management import call_command
from django.test import TestCase
from mock import patch
from contentstore.models import Schedule
from seed_stage_based_messaging import test_utils as utils
class SyncSchedulesTests(TestCase):
@patch('contentstore.management.commands.sync_sch... | from six import StringIO
from django.core.management import call_command
from django.test import TestCase
from mock import patch
from contentstore.models import Schedule
from seed_stage_based_messaging import test_utils as utils
class SyncSchedulesTests(TestCase):
@patch('contentstore.management.commands.sync_sc... | Use StringIO instead of BytesIO | Use StringIO instead of BytesIO
| Python | bsd-3-clause | praekelt/seed-staged-based-messaging,praekelt/seed-stage-based-messaging,praekelt/seed-stage-based-messaging | from six import BytesIO
from django.core.management import call_command
from django.test import TestCase
from mock import patch
from contentstore.models import Schedule
from seed_stage_based_messaging import test_utils as utils
class SyncSchedulesTests(TestCase):
@patch('contentstore.management.commands.sync_sch... | from six import StringIO
from django.core.management import call_command
from django.test import TestCase
from mock import patch
from contentstore.models import Schedule
from seed_stage_based_messaging import test_utils as utils
class SyncSchedulesTests(TestCase):
@patch('contentstore.management.commands.sync_sc... | <commit_before>from six import BytesIO
from django.core.management import call_command
from django.test import TestCase
from mock import patch
from contentstore.models import Schedule
from seed_stage_based_messaging import test_utils as utils
class SyncSchedulesTests(TestCase):
@patch('contentstore.management.co... | from six import StringIO
from django.core.management import call_command
from django.test import TestCase
from mock import patch
from contentstore.models import Schedule
from seed_stage_based_messaging import test_utils as utils
class SyncSchedulesTests(TestCase):
@patch('contentstore.management.commands.sync_sc... | from six import BytesIO
from django.core.management import call_command
from django.test import TestCase
from mock import patch
from contentstore.models import Schedule
from seed_stage_based_messaging import test_utils as utils
class SyncSchedulesTests(TestCase):
@patch('contentstore.management.commands.sync_sch... | <commit_before>from six import BytesIO
from django.core.management import call_command
from django.test import TestCase
from mock import patch
from contentstore.models import Schedule
from seed_stage_based_messaging import test_utils as utils
class SyncSchedulesTests(TestCase):
@patch('contentstore.management.co... |
fcd523105e9f158f423018d45b05527435a41fb0 | geotrek/altimetry/tests/test_models.py | geotrek/altimetry/tests/test_models.py | import os
from django.test import TestCase
from django.conf import settings
from geotrek.trekking.factories import TrekFactory
from geotrek.trekking.models import Trek
class AltimetryMixinTest(TestCase):
def test_get_elevation_chart_none(self):
trek = TrekFactory.create(no_path=True)
trek.get_el... | import os
from django.test import TestCase
from django.conf import settings
from django.utils.translation import get_language
from geotrek.trekking.factories import TrekFactory
from geotrek.trekking.models import Trek
class AltimetryMixinTest(TestCase):
def test_get_elevation_chart_none(self):
trek = Tr... | Change test model elevation chart | Change test model elevation chart
| Python | bsd-2-clause | GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek | import os
from django.test import TestCase
from django.conf import settings
from geotrek.trekking.factories import TrekFactory
from geotrek.trekking.models import Trek
class AltimetryMixinTest(TestCase):
def test_get_elevation_chart_none(self):
trek = TrekFactory.create(no_path=True)
trek.get_el... | import os
from django.test import TestCase
from django.conf import settings
from django.utils.translation import get_language
from geotrek.trekking.factories import TrekFactory
from geotrek.trekking.models import Trek
class AltimetryMixinTest(TestCase):
def test_get_elevation_chart_none(self):
trek = Tr... | <commit_before>import os
from django.test import TestCase
from django.conf import settings
from geotrek.trekking.factories import TrekFactory
from geotrek.trekking.models import Trek
class AltimetryMixinTest(TestCase):
def test_get_elevation_chart_none(self):
trek = TrekFactory.create(no_path=True)
... | import os
from django.test import TestCase
from django.conf import settings
from django.utils.translation import get_language
from geotrek.trekking.factories import TrekFactory
from geotrek.trekking.models import Trek
class AltimetryMixinTest(TestCase):
def test_get_elevation_chart_none(self):
trek = Tr... | import os
from django.test import TestCase
from django.conf import settings
from geotrek.trekking.factories import TrekFactory
from geotrek.trekking.models import Trek
class AltimetryMixinTest(TestCase):
def test_get_elevation_chart_none(self):
trek = TrekFactory.create(no_path=True)
trek.get_el... | <commit_before>import os
from django.test import TestCase
from django.conf import settings
from geotrek.trekking.factories import TrekFactory
from geotrek.trekking.models import Trek
class AltimetryMixinTest(TestCase):
def test_get_elevation_chart_none(self):
trek = TrekFactory.create(no_path=True)
... |
68452ffc8490d976b043f660a0e3e1f19c4ed98e | great_expectations/actions/__init__.py | great_expectations/actions/__init__.py | from .actions import (
BasicValidationAction,
NamespacedValidationAction,
NoOpAction,
SummarizeAndStoreAction,
)
from .validation_operators import (
DefaultActionAwareValidationOperator
) | from .actions import (
BasicValidationAction,
NamespacedValidationAction,
NoOpAction,
SummarizeAndStoreAction,
SlackNotificationAction
)
from .validation_operators import (
DefaultActionAwareValidationOperator
) | Add Slack action to init | Add Slack action to init
| Python | apache-2.0 | great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations | from .actions import (
BasicValidationAction,
NamespacedValidationAction,
NoOpAction,
SummarizeAndStoreAction,
)
from .validation_operators import (
DefaultActionAwareValidationOperator
)Add Slack action to init | from .actions import (
BasicValidationAction,
NamespacedValidationAction,
NoOpAction,
SummarizeAndStoreAction,
SlackNotificationAction
)
from .validation_operators import (
DefaultActionAwareValidationOperator
) | <commit_before>from .actions import (
BasicValidationAction,
NamespacedValidationAction,
NoOpAction,
SummarizeAndStoreAction,
)
from .validation_operators import (
DefaultActionAwareValidationOperator
)<commit_msg>Add Slack action to init<commit_after> | from .actions import (
BasicValidationAction,
NamespacedValidationAction,
NoOpAction,
SummarizeAndStoreAction,
SlackNotificationAction
)
from .validation_operators import (
DefaultActionAwareValidationOperator
) | from .actions import (
BasicValidationAction,
NamespacedValidationAction,
NoOpAction,
SummarizeAndStoreAction,
)
from .validation_operators import (
DefaultActionAwareValidationOperator
)Add Slack action to initfrom .actions import (
BasicValidationAction,
NamespacedValidationAction,
No... | <commit_before>from .actions import (
BasicValidationAction,
NamespacedValidationAction,
NoOpAction,
SummarizeAndStoreAction,
)
from .validation_operators import (
DefaultActionAwareValidationOperator
)<commit_msg>Add Slack action to init<commit_after>from .actions import (
BasicValidationActio... |
dabd787a647e345bdd9f3fd2fee1474b04347512 | website/addons/base/utils.py | website/addons/base/utils.py | from os.path import basename
from website import settings
def serialize_addon_config(config):
lookup = config.template_lookup
return {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_template': lookup.get_template(basename(config.node_setting... | from os.path import basename
from website import settings
def serialize_addon_config(config):
lookup = config.template_lookup
return {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_template': lookup.get_template(basename(config.node_setting... | Use default settings if no user settings | Use default settings if no user settings
| Python | apache-2.0 | aaxelb/osf.io,DanielSBrown/osf.io,bdyetton/prettychart,HalcyonChimera/osf.io,rdhyee/osf.io,caseyrygt/osf.io,dplorimer/osf,icereval/osf.io,alexschiller/osf.io,pattisdr/osf.io,zachjanicki/osf.io,petermalcolm/osf.io,jmcarp/osf.io,KAsante95/osf.io,acshi/osf.io,cwisecarver/osf.io,adlius/osf.io,cldershem/osf.io,kch8qx/osf.io... | from os.path import basename
from website import settings
def serialize_addon_config(config):
lookup = config.template_lookup
return {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_template': lookup.get_template(basename(config.node_setting... | from os.path import basename
from website import settings
def serialize_addon_config(config):
lookup = config.template_lookup
return {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_template': lookup.get_template(basename(config.node_setting... | <commit_before>from os.path import basename
from website import settings
def serialize_addon_config(config):
lookup = config.template_lookup
return {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_template': lookup.get_template(basename(conf... | from os.path import basename
from website import settings
def serialize_addon_config(config):
lookup = config.template_lookup
return {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_template': lookup.get_template(basename(config.node_setting... | from os.path import basename
from website import settings
def serialize_addon_config(config):
lookup = config.template_lookup
return {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_template': lookup.get_template(basename(config.node_setting... | <commit_before>from os.path import basename
from website import settings
def serialize_addon_config(config):
lookup = config.template_lookup
return {
'addon_short_name': config.short_name,
'addon_full_name': config.full_name,
'node_settings_template': lookup.get_template(basename(conf... |
45046857f688d4f640dc0b920a42d5b92faa4d9c | jax/_src/lib/mlir/dialects/__init__.py | jax/_src/lib/mlir/dialects/__init__.py | # Copyright 2021 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 2021 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, ... | Fix ModuleNotFoundError for phawkins only with version | Fix ModuleNotFoundError for phawkins only with version
| Python | apache-2.0 | google/jax,google/jax,google/jax,google/jax | # Copyright 2021 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 2021 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 2021 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 2021 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 2021 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 2021 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 ... |
b45c0cc0e9f2964ad442115f7a83292fb83611ec | test/vim_autopep8.py | test/vim_autopep8.py | """Run autopep8 on the selected buffer in Vim.
map <C-I> :pyfile <path_to>/vim_autopep8.py<CR>
Replace ":pyfile" with ":py3file" if Vim is built with Python 3 support.
"""
from __future__ import unicode_literals
import sys
import vim
ENCODING = vim.eval('&fileencoding')
def encode(text):
if sys.version_in... | """Run autopep8 on the selected buffer in Vim.
map <C-I> :pyfile <path_to>/vim_autopep8.py<CR>
Replace ":pyfile" with ":py3file" if Vim is built with Python 3 support.
"""
from __future__ import unicode_literals
import sys
import vim
ENCODING = vim.eval('&fileencoding')
def encode(text):
if sys.version_in... | Put code in main function | Put code in main function
| Python | mit | SG345/autopep8,MeteorAdminz/autopep8,Vauxoo/autopep8,hhatto/autopep8,Vauxoo/autopep8,MeteorAdminz/autopep8,SG345/autopep8,vauxoo-dev/autopep8,vauxoo-dev/autopep8,hhatto/autopep8 | """Run autopep8 on the selected buffer in Vim.
map <C-I> :pyfile <path_to>/vim_autopep8.py<CR>
Replace ":pyfile" with ":py3file" if Vim is built with Python 3 support.
"""
from __future__ import unicode_literals
import sys
import vim
ENCODING = vim.eval('&fileencoding')
def encode(text):
if sys.version_in... | """Run autopep8 on the selected buffer in Vim.
map <C-I> :pyfile <path_to>/vim_autopep8.py<CR>
Replace ":pyfile" with ":py3file" if Vim is built with Python 3 support.
"""
from __future__ import unicode_literals
import sys
import vim
ENCODING = vim.eval('&fileencoding')
def encode(text):
if sys.version_in... | <commit_before>"""Run autopep8 on the selected buffer in Vim.
map <C-I> :pyfile <path_to>/vim_autopep8.py<CR>
Replace ":pyfile" with ":py3file" if Vim is built with Python 3 support.
"""
from __future__ import unicode_literals
import sys
import vim
ENCODING = vim.eval('&fileencoding')
def encode(text):
if... | """Run autopep8 on the selected buffer in Vim.
map <C-I> :pyfile <path_to>/vim_autopep8.py<CR>
Replace ":pyfile" with ":py3file" if Vim is built with Python 3 support.
"""
from __future__ import unicode_literals
import sys
import vim
ENCODING = vim.eval('&fileencoding')
def encode(text):
if sys.version_in... | """Run autopep8 on the selected buffer in Vim.
map <C-I> :pyfile <path_to>/vim_autopep8.py<CR>
Replace ":pyfile" with ":py3file" if Vim is built with Python 3 support.
"""
from __future__ import unicode_literals
import sys
import vim
ENCODING = vim.eval('&fileencoding')
def encode(text):
if sys.version_in... | <commit_before>"""Run autopep8 on the selected buffer in Vim.
map <C-I> :pyfile <path_to>/vim_autopep8.py<CR>
Replace ":pyfile" with ":py3file" if Vim is built with Python 3 support.
"""
from __future__ import unicode_literals
import sys
import vim
ENCODING = vim.eval('&fileencoding')
def encode(text):
if... |
222935ffc347f9787f08b50cccb1981151db5cec | test_jeni_python3.py | test_jeni_python3.py | import unittest
import jeni
from test_jeni import BasicInjector
class Python3AnnotationTestCase(unittest.TestCase):
def test_annotate_without_annotations(self):
def fn(hello):
"unused"
jeni.annotate(fn)
self.assertTrue(jeni.annotate.has_annotations(fn))
@jeni.annotate
def a... | import unittest
import jeni
from test_jeni import BasicInjector
class Python3AnnotationTestCase(unittest.TestCase):
def test_annotate_without_annotations(self):
def fn(hello):
"unused"
jeni.annotate(fn)
self.assertTrue(jeni.annotate.has_annotations(fn))
def test_annotate... | Test for missing __annotations__ in Python 3. | Test for missing __annotations__ in Python 3.
| Python | bsd-2-clause | groner/jeni-python,rduplain/jeni-python | import unittest
import jeni
from test_jeni import BasicInjector
class Python3AnnotationTestCase(unittest.TestCase):
def test_annotate_without_annotations(self):
def fn(hello):
"unused"
jeni.annotate(fn)
self.assertTrue(jeni.annotate.has_annotations(fn))
@jeni.annotate
def a... | import unittest
import jeni
from test_jeni import BasicInjector
class Python3AnnotationTestCase(unittest.TestCase):
def test_annotate_without_annotations(self):
def fn(hello):
"unused"
jeni.annotate(fn)
self.assertTrue(jeni.annotate.has_annotations(fn))
def test_annotate... | <commit_before>import unittest
import jeni
from test_jeni import BasicInjector
class Python3AnnotationTestCase(unittest.TestCase):
def test_annotate_without_annotations(self):
def fn(hello):
"unused"
jeni.annotate(fn)
self.assertTrue(jeni.annotate.has_annotations(fn))
@jeni... | import unittest
import jeni
from test_jeni import BasicInjector
class Python3AnnotationTestCase(unittest.TestCase):
def test_annotate_without_annotations(self):
def fn(hello):
"unused"
jeni.annotate(fn)
self.assertTrue(jeni.annotate.has_annotations(fn))
def test_annotate... | import unittest
import jeni
from test_jeni import BasicInjector
class Python3AnnotationTestCase(unittest.TestCase):
def test_annotate_without_annotations(self):
def fn(hello):
"unused"
jeni.annotate(fn)
self.assertTrue(jeni.annotate.has_annotations(fn))
@jeni.annotate
def a... | <commit_before>import unittest
import jeni
from test_jeni import BasicInjector
class Python3AnnotationTestCase(unittest.TestCase):
def test_annotate_without_annotations(self):
def fn(hello):
"unused"
jeni.annotate(fn)
self.assertTrue(jeni.annotate.has_annotations(fn))
@jeni... |
1fc2e747f1c02d5b8559f03187464eecda008190 | fernet_fields/test/testmigrate/migrations/0004_copy_values.py | fernet_fields/test/testmigrate/migrations/0004_copy_values.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def forwards(apps, schema_editor):
DualText = apps.get_model('testmigrate', 'DualText')
for obj in DualText.objects.all():
obj.value_dual = obj.value
def backwards(apps, schema_editor):
DualText = a... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def forwards(apps, schema_editor):
DualText = apps.get_model('testmigrate', 'DualText')
for obj in DualText.objects.all():
obj.value_dual = obj.value
obj.save(force_update=True)
def backwards(ap... | Fix test migration to actually save updates. | Fix test migration to actually save updates.
| Python | bsd-3-clause | orcasgit/django-fernet-fields | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def forwards(apps, schema_editor):
DualText = apps.get_model('testmigrate', 'DualText')
for obj in DualText.objects.all():
obj.value_dual = obj.value
def backwards(apps, schema_editor):
DualText = a... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def forwards(apps, schema_editor):
DualText = apps.get_model('testmigrate', 'DualText')
for obj in DualText.objects.all():
obj.value_dual = obj.value
obj.save(force_update=True)
def backwards(ap... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def forwards(apps, schema_editor):
DualText = apps.get_model('testmigrate', 'DualText')
for obj in DualText.objects.all():
obj.value_dual = obj.value
def backwards(apps, schema_editor):
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def forwards(apps, schema_editor):
DualText = apps.get_model('testmigrate', 'DualText')
for obj in DualText.objects.all():
obj.value_dual = obj.value
obj.save(force_update=True)
def backwards(ap... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def forwards(apps, schema_editor):
DualText = apps.get_model('testmigrate', 'DualText')
for obj in DualText.objects.all():
obj.value_dual = obj.value
def backwards(apps, schema_editor):
DualText = a... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def forwards(apps, schema_editor):
DualText = apps.get_model('testmigrate', 'DualText')
for obj in DualText.objects.all():
obj.value_dual = obj.value
def backwards(apps, schema_editor):
... |
e9941e34253768e33cbfa54ff2bb9cf2e8267e1d | workflow-diagnosetargets.py | workflow-diagnosetargets.py | #!/usr/bin/env python
# Standard packages
import sys
import argparse
# Third-party packages
from toil.job import Job
# Package methods
from ddb import configuration
from ddb_ngsflow import gatk
from ddb_ngsflow import pipeline
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argumen... | #!/usr/bin/env python
# Standard packages
import sys
import argparse
# Third-party packages
from toil.job import Job
# Package methods
from ddb import configuration
from ddb_ngsflow import gatk
from ddb_ngsflow import pipeline
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argumen... | Tweak to bam file name calling | Tweak to bam file name calling
| Python | mit | dgaston/ddb-scripts,GastonLab/ddb-scripts,dgaston/ddb-ngsflow-scripts | #!/usr/bin/env python
# Standard packages
import sys
import argparse
# Third-party packages
from toil.job import Job
# Package methods
from ddb import configuration
from ddb_ngsflow import gatk
from ddb_ngsflow import pipeline
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argumen... | #!/usr/bin/env python
# Standard packages
import sys
import argparse
# Third-party packages
from toil.job import Job
# Package methods
from ddb import configuration
from ddb_ngsflow import gatk
from ddb_ngsflow import pipeline
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argumen... | <commit_before>#!/usr/bin/env python
# Standard packages
import sys
import argparse
# Third-party packages
from toil.job import Job
# Package methods
from ddb import configuration
from ddb_ngsflow import gatk
from ddb_ngsflow import pipeline
if __name__ == "__main__":
parser = argparse.ArgumentParser()
par... | #!/usr/bin/env python
# Standard packages
import sys
import argparse
# Third-party packages
from toil.job import Job
# Package methods
from ddb import configuration
from ddb_ngsflow import gatk
from ddb_ngsflow import pipeline
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argumen... | #!/usr/bin/env python
# Standard packages
import sys
import argparse
# Third-party packages
from toil.job import Job
# Package methods
from ddb import configuration
from ddb_ngsflow import gatk
from ddb_ngsflow import pipeline
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argumen... | <commit_before>#!/usr/bin/env python
# Standard packages
import sys
import argparse
# Third-party packages
from toil.job import Job
# Package methods
from ddb import configuration
from ddb_ngsflow import gatk
from ddb_ngsflow import pipeline
if __name__ == "__main__":
parser = argparse.ArgumentParser()
par... |
dc6d9ec75ffb2ac776d10a924395d05284bc031e | tests/test_compat.py | tests/test_compat.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_compat
------------
Tests for `cookiecutter.compat` module.
"""
from cookiecutter.compat import unittest, which
def test_existing_command():
assert which('cookiecutter')
def test_non_existing_command():
assert not which('stringthatisntashellcommand')... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_compat
------------
Tests for `cookiecutter.compat` module.
"""
from cookiecutter.compat import which
def test_existing_command():
assert which('cookiecutter')
def test_non_existing_command():
assert not which('stringthatisntashellcommand')
| Remove unused import of compat unittest | Remove unused import of compat unittest
| Python | bsd-3-clause | luzfcb/cookiecutter,jhermann/cookiecutter,christabor/cookiecutter,terryjbates/cookiecutter,audreyr/cookiecutter,agconti/cookiecutter,vincentbernat/cookiecutter,kkujawinski/cookiecutter,atlassian/cookiecutter,foodszhang/cookiecutter,lucius-feng/cookiecutter,nhomar/cookiecutter,benthomasson/cookiecutter,ionelmc/cookiecut... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_compat
------------
Tests for `cookiecutter.compat` module.
"""
from cookiecutter.compat import unittest, which
def test_existing_command():
assert which('cookiecutter')
def test_non_existing_command():
assert not which('stringthatisntashellcommand')... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_compat
------------
Tests for `cookiecutter.compat` module.
"""
from cookiecutter.compat import which
def test_existing_command():
assert which('cookiecutter')
def test_non_existing_command():
assert not which('stringthatisntashellcommand')
| <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_compat
------------
Tests for `cookiecutter.compat` module.
"""
from cookiecutter.compat import unittest, which
def test_existing_command():
assert which('cookiecutter')
def test_non_existing_command():
assert not which('stringthatisnt... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_compat
------------
Tests for `cookiecutter.compat` module.
"""
from cookiecutter.compat import which
def test_existing_command():
assert which('cookiecutter')
def test_non_existing_command():
assert not which('stringthatisntashellcommand')
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_compat
------------
Tests for `cookiecutter.compat` module.
"""
from cookiecutter.compat import unittest, which
def test_existing_command():
assert which('cookiecutter')
def test_non_existing_command():
assert not which('stringthatisntashellcommand')... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_compat
------------
Tests for `cookiecutter.compat` module.
"""
from cookiecutter.compat import unittest, which
def test_existing_command():
assert which('cookiecutter')
def test_non_existing_command():
assert not which('stringthatisnt... |
55af2016102ec16a4ec3878f45306e3ac4d520e6 | qingcloud/cli/iaas_client/actions/instance/reset_instances.py | qingcloud/cli/iaas_client/actions/instance/reset_instances.py | # coding: utf-8
from qingcloud.cli.misc.utils import explode_array
from qingcloud.cli.iaas_client.actions.base import BaseAction
class ResetInstancesAction(BaseAction):
action = 'ResetInstances'
command = 'reset-instances'
usage = '%(prog)s -i "instance_id, ..." [-f <conf_file>]'
@classmethod
d... | # coding: utf-8
from qingcloud.cli.misc.utils import explode_array
from qingcloud.cli.iaas_client.actions.base import BaseAction
class ResetInstancesAction(BaseAction):
action = 'ResetInstances'
command = 'reset-instances'
usage = '%(prog)s -i "instance_id, ..." [-f <conf_file> -m <login_mode> -p <login... | Add login mode to reset-instances | Add login mode to reset-instances
| Python | apache-2.0 | yunify/qingcloud-cli | # coding: utf-8
from qingcloud.cli.misc.utils import explode_array
from qingcloud.cli.iaas_client.actions.base import BaseAction
class ResetInstancesAction(BaseAction):
action = 'ResetInstances'
command = 'reset-instances'
usage = '%(prog)s -i "instance_id, ..." [-f <conf_file>]'
@classmethod
d... | # coding: utf-8
from qingcloud.cli.misc.utils import explode_array
from qingcloud.cli.iaas_client.actions.base import BaseAction
class ResetInstancesAction(BaseAction):
action = 'ResetInstances'
command = 'reset-instances'
usage = '%(prog)s -i "instance_id, ..." [-f <conf_file> -m <login_mode> -p <login... | <commit_before># coding: utf-8
from qingcloud.cli.misc.utils import explode_array
from qingcloud.cli.iaas_client.actions.base import BaseAction
class ResetInstancesAction(BaseAction):
action = 'ResetInstances'
command = 'reset-instances'
usage = '%(prog)s -i "instance_id, ..." [-f <conf_file>]'
@cl... | # coding: utf-8
from qingcloud.cli.misc.utils import explode_array
from qingcloud.cli.iaas_client.actions.base import BaseAction
class ResetInstancesAction(BaseAction):
action = 'ResetInstances'
command = 'reset-instances'
usage = '%(prog)s -i "instance_id, ..." [-f <conf_file> -m <login_mode> -p <login... | # coding: utf-8
from qingcloud.cli.misc.utils import explode_array
from qingcloud.cli.iaas_client.actions.base import BaseAction
class ResetInstancesAction(BaseAction):
action = 'ResetInstances'
command = 'reset-instances'
usage = '%(prog)s -i "instance_id, ..." [-f <conf_file>]'
@classmethod
d... | <commit_before># coding: utf-8
from qingcloud.cli.misc.utils import explode_array
from qingcloud.cli.iaas_client.actions.base import BaseAction
class ResetInstancesAction(BaseAction):
action = 'ResetInstances'
command = 'reset-instances'
usage = '%(prog)s -i "instance_id, ..." [-f <conf_file>]'
@cl... |
270d06c880fe72987b82fe00f234852e8d49eca0 | icekit/plugins/image_gallery/content_plugins.py | icekit/plugins/image_gallery/content_plugins.py | """
Definition of the plugin.
"""
from django.utils.translation import ugettext_lazy as _
from fluent_contents.extensions import ContentPlugin, plugin_pool
from . import models
@plugin_pool.register
class ImageGalleryPlugin(ContentPlugin):
model = models.ImageGalleryShowItem
category = _('Assets')
render... | """
Definition of the plugin.
"""
from django.utils.translation import ugettext_lazy as _
from fluent_contents.extensions import ContentPlugin, plugin_pool
from . import models
@plugin_pool.register
class ImageGalleryPlugin(ContentPlugin):
model = models.ImageGalleryShowItem
category = _('Assets')
render... | Remove invalid reference to unnecessary JS for image gallery plugin | Remove invalid reference to unnecessary JS for image gallery plugin
| Python | mit | ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit | """
Definition of the plugin.
"""
from django.utils.translation import ugettext_lazy as _
from fluent_contents.extensions import ContentPlugin, plugin_pool
from . import models
@plugin_pool.register
class ImageGalleryPlugin(ContentPlugin):
model = models.ImageGalleryShowItem
category = _('Assets')
render... | """
Definition of the plugin.
"""
from django.utils.translation import ugettext_lazy as _
from fluent_contents.extensions import ContentPlugin, plugin_pool
from . import models
@plugin_pool.register
class ImageGalleryPlugin(ContentPlugin):
model = models.ImageGalleryShowItem
category = _('Assets')
render... | <commit_before>"""
Definition of the plugin.
"""
from django.utils.translation import ugettext_lazy as _
from fluent_contents.extensions import ContentPlugin, plugin_pool
from . import models
@plugin_pool.register
class ImageGalleryPlugin(ContentPlugin):
model = models.ImageGalleryShowItem
category = _('Asse... | """
Definition of the plugin.
"""
from django.utils.translation import ugettext_lazy as _
from fluent_contents.extensions import ContentPlugin, plugin_pool
from . import models
@plugin_pool.register
class ImageGalleryPlugin(ContentPlugin):
model = models.ImageGalleryShowItem
category = _('Assets')
render... | """
Definition of the plugin.
"""
from django.utils.translation import ugettext_lazy as _
from fluent_contents.extensions import ContentPlugin, plugin_pool
from . import models
@plugin_pool.register
class ImageGalleryPlugin(ContentPlugin):
model = models.ImageGalleryShowItem
category = _('Assets')
render... | <commit_before>"""
Definition of the plugin.
"""
from django.utils.translation import ugettext_lazy as _
from fluent_contents.extensions import ContentPlugin, plugin_pool
from . import models
@plugin_pool.register
class ImageGalleryPlugin(ContentPlugin):
model = models.ImageGalleryShowItem
category = _('Asse... |
6e02ea0b94b237dbd8da63b77806530a904deef9 | alignak_backend_import/__init__.py | alignak_backend_import/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 8,0 )
__application__ = u"Alignak backend import"
__short_version_... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 8, 0, 1)
__application__ = u"Alignak backend import"
__short_versi... | Fix pep8 Set version as 0.8.0.1 | Fix pep8
Set version as 0.8.0.1
| Python | agpl-3.0 | Alignak-monitoring-contrib/alignak-backend-import,Alignak-monitoring-contrib/alignak-backend-import | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 8,0 )
__application__ = u"Alignak backend import"
__short_version_... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 8, 0, 1)
__application__ = u"Alignak backend import"
__short_versi... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 8,0 )
__application__ = u"Alignak backend import"
_... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 8, 0, 1)
__application__ = u"Alignak backend import"
__short_versi... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 8,0 )
__application__ = u"Alignak backend import"
__short_version_... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak backend import
This module contains utility tools to import Nagios-like flat files configuration into
an Alignak REST backend.
"""
# Application version and manifest
VERSION = (0, 8,0 )
__application__ = u"Alignak backend import"
_... |
8f4d0247b56ae157e8486c37e38992015e55ac3e | skimage/io/_plugins/matplotlib_plugin.py | skimage/io/_plugins/matplotlib_plugin.py | import matplotlib.pyplot as plt
def imshow(*args, **kwargs):
if plt.gca().has_data():
plt.figure()
kwargs.setdefault('interpolation', 'nearest')
kwargs.setdefault('cmap', 'gray')
plt.imshow(*args, **kwargs)
imread = plt.imread
show = plt.show
def _app_show():
show()
| import matplotlib.pyplot as plt
def imshow(im, *args, **kwargs):
"""Show the input image and return the current axes.
Parameters
----------
im : array, shape (M, N[, 3])
The image to display.
*args, **kwargs : positional and keyword arguments
These are passed directly to `matplot... | Add docstring to matplotlib imshow plugin | Add docstring to matplotlib imshow plugin
The image is now named as an argument, and the axes are returned, in
keeping with matplotlib convention.
| Python | bsd-3-clause | emon10005/scikit-image,vighneshbirodkar/scikit-image,ofgulban/scikit-image,Midafi/scikit-image,bennlich/scikit-image,chriscrosscutler/scikit-image,dpshelio/scikit-image,emon10005/scikit-image,ofgulban/scikit-image,newville/scikit-image,WarrenWeckesser/scikits-image,Britefury/scikit-image,juliusbierk/scikit-image,GaZ3ll... | import matplotlib.pyplot as plt
def imshow(*args, **kwargs):
if plt.gca().has_data():
plt.figure()
kwargs.setdefault('interpolation', 'nearest')
kwargs.setdefault('cmap', 'gray')
plt.imshow(*args, **kwargs)
imread = plt.imread
show = plt.show
def _app_show():
show()
Add docstring to mat... | import matplotlib.pyplot as plt
def imshow(im, *args, **kwargs):
"""Show the input image and return the current axes.
Parameters
----------
im : array, shape (M, N[, 3])
The image to display.
*args, **kwargs : positional and keyword arguments
These are passed directly to `matplot... | <commit_before>import matplotlib.pyplot as plt
def imshow(*args, **kwargs):
if plt.gca().has_data():
plt.figure()
kwargs.setdefault('interpolation', 'nearest')
kwargs.setdefault('cmap', 'gray')
plt.imshow(*args, **kwargs)
imread = plt.imread
show = plt.show
def _app_show():
show()
<comm... | import matplotlib.pyplot as plt
def imshow(im, *args, **kwargs):
"""Show the input image and return the current axes.
Parameters
----------
im : array, shape (M, N[, 3])
The image to display.
*args, **kwargs : positional and keyword arguments
These are passed directly to `matplot... | import matplotlib.pyplot as plt
def imshow(*args, **kwargs):
if plt.gca().has_data():
plt.figure()
kwargs.setdefault('interpolation', 'nearest')
kwargs.setdefault('cmap', 'gray')
plt.imshow(*args, **kwargs)
imread = plt.imread
show = plt.show
def _app_show():
show()
Add docstring to mat... | <commit_before>import matplotlib.pyplot as plt
def imshow(*args, **kwargs):
if plt.gca().has_data():
plt.figure()
kwargs.setdefault('interpolation', 'nearest')
kwargs.setdefault('cmap', 'gray')
plt.imshow(*args, **kwargs)
imread = plt.imread
show = plt.show
def _app_show():
show()
<comm... |
1c3d4488566576e3181f7acbf902f0adab3876dd | api/spawner/templates/constants.py | api/spawner/templates/constants.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.conf import settings
from polyaxon_schemas.polyaxonfile import constants
JOB_NAME = 'plxjob-{task_type}{task_idx}-{experiment_uuid}'
DEFAULT_PORT = 2222
ENV_VAR_TEMPLATE = '{name: "{var_name}", value: "{var_value}"}'
... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.conf import settings
JOB_NAME = 'plxjob-{task_type}{task_idx}-{experiment_uuid}'
DEFAULT_PORT = 2222
ENV_VAR_TEMPLATE = '{name: "{var_name}", value: "{var_value}"}'
VOLUME_NAME = 'pv-{vol_name}'
VOLUME_CLAIM_NAME = 'p... | Update naming for spawner jobs | Update naming for spawner jobs
| Python | apache-2.0 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.conf import settings
from polyaxon_schemas.polyaxonfile import constants
JOB_NAME = 'plxjob-{task_type}{task_idx}-{experiment_uuid}'
DEFAULT_PORT = 2222
ENV_VAR_TEMPLATE = '{name: "{var_name}", value: "{var_value}"}'
... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.conf import settings
JOB_NAME = 'plxjob-{task_type}{task_idx}-{experiment_uuid}'
DEFAULT_PORT = 2222
ENV_VAR_TEMPLATE = '{name: "{var_name}", value: "{var_value}"}'
VOLUME_NAME = 'pv-{vol_name}'
VOLUME_CLAIM_NAME = 'p... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.conf import settings
from polyaxon_schemas.polyaxonfile import constants
JOB_NAME = 'plxjob-{task_type}{task_idx}-{experiment_uuid}'
DEFAULT_PORT = 2222
ENV_VAR_TEMPLATE = '{name: "{var_name}", value: "... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.conf import settings
JOB_NAME = 'plxjob-{task_type}{task_idx}-{experiment_uuid}'
DEFAULT_PORT = 2222
ENV_VAR_TEMPLATE = '{name: "{var_name}", value: "{var_value}"}'
VOLUME_NAME = 'pv-{vol_name}'
VOLUME_CLAIM_NAME = 'p... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.conf import settings
from polyaxon_schemas.polyaxonfile import constants
JOB_NAME = 'plxjob-{task_type}{task_idx}-{experiment_uuid}'
DEFAULT_PORT = 2222
ENV_VAR_TEMPLATE = '{name: "{var_name}", value: "{var_value}"}'
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.conf import settings
from polyaxon_schemas.polyaxonfile import constants
JOB_NAME = 'plxjob-{task_type}{task_idx}-{experiment_uuid}'
DEFAULT_PORT = 2222
ENV_VAR_TEMPLATE = '{name: "{var_name}", value: "... |
3607309193c5d8b2b5ce0fd98d976b6e6aa49644 | test/test_client.py | test/test_client.py | import pytest
from numpy import random, ceil
from lightning import Lightning, Visualization
class TestLightningAPIClient(object):
@pytest.fixture(scope="module")
def lgn(self, host):
lgn = Lightning(host)
lgn.create_session("test-session")
return lgn
def test_create_generic(self,... | import pytest
from numpy import random, ceil
from lightning import Lightning, Visualization, VisualizationLocal
class TestLightningAPIClient(object):
@pytest.fixture(scope="module")
def lgn(self, host):
lgn = Lightning(host)
lgn.create_session("test-session")
return lgn
def test_... | Add test for local visualization | Add test for local visualization
| Python | mit | garretstuber/lightning-python,garretstuber/lightning-python,peterkshultz/lightning-python,lightning-viz/lightning-python,garretstuber/lightning-python,lightning-viz/lightning-python,peterkshultz/lightning-python,peterkshultz/lightning-python | import pytest
from numpy import random, ceil
from lightning import Lightning, Visualization
class TestLightningAPIClient(object):
@pytest.fixture(scope="module")
def lgn(self, host):
lgn = Lightning(host)
lgn.create_session("test-session")
return lgn
def test_create_generic(self,... | import pytest
from numpy import random, ceil
from lightning import Lightning, Visualization, VisualizationLocal
class TestLightningAPIClient(object):
@pytest.fixture(scope="module")
def lgn(self, host):
lgn = Lightning(host)
lgn.create_session("test-session")
return lgn
def test_... | <commit_before>import pytest
from numpy import random, ceil
from lightning import Lightning, Visualization
class TestLightningAPIClient(object):
@pytest.fixture(scope="module")
def lgn(self, host):
lgn = Lightning(host)
lgn.create_session("test-session")
return lgn
def test_creat... | import pytest
from numpy import random, ceil
from lightning import Lightning, Visualization, VisualizationLocal
class TestLightningAPIClient(object):
@pytest.fixture(scope="module")
def lgn(self, host):
lgn = Lightning(host)
lgn.create_session("test-session")
return lgn
def test_... | import pytest
from numpy import random, ceil
from lightning import Lightning, Visualization
class TestLightningAPIClient(object):
@pytest.fixture(scope="module")
def lgn(self, host):
lgn = Lightning(host)
lgn.create_session("test-session")
return lgn
def test_create_generic(self,... | <commit_before>import pytest
from numpy import random, ceil
from lightning import Lightning, Visualization
class TestLightningAPIClient(object):
@pytest.fixture(scope="module")
def lgn(self, host):
lgn = Lightning(host)
lgn.create_session("test-session")
return lgn
def test_creat... |
427931c5c8847d01e4ce563a9c605a78eceb39f3 | amplpy/amplpython/__init__.py | amplpy/amplpython/__init__.py | # -*- coding: utf-8 -*-
import os
import sys
import ctypes
import platform
if platform.system() == 'Windows':
libbase = os.path.join(os.path.dirname(__file__), 'cppinterface', 'lib')
lib32 = os.path.join(libbase, 'intel32')
lib64 = os.path.join(libbase, 'amd64')
from glob import glob
try:
i... | # -*- coding: utf-8 -*-
import os
import sys
import ctypes
import platform
if platform.system().startswith(('Windows', 'MSYS', 'CYGWIN', 'MINGW')):
libbase = os.path.join(os.path.dirname(__file__), 'cppinterface', 'lib')
lib32 = os.path.join(libbase, 'intel32')
lib64 = os.path.join(libbase, 'amd64')
fr... | Add basic support for MSYS, CYGWIN, and MINGW | Add basic support for MSYS, CYGWIN, and MINGW
| Python | bsd-3-clause | ampl/amplpy,ampl/amplpy,ampl/amplpy | # -*- coding: utf-8 -*-
import os
import sys
import ctypes
import platform
if platform.system() == 'Windows':
libbase = os.path.join(os.path.dirname(__file__), 'cppinterface', 'lib')
lib32 = os.path.join(libbase, 'intel32')
lib64 = os.path.join(libbase, 'amd64')
from glob import glob
try:
i... | # -*- coding: utf-8 -*-
import os
import sys
import ctypes
import platform
if platform.system().startswith(('Windows', 'MSYS', 'CYGWIN', 'MINGW')):
libbase = os.path.join(os.path.dirname(__file__), 'cppinterface', 'lib')
lib32 = os.path.join(libbase, 'intel32')
lib64 = os.path.join(libbase, 'amd64')
fr... | <commit_before># -*- coding: utf-8 -*-
import os
import sys
import ctypes
import platform
if platform.system() == 'Windows':
libbase = os.path.join(os.path.dirname(__file__), 'cppinterface', 'lib')
lib32 = os.path.join(libbase, 'intel32')
lib64 = os.path.join(libbase, 'amd64')
from glob import glob
... | # -*- coding: utf-8 -*-
import os
import sys
import ctypes
import platform
if platform.system().startswith(('Windows', 'MSYS', 'CYGWIN', 'MINGW')):
libbase = os.path.join(os.path.dirname(__file__), 'cppinterface', 'lib')
lib32 = os.path.join(libbase, 'intel32')
lib64 = os.path.join(libbase, 'amd64')
fr... | # -*- coding: utf-8 -*-
import os
import sys
import ctypes
import platform
if platform.system() == 'Windows':
libbase = os.path.join(os.path.dirname(__file__), 'cppinterface', 'lib')
lib32 = os.path.join(libbase, 'intel32')
lib64 = os.path.join(libbase, 'amd64')
from glob import glob
try:
i... | <commit_before># -*- coding: utf-8 -*-
import os
import sys
import ctypes
import platform
if platform.system() == 'Windows':
libbase = os.path.join(os.path.dirname(__file__), 'cppinterface', 'lib')
lib32 = os.path.join(libbase, 'intel32')
lib64 = os.path.join(libbase, 'amd64')
from glob import glob
... |
0673df239d14edb8d65c17eaa8291ac26fd0b976 | test_skewstudent.py | test_skewstudent.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Testing suite for ARG class.
"""
from __future__ import print_function, division
import unittest as ut
import numpy as np
from skewstudent import SkewStudent
__author__ = "Stanislav Khrapov"
__email__ = "khrapovs@gmail.com"
class ARGTestCase(ut.TestCase):
"""T... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Testing suite for SkewStudent class.
"""
from __future__ import print_function, division
import unittest as ut
import numpy as np
from skewstudent import SkewStudent
__author__ = "Stanislav Khrapov"
__email__ = "khrapovs@gmail.com"
class ARGTestCase(ut.TestCase):
... | Fix title in the test | Fix title in the test
| Python | mit | khrapovs/skewstudent | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Testing suite for ARG class.
"""
from __future__ import print_function, division
import unittest as ut
import numpy as np
from skewstudent import SkewStudent
__author__ = "Stanislav Khrapov"
__email__ = "khrapovs@gmail.com"
class ARGTestCase(ut.TestCase):
"""T... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Testing suite for SkewStudent class.
"""
from __future__ import print_function, division
import unittest as ut
import numpy as np
from skewstudent import SkewStudent
__author__ = "Stanislav Khrapov"
__email__ = "khrapovs@gmail.com"
class ARGTestCase(ut.TestCase):
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Testing suite for ARG class.
"""
from __future__ import print_function, division
import unittest as ut
import numpy as np
from skewstudent import SkewStudent
__author__ = "Stanislav Khrapov"
__email__ = "khrapovs@gmail.com"
class ARGTestCase(ut.TestC... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Testing suite for SkewStudent class.
"""
from __future__ import print_function, division
import unittest as ut
import numpy as np
from skewstudent import SkewStudent
__author__ = "Stanislav Khrapov"
__email__ = "khrapovs@gmail.com"
class ARGTestCase(ut.TestCase):
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Testing suite for ARG class.
"""
from __future__ import print_function, division
import unittest as ut
import numpy as np
from skewstudent import SkewStudent
__author__ = "Stanislav Khrapov"
__email__ = "khrapovs@gmail.com"
class ARGTestCase(ut.TestCase):
"""T... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Testing suite for ARG class.
"""
from __future__ import print_function, division
import unittest as ut
import numpy as np
from skewstudent import SkewStudent
__author__ = "Stanislav Khrapov"
__email__ = "khrapovs@gmail.com"
class ARGTestCase(ut.TestC... |
3d5de4b69be9d99fec4a8ffb46338f0684ffac26 | api/base/waffle_decorators.py | api/base/waffle_decorators.py | import waffle
from rest_framework.exceptions import NotFound
def require_flag(flag_name):
"""
Decorator to check whether flag is active.
If inactive, raise NotFound.
"""
def wrapper(fn):
def check_flag(*args,**kwargs):
if waffle.flag_is_active(args[0].request, flag_name):
... | import waffle
from rest_framework.exceptions import NotFound
def require_flag(flag_name):
"""
Decorator to check whether waffle flag is active.
If inactive, raise NotFound.
"""
def wrapper(fn):
def check_flag(*args,**kwargs):
if waffle.flag_is_active(args[0].request, flag_name)... | Add switch and sample decorators. | Add switch and sample decorators.
| Python | apache-2.0 | brianjgeiger/osf.io,HalcyonChimera/osf.io,chennan47/osf.io,laurenrevere/osf.io,adlius/osf.io,mfraezz/osf.io,binoculars/osf.io,pattisdr/osf.io,binoculars/osf.io,brianjgeiger/osf.io,felliott/osf.io,laurenrevere/osf.io,aaxelb/osf.io,cslzchen/osf.io,aaxelb/osf.io,caseyrollins/osf.io,pattisdr/osf.io,erinspace/osf.io,mfraezz... | import waffle
from rest_framework.exceptions import NotFound
def require_flag(flag_name):
"""
Decorator to check whether flag is active.
If inactive, raise NotFound.
"""
def wrapper(fn):
def check_flag(*args,**kwargs):
if waffle.flag_is_active(args[0].request, flag_name):
... | import waffle
from rest_framework.exceptions import NotFound
def require_flag(flag_name):
"""
Decorator to check whether waffle flag is active.
If inactive, raise NotFound.
"""
def wrapper(fn):
def check_flag(*args,**kwargs):
if waffle.flag_is_active(args[0].request, flag_name)... | <commit_before>import waffle
from rest_framework.exceptions import NotFound
def require_flag(flag_name):
"""
Decorator to check whether flag is active.
If inactive, raise NotFound.
"""
def wrapper(fn):
def check_flag(*args,**kwargs):
if waffle.flag_is_active(args[0].request, fl... | import waffle
from rest_framework.exceptions import NotFound
def require_flag(flag_name):
"""
Decorator to check whether waffle flag is active.
If inactive, raise NotFound.
"""
def wrapper(fn):
def check_flag(*args,**kwargs):
if waffle.flag_is_active(args[0].request, flag_name)... | import waffle
from rest_framework.exceptions import NotFound
def require_flag(flag_name):
"""
Decorator to check whether flag is active.
If inactive, raise NotFound.
"""
def wrapper(fn):
def check_flag(*args,**kwargs):
if waffle.flag_is_active(args[0].request, flag_name):
... | <commit_before>import waffle
from rest_framework.exceptions import NotFound
def require_flag(flag_name):
"""
Decorator to check whether flag is active.
If inactive, raise NotFound.
"""
def wrapper(fn):
def check_flag(*args,**kwargs):
if waffle.flag_is_active(args[0].request, fl... |
66e16d6e3d80ab81967232d5d154c64c8e277def | robotpy_ext/misc/periodic_filter.py | robotpy_ext/misc/periodic_filter.py | import logging
import wpilib
class PeriodicFilter:
"""
Periodic Filter to help keep down clutter in the console.
Simply add this filter to your logger and the logger will
only print periodically.
The logger will always print logging levels of WARNING or higher
"""
def __i... | import logging
import wpilib
class PeriodicFilter:
"""
Periodic Filter to help keep down clutter in the console.
Simply add this filter to your logger and the logger will
only print periodically.
The logger will always print logging levels of WARNING or higher
"""
def __i... | Allow user to select bypass level | Allow user to select bypass level
| Python | bsd-3-clause | Twinters007/robotpy-wpilib-utilities,robotpy/robotpy-wpilib-utilities,robotpy/robotpy-wpilib-utilities,Twinters007/robotpy-wpilib-utilities | import logging
import wpilib
class PeriodicFilter:
"""
Periodic Filter to help keep down clutter in the console.
Simply add this filter to your logger and the logger will
only print periodically.
The logger will always print logging levels of WARNING or higher
"""
def __i... | import logging
import wpilib
class PeriodicFilter:
"""
Periodic Filter to help keep down clutter in the console.
Simply add this filter to your logger and the logger will
only print periodically.
The logger will always print logging levels of WARNING or higher
"""
def __i... | <commit_before>import logging
import wpilib
class PeriodicFilter:
"""
Periodic Filter to help keep down clutter in the console.
Simply add this filter to your logger and the logger will
only print periodically.
The logger will always print logging levels of WARNING or higher
"... | import logging
import wpilib
class PeriodicFilter:
"""
Periodic Filter to help keep down clutter in the console.
Simply add this filter to your logger and the logger will
only print periodically.
The logger will always print logging levels of WARNING or higher
"""
def __i... | import logging
import wpilib
class PeriodicFilter:
"""
Periodic Filter to help keep down clutter in the console.
Simply add this filter to your logger and the logger will
only print periodically.
The logger will always print logging levels of WARNING or higher
"""
def __i... | <commit_before>import logging
import wpilib
class PeriodicFilter:
"""
Periodic Filter to help keep down clutter in the console.
Simply add this filter to your logger and the logger will
only print periodically.
The logger will always print logging levels of WARNING or higher
"... |
56a89d57824d3bd25ac235a8e360d528edd9a7cf | test/factories/blogpost_factory.py | test/factories/blogpost_factory.py | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | Fix for nullable author in blogpost factory | Fix for nullable author in blogpost factory
| Python | agpl-3.0 | OpenNewsLabs/pybossa,proyectos-analizo-info/pybossa-analizo-info,proyectos-analizo-info/pybossa-analizo-info,geotagx/pybossa,inteligencia-coletiva-lsd/pybossa,jean/pybossa,proyectos-analizo-info/pybossa-analizo-info,harihpr/tweetclickers,stefanhahmann/pybossa,OpenNewsLabs/pybossa,Scifabric/pybossa,inteligencia-coletiva... | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | <commit_before># -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Li... | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | <commit_before># -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Li... |
4831c45b53d53d31a6514d5c3e2d0465283b4076 | topological_sort.py | topological_sort.py | def topological_sort():
pass
def main():
pass
if __name__ == '__main__':
main()
| def topological_sort_recur():
"""Topological Sorting by Recursion."""
pass
def topological_sort():
"""Topological Sorting for Directed Acyclic Graph (DAG)."""
pass
def main():
# DAG.
adjacency_dict = {
'0': {},
'1': {},
'2': {'3'},
'3': {'1'},
'4': {'0', '1'},
'5': {'0', '2'}
}
... | Add topolofical_sort_recur(), 2 functions’s doc strings and DAG | Add topolofical_sort_recur(), 2 functions’s doc strings and DAG
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | def topological_sort():
pass
def main():
pass
if __name__ == '__main__':
main()
Add topolofical_sort_recur(), 2 functions’s doc strings and DAG | def topological_sort_recur():
"""Topological Sorting by Recursion."""
pass
def topological_sort():
"""Topological Sorting for Directed Acyclic Graph (DAG)."""
pass
def main():
# DAG.
adjacency_dict = {
'0': {},
'1': {},
'2': {'3'},
'3': {'1'},
'4': {'0', '1'},
'5': {'0', '2'}
}
... | <commit_before>def topological_sort():
pass
def main():
pass
if __name__ == '__main__':
main()
<commit_msg>Add topolofical_sort_recur(), 2 functions’s doc strings and DAG<commit_after> | def topological_sort_recur():
"""Topological Sorting by Recursion."""
pass
def topological_sort():
"""Topological Sorting for Directed Acyclic Graph (DAG)."""
pass
def main():
# DAG.
adjacency_dict = {
'0': {},
'1': {},
'2': {'3'},
'3': {'1'},
'4': {'0', '1'},
'5': {'0', '2'}
}
... | def topological_sort():
pass
def main():
pass
if __name__ == '__main__':
main()
Add topolofical_sort_recur(), 2 functions’s doc strings and DAGdef topological_sort_recur():
"""Topological Sorting by Recursion."""
pass
def topological_sort():
"""Topological Sorting for Directed Acyclic Graph (DAG)."""
pass
... | <commit_before>def topological_sort():
pass
def main():
pass
if __name__ == '__main__':
main()
<commit_msg>Add topolofical_sort_recur(), 2 functions’s doc strings and DAG<commit_after>def topological_sort_recur():
"""Topological Sorting by Recursion."""
pass
def topological_sort():
"""Topological Sorting for ... |
7c69d30de5aa58d330a183a0e5015e67c36ca7bc | spacy/tests/regression/test_issue4674.py | spacy/tests/regression/test_issue4674.py | # coding: utf-8
from __future__ import unicode_literals
from spacy.kb import KnowledgeBase
from spacy.util import ensure_path
from spacy.lang.en import English
from spacy.tests.util import make_tempdir
def test_issue4674():
"""Test that setting entities with overlapping identifiers does not mess up IO"""
nl... | # coding: utf-8
from __future__ import unicode_literals
import pytest
from spacy.kb import KnowledgeBase
from spacy.util import ensure_path
from spacy.lang.en import English
from ..tests.util import make_tempdir
def test_issue4674():
"""Test that setting entities with overlapping identifiers does not mess up IO... | Tidy up and expect warning | Tidy up and expect warning
| Python | mit | honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,honnibal/spaCy,spacy-io/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,honnibal/spaCy | # coding: utf-8
from __future__ import unicode_literals
from spacy.kb import KnowledgeBase
from spacy.util import ensure_path
from spacy.lang.en import English
from spacy.tests.util import make_tempdir
def test_issue4674():
"""Test that setting entities with overlapping identifiers does not mess up IO"""
nl... | # coding: utf-8
from __future__ import unicode_literals
import pytest
from spacy.kb import KnowledgeBase
from spacy.util import ensure_path
from spacy.lang.en import English
from ..tests.util import make_tempdir
def test_issue4674():
"""Test that setting entities with overlapping identifiers does not mess up IO... | <commit_before># coding: utf-8
from __future__ import unicode_literals
from spacy.kb import KnowledgeBase
from spacy.util import ensure_path
from spacy.lang.en import English
from spacy.tests.util import make_tempdir
def test_issue4674():
"""Test that setting entities with overlapping identifiers does not mess ... | # coding: utf-8
from __future__ import unicode_literals
import pytest
from spacy.kb import KnowledgeBase
from spacy.util import ensure_path
from spacy.lang.en import English
from ..tests.util import make_tempdir
def test_issue4674():
"""Test that setting entities with overlapping identifiers does not mess up IO... | # coding: utf-8
from __future__ import unicode_literals
from spacy.kb import KnowledgeBase
from spacy.util import ensure_path
from spacy.lang.en import English
from spacy.tests.util import make_tempdir
def test_issue4674():
"""Test that setting entities with overlapping identifiers does not mess up IO"""
nl... | <commit_before># coding: utf-8
from __future__ import unicode_literals
from spacy.kb import KnowledgeBase
from spacy.util import ensure_path
from spacy.lang.en import English
from spacy.tests.util import make_tempdir
def test_issue4674():
"""Test that setting entities with overlapping identifiers does not mess ... |
455cf39de018762d22b5d212f3a2c08491840bbf | tests/integration/cli/sync_test.py | tests/integration/cli/sync_test.py | from ...testcases import DustyIntegrationTestCase
from ...fixtures import busybox_single_app_bundle_fixture
class TestSyncCLI(DustyIntegrationTestCase):
def setUp(self):
super(TestSyncCLI, self).setUp()
busybox_single_app_bundle_fixture()
self.run_command('bundles activate busyboxa')
... | from ...testcases import DustyIntegrationTestCase
from ...fixtures import busybox_single_app_bundle_fixture
class TestSyncCLI(DustyIntegrationTestCase):
def setUp(self):
super(TestSyncCLI, self).setUp()
busybox_single_app_bundle_fixture()
self.run_command('bundles activate busyboxa')
... | Fix ordering problem in tearDown | Fix ordering problem in tearDown
| Python | mit | gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty | from ...testcases import DustyIntegrationTestCase
from ...fixtures import busybox_single_app_bundle_fixture
class TestSyncCLI(DustyIntegrationTestCase):
def setUp(self):
super(TestSyncCLI, self).setUp()
busybox_single_app_bundle_fixture()
self.run_command('bundles activate busyboxa')
... | from ...testcases import DustyIntegrationTestCase
from ...fixtures import busybox_single_app_bundle_fixture
class TestSyncCLI(DustyIntegrationTestCase):
def setUp(self):
super(TestSyncCLI, self).setUp()
busybox_single_app_bundle_fixture()
self.run_command('bundles activate busyboxa')
... | <commit_before>from ...testcases import DustyIntegrationTestCase
from ...fixtures import busybox_single_app_bundle_fixture
class TestSyncCLI(DustyIntegrationTestCase):
def setUp(self):
super(TestSyncCLI, self).setUp()
busybox_single_app_bundle_fixture()
self.run_command('bundles activate bu... | from ...testcases import DustyIntegrationTestCase
from ...fixtures import busybox_single_app_bundle_fixture
class TestSyncCLI(DustyIntegrationTestCase):
def setUp(self):
super(TestSyncCLI, self).setUp()
busybox_single_app_bundle_fixture()
self.run_command('bundles activate busyboxa')
... | from ...testcases import DustyIntegrationTestCase
from ...fixtures import busybox_single_app_bundle_fixture
class TestSyncCLI(DustyIntegrationTestCase):
def setUp(self):
super(TestSyncCLI, self).setUp()
busybox_single_app_bundle_fixture()
self.run_command('bundles activate busyboxa')
... | <commit_before>from ...testcases import DustyIntegrationTestCase
from ...fixtures import busybox_single_app_bundle_fixture
class TestSyncCLI(DustyIntegrationTestCase):
def setUp(self):
super(TestSyncCLI, self).setUp()
busybox_single_app_bundle_fixture()
self.run_command('bundles activate bu... |
6a330523ad683b7883cefa3878c7690fcb5dbd75 | TalkingToYouBot.py | TalkingToYouBot.py | from telegram import Updater
import json
import os
def getToken():
token = []
if not os.path.exists(file_path):
token.append(input('Insert Token here: '))
with open('token.json', 'w') as f:
json.dump(token, f)
else:
with open("token.json") as f:
token = json... | from telegram import Updater
import json
import os
def getToken():
token = []
if not os.path.exists(file_path):
token.append(input('Insert Token here: '))
with open('token.json', 'w') as f:
json.dump(token, f)
else:
with open("token.json") as f:
token = json... | Add simple Echo function and Bot initialisation | Add simple Echo function and Bot initialisation
| Python | mit | h4llow3En/IAmTalkingToYouBot | from telegram import Updater
import json
import os
def getToken():
token = []
if not os.path.exists(file_path):
token.append(input('Insert Token here: '))
with open('token.json', 'w') as f:
json.dump(token, f)
else:
with open("token.json") as f:
token = json... | from telegram import Updater
import json
import os
def getToken():
token = []
if not os.path.exists(file_path):
token.append(input('Insert Token here: '))
with open('token.json', 'w') as f:
json.dump(token, f)
else:
with open("token.json") as f:
token = json... | <commit_before>from telegram import Updater
import json
import os
def getToken():
token = []
if not os.path.exists(file_path):
token.append(input('Insert Token here: '))
with open('token.json', 'w') as f:
json.dump(token, f)
else:
with open("token.json") as f:
... | from telegram import Updater
import json
import os
def getToken():
token = []
if not os.path.exists(file_path):
token.append(input('Insert Token here: '))
with open('token.json', 'w') as f:
json.dump(token, f)
else:
with open("token.json") as f:
token = json... | from telegram import Updater
import json
import os
def getToken():
token = []
if not os.path.exists(file_path):
token.append(input('Insert Token here: '))
with open('token.json', 'w') as f:
json.dump(token, f)
else:
with open("token.json") as f:
token = json... | <commit_before>from telegram import Updater
import json
import os
def getToken():
token = []
if not os.path.exists(file_path):
token.append(input('Insert Token here: '))
with open('token.json', 'w') as f:
json.dump(token, f)
else:
with open("token.json") as f:
... |
64c967eff68163754ed9b9593030e70c26d65f50 | pygfunction/examples/unequal_segment_lengths.py | pygfunction/examples/unequal_segment_lengths.py | # -*- coding: utf-8 -*-
""" Example of calculation of g-functions with unequal segment lengths using
uniform and equal borehole wall temperatures.
The g-functions of a field of 6x4 boreholes is calculated with unequal
segment lengths.
"""
import matplotlib.pyplot as plt
import numpy as np
import pygfunct... | Add code to unequal segment length example | Add code to unequal segment length example
| Python | bsd-3-clause | MassimoCimmino/pygfunction | Add code to unequal segment length example | # -*- coding: utf-8 -*-
""" Example of calculation of g-functions with unequal segment lengths using
uniform and equal borehole wall temperatures.
The g-functions of a field of 6x4 boreholes is calculated with unequal
segment lengths.
"""
import matplotlib.pyplot as plt
import numpy as np
import pygfunct... | <commit_before><commit_msg>Add code to unequal segment length example<commit_after> | # -*- coding: utf-8 -*-
""" Example of calculation of g-functions with unequal segment lengths using
uniform and equal borehole wall temperatures.
The g-functions of a field of 6x4 boreholes is calculated with unequal
segment lengths.
"""
import matplotlib.pyplot as plt
import numpy as np
import pygfunct... | Add code to unequal segment length example# -*- coding: utf-8 -*-
""" Example of calculation of g-functions with unequal segment lengths using
uniform and equal borehole wall temperatures.
The g-functions of a field of 6x4 boreholes is calculated with unequal
segment lengths.
"""
import matplotlib.pyplot ... | <commit_before><commit_msg>Add code to unequal segment length example<commit_after># -*- coding: utf-8 -*-
""" Example of calculation of g-functions with unequal segment lengths using
uniform and equal borehole wall temperatures.
The g-functions of a field of 6x4 boreholes is calculated with unequal
segmen... | |
86a7b0e989e983063a1ff5afd098600bf34da401 | ixwsauth_server/api.py | ixwsauth_server/api.py | """
Tastypie API Authorization handlers
"""
from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
class ApplicationAuthentication(Authentication):
"""
Authenticate the API request by checking the application key.
"""
def is_authenticated(self, request, **... | """
Tastypie API Authorization handlers
"""
from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
class ApplicationAuthentication(Authentication):
"""
Authenticate the API request by checking the application key.
"""
def is_authenticated(self, request, **... | Add the consumer key to the identifier | Add the consumer key to the identifier
Used for rate limiting by API key.
Refs #17338
| Python | mit | infoxchange/ixwsauth | """
Tastypie API Authorization handlers
"""
from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
class ApplicationAuthentication(Authentication):
"""
Authenticate the API request by checking the application key.
"""
def is_authenticated(self, request, **... | """
Tastypie API Authorization handlers
"""
from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
class ApplicationAuthentication(Authentication):
"""
Authenticate the API request by checking the application key.
"""
def is_authenticated(self, request, **... | <commit_before>"""
Tastypie API Authorization handlers
"""
from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
class ApplicationAuthentication(Authentication):
"""
Authenticate the API request by checking the application key.
"""
def is_authenticated(se... | """
Tastypie API Authorization handlers
"""
from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
class ApplicationAuthentication(Authentication):
"""
Authenticate the API request by checking the application key.
"""
def is_authenticated(self, request, **... | """
Tastypie API Authorization handlers
"""
from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
class ApplicationAuthentication(Authentication):
"""
Authenticate the API request by checking the application key.
"""
def is_authenticated(self, request, **... | <commit_before>"""
Tastypie API Authorization handlers
"""
from tastypie.authentication import Authentication
from tastypie.authorization import Authorization
class ApplicationAuthentication(Authentication):
"""
Authenticate the API request by checking the application key.
"""
def is_authenticated(se... |
e3b5e23566830ab20a7e0358e1040e7a6a889b22 | podoc/conftest.py | podoc/conftest.py | # -*- coding: utf-8 -*-
"""py.test utilities."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import logging
from tempfile import TemporaryDirectory
from pytest import yield_fixture
from pod... | # -*- coding: utf-8 -*-
"""py.test utilities."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import logging
from tempfile import TemporaryDirectory
from pytest import yield_fixture
from pod... | Set the name of the dynamic plugin conversion tests | Set the name of the dynamic plugin conversion tests
| Python | bsd-3-clause | rossant/podoc,podoc/podoc,rossant/podoc,podoc/podoc | # -*- coding: utf-8 -*-
"""py.test utilities."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import logging
from tempfile import TemporaryDirectory
from pytest import yield_fixture
from pod... | # -*- coding: utf-8 -*-
"""py.test utilities."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import logging
from tempfile import TemporaryDirectory
from pytest import yield_fixture
from pod... | <commit_before># -*- coding: utf-8 -*-
"""py.test utilities."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import logging
from tempfile import TemporaryDirectory
from pytest import yield_fi... | # -*- coding: utf-8 -*-
"""py.test utilities."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import logging
from tempfile import TemporaryDirectory
from pytest import yield_fixture
from pod... | # -*- coding: utf-8 -*-
"""py.test utilities."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import logging
from tempfile import TemporaryDirectory
from pytest import yield_fixture
from pod... | <commit_before># -*- coding: utf-8 -*-
"""py.test utilities."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import logging
from tempfile import TemporaryDirectory
from pytest import yield_fi... |
07d62f1e9525719be48d862a86f3623368c02d9d | kuryr/lib/constants.py | kuryr/lib/constants.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | Change DEVICE_OWNER to make it more Neutron compliant | Change DEVICE_OWNER to make it more Neutron compliant
Change-Id: Id7a2973928c6df9e134e7b91000e90f244066703
| Python | apache-2.0 | openstack/kuryr,openstack/kuryr | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# dist... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# dist... |
eb63b0979763375522bc71ce2f06fb625151ea08 | MoMMI/Modules/wyci.py | MoMMI/Modules/wyci.py | import random
import re
from typing import Match
from discord import Message
from MoMMI import master, always_command, MChannel
@always_command("wyci")
async def wyci(channel: MChannel, _match: Match, message: Message) -> None:
match = re.search(r"\S\s+when[\s*?.!)]*$", message.content, re.IGNORECASE)
if match... | import random
import re
from typing import Match
from discord import Message
from MoMMI import master, always_command, MChannel
@always_command("wyci")
async def wyci(channel: MChannel, _match: Match, message: Message) -> None:
if not channel.server_config("wyci.enabled", True):
return
match = re.... | Add config to disable WYCI. | Add config to disable WYCI.
| Python | mit | PJB3005/MoMMI,PJB3005/MoMMI,PJB3005/MoMMI | import random
import re
from typing import Match
from discord import Message
from MoMMI import master, always_command, MChannel
@always_command("wyci")
async def wyci(channel: MChannel, _match: Match, message: Message) -> None:
match = re.search(r"\S\s+when[\s*?.!)]*$", message.content, re.IGNORECASE)
if match... | import random
import re
from typing import Match
from discord import Message
from MoMMI import master, always_command, MChannel
@always_command("wyci")
async def wyci(channel: MChannel, _match: Match, message: Message) -> None:
if not channel.server_config("wyci.enabled", True):
return
match = re.... | <commit_before>import random
import re
from typing import Match
from discord import Message
from MoMMI import master, always_command, MChannel
@always_command("wyci")
async def wyci(channel: MChannel, _match: Match, message: Message) -> None:
match = re.search(r"\S\s+when[\s*?.!)]*$", message.content, re.IGNORECAS... | import random
import re
from typing import Match
from discord import Message
from MoMMI import master, always_command, MChannel
@always_command("wyci")
async def wyci(channel: MChannel, _match: Match, message: Message) -> None:
if not channel.server_config("wyci.enabled", True):
return
match = re.... | import random
import re
from typing import Match
from discord import Message
from MoMMI import master, always_command, MChannel
@always_command("wyci")
async def wyci(channel: MChannel, _match: Match, message: Message) -> None:
match = re.search(r"\S\s+when[\s*?.!)]*$", message.content, re.IGNORECASE)
if match... | <commit_before>import random
import re
from typing import Match
from discord import Message
from MoMMI import master, always_command, MChannel
@always_command("wyci")
async def wyci(channel: MChannel, _match: Match, message: Message) -> None:
match = re.search(r"\S\s+when[\s*?.!)]*$", message.content, re.IGNORECAS... |
a0fb20f910f59737be725a1fc3d49d17cafa9107 | ella/articles/newman_admin.py | ella/articles/newman_admin.py | from django.utils.translation import ugettext_lazy as _
from ella.core.newman_admin import ListingInlineAdmin, PublishableAdmin,\
RelatedInlineAdmin
from ella.articles.models import Article
import ella_newman
class ArticleAdmin(PublishableAdmin):
fieldsets = (
(_("Article heading"), {'fields': ('titl... | from django.utils.translation import ugettext_lazy as _
from ella.core.newman_admin import ListingInlineAdmin, PublishableAdmin,\
RelatedInlineAdmin
from ella.articles.models import Article
import ella_newman
class ArticleAdmin(PublishableAdmin):
fieldsets = (
(_("Article heading"), {'fields': ('titl... | Fix pep8 on articles new man admin: E302 expected 2 blank lines | Fix pep8 on articles new man admin: E302 expected 2 blank lines
| Python | bsd-3-clause | WhiskeyMedia/ella,MichalMaM/ella,petrlosa/ella,whalerock/ella,petrlosa/ella,whalerock/ella,WhiskeyMedia/ella,ella/ella,whalerock/ella,MichalMaM/ella | from django.utils.translation import ugettext_lazy as _
from ella.core.newman_admin import ListingInlineAdmin, PublishableAdmin,\
RelatedInlineAdmin
from ella.articles.models import Article
import ella_newman
class ArticleAdmin(PublishableAdmin):
fieldsets = (
(_("Article heading"), {'fields': ('titl... | from django.utils.translation import ugettext_lazy as _
from ella.core.newman_admin import ListingInlineAdmin, PublishableAdmin,\
RelatedInlineAdmin
from ella.articles.models import Article
import ella_newman
class ArticleAdmin(PublishableAdmin):
fieldsets = (
(_("Article heading"), {'fields': ('titl... | <commit_before>from django.utils.translation import ugettext_lazy as _
from ella.core.newman_admin import ListingInlineAdmin, PublishableAdmin,\
RelatedInlineAdmin
from ella.articles.models import Article
import ella_newman
class ArticleAdmin(PublishableAdmin):
fieldsets = (
(_("Article heading"), {'... | from django.utils.translation import ugettext_lazy as _
from ella.core.newman_admin import ListingInlineAdmin, PublishableAdmin,\
RelatedInlineAdmin
from ella.articles.models import Article
import ella_newman
class ArticleAdmin(PublishableAdmin):
fieldsets = (
(_("Article heading"), {'fields': ('titl... | from django.utils.translation import ugettext_lazy as _
from ella.core.newman_admin import ListingInlineAdmin, PublishableAdmin,\
RelatedInlineAdmin
from ella.articles.models import Article
import ella_newman
class ArticleAdmin(PublishableAdmin):
fieldsets = (
(_("Article heading"), {'fields': ('titl... | <commit_before>from django.utils.translation import ugettext_lazy as _
from ella.core.newman_admin import ListingInlineAdmin, PublishableAdmin,\
RelatedInlineAdmin
from ella.articles.models import Article
import ella_newman
class ArticleAdmin(PublishableAdmin):
fieldsets = (
(_("Article heading"), {'... |
da9058064e2a94f717abe2f97af80d2daa4fa292 | likert_field/models.py | likert_field/models.py | #-*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
import likert_field.forms as forms
class LikertField(models.IntegerField):
"""A Likert field is simply stored as an IntegerField"""
description = _('Likert item... | #-*- coding: utf-8 -*-
from __future__ import unicode_literals
from six import string_types
from django.db import models
from django.utils.translation import ugettext_lazy as _
import likert_field.forms as forms
class LikertField(models.IntegerField):
"""A Likert field is simply stored as an IntegerField"""
... | Handle empty strings from unanswered items | Handle empty strings from unanswered items
| Python | bsd-3-clause | kelvinwong-ca/django-likert-field,kelvinwong-ca/django-likert-field | #-*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
import likert_field.forms as forms
class LikertField(models.IntegerField):
"""A Likert field is simply stored as an IntegerField"""
description = _('Likert item... | #-*- coding: utf-8 -*-
from __future__ import unicode_literals
from six import string_types
from django.db import models
from django.utils.translation import ugettext_lazy as _
import likert_field.forms as forms
class LikertField(models.IntegerField):
"""A Likert field is simply stored as an IntegerField"""
... | <commit_before>#-*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
import likert_field.forms as forms
class LikertField(models.IntegerField):
"""A Likert field is simply stored as an IntegerField"""
description =... | #-*- coding: utf-8 -*-
from __future__ import unicode_literals
from six import string_types
from django.db import models
from django.utils.translation import ugettext_lazy as _
import likert_field.forms as forms
class LikertField(models.IntegerField):
"""A Likert field is simply stored as an IntegerField"""
... | #-*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
import likert_field.forms as forms
class LikertField(models.IntegerField):
"""A Likert field is simply stored as an IntegerField"""
description = _('Likert item... | <commit_before>#-*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
import likert_field.forms as forms
class LikertField(models.IntegerField):
"""A Likert field is simply stored as an IntegerField"""
description =... |
049287c2ec73d46bbc4ad0c4b4778719d6fd4505 | src/dicomweb_client/__init__.py | src/dicomweb_client/__init__.py | __version__ = '0.9.4'
from dicomweb_client.api import DICOMwebClient
| __version__ = '0.10.0'
from dicomweb_client.api import DICOMwebClient
| Increase package version to 0.10.0 | Increase package version to 0.10.0
| Python | mit | MGHComputationalPathology/dicomweb-client | __version__ = '0.9.4'
from dicomweb_client.api import DICOMwebClient
Increase package version to 0.10.0 | __version__ = '0.10.0'
from dicomweb_client.api import DICOMwebClient
| <commit_before>__version__ = '0.9.4'
from dicomweb_client.api import DICOMwebClient
<commit_msg>Increase package version to 0.10.0<commit_after> | __version__ = '0.10.0'
from dicomweb_client.api import DICOMwebClient
| __version__ = '0.9.4'
from dicomweb_client.api import DICOMwebClient
Increase package version to 0.10.0__version__ = '0.10.0'
from dicomweb_client.api import DICOMwebClient
| <commit_before>__version__ = '0.9.4'
from dicomweb_client.api import DICOMwebClient
<commit_msg>Increase package version to 0.10.0<commit_after>__version__ = '0.10.0'
from dicomweb_client.api import DICOMwebClient
|
22855458c7c683353f2ed7b577289b63da8bc9c6 | src/scikit-cycling/skcycling/utils/io_fit.py | src/scikit-cycling/skcycling/utils/io_fit.py | import numpy as np
from fitparse import FitFile
def load_power_from_fit(filename):
""" Method to open the power data from FIT file into a numpy array.
Parameters
----------
filename: str,
Path to the FIT file.
"""
# Check that the filename has the good extension
if filename.endsw... | import numpy as np
from fitparse import FitFile
def load_power_from_fit(filename):
""" Method to open the power data from FIT file into a numpy array.
Parameters
----------
filename: str,
Path to the FIT file.
"""
# Check that the filename has the good extension
if filename.endsw... | Solve the issue of the power got disconnected during the ride | Solve the issue of the power got disconnected during the ride
| Python | mit | glemaitre/power-profile,glemaitre/power-profile,clemaitre58/power-profile,clemaitre58/power-profile | import numpy as np
from fitparse import FitFile
def load_power_from_fit(filename):
""" Method to open the power data from FIT file into a numpy array.
Parameters
----------
filename: str,
Path to the FIT file.
"""
# Check that the filename has the good extension
if filename.endsw... | import numpy as np
from fitparse import FitFile
def load_power_from_fit(filename):
""" Method to open the power data from FIT file into a numpy array.
Parameters
----------
filename: str,
Path to the FIT file.
"""
# Check that the filename has the good extension
if filename.endsw... | <commit_before>import numpy as np
from fitparse import FitFile
def load_power_from_fit(filename):
""" Method to open the power data from FIT file into a numpy array.
Parameters
----------
filename: str,
Path to the FIT file.
"""
# Check that the filename has the good extension
if... | import numpy as np
from fitparse import FitFile
def load_power_from_fit(filename):
""" Method to open the power data from FIT file into a numpy array.
Parameters
----------
filename: str,
Path to the FIT file.
"""
# Check that the filename has the good extension
if filename.endsw... | import numpy as np
from fitparse import FitFile
def load_power_from_fit(filename):
""" Method to open the power data from FIT file into a numpy array.
Parameters
----------
filename: str,
Path to the FIT file.
"""
# Check that the filename has the good extension
if filename.endsw... | <commit_before>import numpy as np
from fitparse import FitFile
def load_power_from_fit(filename):
""" Method to open the power data from FIT file into a numpy array.
Parameters
----------
filename: str,
Path to the FIT file.
"""
# Check that the filename has the good extension
if... |
844e3635aeb0144f7e4cc0d9de3bfc219312bbe5 | ocradmin/plugins/views.py | ocradmin/plugins/views.py | """
RESTful interface to interacting with OCR plugins.
"""
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render_to_response
from ocradmin.ocrtasks.models import OcrTask
from ocradmin.plugins.manager import ModuleManager
import logging
logger = logging.getLogger(__na... | """
RESTful interface to interacting with OCR plugins.
"""
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render_to_response
from ocradmin.ocrtasks.models import OcrTask
from ocradmin.plugins.manager import ModuleManager
import logging
logger = logging.getLogger(__na... | Include the eval'd node type in the async return | Include the eval'd node type in the async return
| Python | apache-2.0 | vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium | """
RESTful interface to interacting with OCR plugins.
"""
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render_to_response
from ocradmin.ocrtasks.models import OcrTask
from ocradmin.plugins.manager import ModuleManager
import logging
logger = logging.getLogger(__na... | """
RESTful interface to interacting with OCR plugins.
"""
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render_to_response
from ocradmin.ocrtasks.models import OcrTask
from ocradmin.plugins.manager import ModuleManager
import logging
logger = logging.getLogger(__na... | <commit_before>"""
RESTful interface to interacting with OCR plugins.
"""
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render_to_response
from ocradmin.ocrtasks.models import OcrTask
from ocradmin.plugins.manager import ModuleManager
import logging
logger = logging... | """
RESTful interface to interacting with OCR plugins.
"""
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render_to_response
from ocradmin.ocrtasks.models import OcrTask
from ocradmin.plugins.manager import ModuleManager
import logging
logger = logging.getLogger(__na... | """
RESTful interface to interacting with OCR plugins.
"""
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render_to_response
from ocradmin.ocrtasks.models import OcrTask
from ocradmin.plugins.manager import ModuleManager
import logging
logger = logging.getLogger(__na... | <commit_before>"""
RESTful interface to interacting with OCR plugins.
"""
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render_to_response
from ocradmin.ocrtasks.models import OcrTask
from ocradmin.plugins.manager import ModuleManager
import logging
logger = logging... |
b052c2fd93cd578723c93dbe7357f1f3c82273eb | src/poliastro/patched_conics.py | src/poliastro/patched_conics.py | # coding: utf-8
"""Patched Conics Computations
Contains methods to compute interplanetary trajectories approximating the three
body problem with Patched Conics.
"""
from astropy import units as u
from poliastro.twobody import Orbit
from poliastro.constants import J2000
@u.quantity_input(a=u.m)
def compute_soi(body,... | # coding: utf-8
"""Patched Conics Computations
Contains methods to compute interplanetary trajectories approximating the three
body problem with Patched Conics.
"""
from astropy import units as u
from poliastro.twobody import Orbit
from poliastro.constants import J2000
@u.quantity_input(a=u.m)
def compute_soi(body,... | Replace prints by an exception | Replace prints by an exception
| Python | mit | anhiga/poliastro,Juanlu001/poliastro,anhiga/poliastro,poliastro/poliastro,newlawrence/poliastro,newlawrence/poliastro,Juanlu001/poliastro,newlawrence/poliastro,anhiga/poliastro,Juanlu001/poliastro | # coding: utf-8
"""Patched Conics Computations
Contains methods to compute interplanetary trajectories approximating the three
body problem with Patched Conics.
"""
from astropy import units as u
from poliastro.twobody import Orbit
from poliastro.constants import J2000
@u.quantity_input(a=u.m)
def compute_soi(body,... | # coding: utf-8
"""Patched Conics Computations
Contains methods to compute interplanetary trajectories approximating the three
body problem with Patched Conics.
"""
from astropy import units as u
from poliastro.twobody import Orbit
from poliastro.constants import J2000
@u.quantity_input(a=u.m)
def compute_soi(body,... | <commit_before># coding: utf-8
"""Patched Conics Computations
Contains methods to compute interplanetary trajectories approximating the three
body problem with Patched Conics.
"""
from astropy import units as u
from poliastro.twobody import Orbit
from poliastro.constants import J2000
@u.quantity_input(a=u.m)
def co... | # coding: utf-8
"""Patched Conics Computations
Contains methods to compute interplanetary trajectories approximating the three
body problem with Patched Conics.
"""
from astropy import units as u
from poliastro.twobody import Orbit
from poliastro.constants import J2000
@u.quantity_input(a=u.m)
def compute_soi(body,... | # coding: utf-8
"""Patched Conics Computations
Contains methods to compute interplanetary trajectories approximating the three
body problem with Patched Conics.
"""
from astropy import units as u
from poliastro.twobody import Orbit
from poliastro.constants import J2000
@u.quantity_input(a=u.m)
def compute_soi(body,... | <commit_before># coding: utf-8
"""Patched Conics Computations
Contains methods to compute interplanetary trajectories approximating the three
body problem with Patched Conics.
"""
from astropy import units as u
from poliastro.twobody import Orbit
from poliastro.constants import J2000
@u.quantity_input(a=u.m)
def co... |
d156beeaf0638e585c616d697e1ecd76a98d8a3f | axelrod/tests/test_reflex.py | axelrod/tests/test_reflex.py | """
Test suite for Reflex Axelrod PD player.
"""
import axelrod
from test_player import TestPlayer
class Reflex_test(TestPlayer):
def test_initial_nice_strategy(self):
""" First response should always be cooperation. """
p1 = axelrod.Reflex()
p2 = axelrod.Player()
self.assertEqual... | """
Test suite for Reflex Axelrod PD player.
"""
import axelrod
from test_player import TestPlayer
class Reflex_test(TestPlayer):
name = "Reflex"
player = axelrod.Reflex
stochastic = False
def test_strategy(self):
""" First response should always be cooperation. """
p1 = axelrod.Ref... | Simplify tests to new format. | Simplify tests to new format.
| Python | mit | marcharper/Axelrod,ranjinidas/Axelrod,marcharper/Axelrod,ranjinidas/Axelrod | """
Test suite for Reflex Axelrod PD player.
"""
import axelrod
from test_player import TestPlayer
class Reflex_test(TestPlayer):
def test_initial_nice_strategy(self):
""" First response should always be cooperation. """
p1 = axelrod.Reflex()
p2 = axelrod.Player()
self.assertEqual... | """
Test suite for Reflex Axelrod PD player.
"""
import axelrod
from test_player import TestPlayer
class Reflex_test(TestPlayer):
name = "Reflex"
player = axelrod.Reflex
stochastic = False
def test_strategy(self):
""" First response should always be cooperation. """
p1 = axelrod.Ref... | <commit_before>"""
Test suite for Reflex Axelrod PD player.
"""
import axelrod
from test_player import TestPlayer
class Reflex_test(TestPlayer):
def test_initial_nice_strategy(self):
""" First response should always be cooperation. """
p1 = axelrod.Reflex()
p2 = axelrod.Player()
s... | """
Test suite for Reflex Axelrod PD player.
"""
import axelrod
from test_player import TestPlayer
class Reflex_test(TestPlayer):
name = "Reflex"
player = axelrod.Reflex
stochastic = False
def test_strategy(self):
""" First response should always be cooperation. """
p1 = axelrod.Ref... | """
Test suite for Reflex Axelrod PD player.
"""
import axelrod
from test_player import TestPlayer
class Reflex_test(TestPlayer):
def test_initial_nice_strategy(self):
""" First response should always be cooperation. """
p1 = axelrod.Reflex()
p2 = axelrod.Player()
self.assertEqual... | <commit_before>"""
Test suite for Reflex Axelrod PD player.
"""
import axelrod
from test_player import TestPlayer
class Reflex_test(TestPlayer):
def test_initial_nice_strategy(self):
""" First response should always be cooperation. """
p1 = axelrod.Reflex()
p2 = axelrod.Player()
s... |
9f208fd476c8864a1b4c294b80d5d8191c400fb5 | admin_sso/admin.py | admin_sso/admin.py | from django.conf.urls import url
from django.contrib import admin
from admin_sso import settings
from admin_sso.models import Assignment
class AssignmentAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'username', 'username_mode', 'domain',
'user', 'weight')
list_editable = ('usern... | from django.conf.urls import url
from django.contrib import admin
from admin_sso import settings
from admin_sso.models import Assignment
class AssignmentAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'username', 'username_mode', 'domain',
'user', 'weight')
list_editable = ('usern... | Add user to raw_id_fields, drastically improves UX on sites with many users | Add user to raw_id_fields, drastically improves UX on sites with many users
| Python | bsd-3-clause | matthiask/django-admin-sso,diegobz/django-admin-sso,diegobz/django-admin-sso,matthiask/django-admin-sso | from django.conf.urls import url
from django.contrib import admin
from admin_sso import settings
from admin_sso.models import Assignment
class AssignmentAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'username', 'username_mode', 'domain',
'user', 'weight')
list_editable = ('usern... | from django.conf.urls import url
from django.contrib import admin
from admin_sso import settings
from admin_sso.models import Assignment
class AssignmentAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'username', 'username_mode', 'domain',
'user', 'weight')
list_editable = ('usern... | <commit_before>from django.conf.urls import url
from django.contrib import admin
from admin_sso import settings
from admin_sso.models import Assignment
class AssignmentAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'username', 'username_mode', 'domain',
'user', 'weight')
list_edi... | from django.conf.urls import url
from django.contrib import admin
from admin_sso import settings
from admin_sso.models import Assignment
class AssignmentAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'username', 'username_mode', 'domain',
'user', 'weight')
list_editable = ('usern... | from django.conf.urls import url
from django.contrib import admin
from admin_sso import settings
from admin_sso.models import Assignment
class AssignmentAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'username', 'username_mode', 'domain',
'user', 'weight')
list_editable = ('usern... | <commit_before>from django.conf.urls import url
from django.contrib import admin
from admin_sso import settings
from admin_sso.models import Assignment
class AssignmentAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'username', 'username_mode', 'domain',
'user', 'weight')
list_edi... |
4b18a9fe5454055131202c60f057ffa3372dadbb | parsec/commands/cmd_config_init.py | parsec/commands/cmd_config_init.py | import os
import click
from parsec.cli import pass_context
from parsec import options
from parsec import config
from parsec.io import warn, info
CONFIG_TEMPLATE = """## Parsec Global Configuration File.
# Each stanza should contian a single galaxy server to control.
local:
key: "<TODO>"
email: "<TODO>"
... | import os
import click
from parsec.cli import pass_context
from parsec import options
from parsec import config
from parsec.io import warn, info
CONFIG_TEMPLATE = """## Parsec Global Configuration File.
# Each stanza should contian a single galaxy server to control.
local:
key: "%(key)s"
email: "<TODO>"
... | Allow bootstrapping config with values | Allow bootstrapping config with values
| Python | apache-2.0 | galaxy-iuc/parsec | import os
import click
from parsec.cli import pass_context
from parsec import options
from parsec import config
from parsec.io import warn, info
CONFIG_TEMPLATE = """## Parsec Global Configuration File.
# Each stanza should contian a single galaxy server to control.
local:
key: "<TODO>"
email: "<TODO>"
... | import os
import click
from parsec.cli import pass_context
from parsec import options
from parsec import config
from parsec.io import warn, info
CONFIG_TEMPLATE = """## Parsec Global Configuration File.
# Each stanza should contian a single galaxy server to control.
local:
key: "%(key)s"
email: "<TODO>"
... | <commit_before>import os
import click
from parsec.cli import pass_context
from parsec import options
from parsec import config
from parsec.io import warn, info
CONFIG_TEMPLATE = """## Parsec Global Configuration File.
# Each stanza should contian a single galaxy server to control.
local:
key: "<TODO>"
email... | import os
import click
from parsec.cli import pass_context
from parsec import options
from parsec import config
from parsec.io import warn, info
CONFIG_TEMPLATE = """## Parsec Global Configuration File.
# Each stanza should contian a single galaxy server to control.
local:
key: "%(key)s"
email: "<TODO>"
... | import os
import click
from parsec.cli import pass_context
from parsec import options
from parsec import config
from parsec.io import warn, info
CONFIG_TEMPLATE = """## Parsec Global Configuration File.
# Each stanza should contian a single galaxy server to control.
local:
key: "<TODO>"
email: "<TODO>"
... | <commit_before>import os
import click
from parsec.cli import pass_context
from parsec import options
from parsec import config
from parsec.io import warn, info
CONFIG_TEMPLATE = """## Parsec Global Configuration File.
# Each stanza should contian a single galaxy server to control.
local:
key: "<TODO>"
email... |
c87b5a51bc0fd69ed3ec1eddeedd3111820d3252 | biblio/__init__.py | biblio/__init__.py | """
Connect to the UGent Biblio API
"""
from .biblio import search, BASE_URL, publications_by_person
__author__ = 'Stef Bastiaansen'
__email__ = 'stef.bastiaansen@ugent.be'
__copyright__ = 'Copyright (c) 2016 LT3 - UGent'
__license__ = 'Apache License 2.0'
__version__ = '0.1'
__url__ = 'https://github.com/megasnort/py... | """
Connect to the UGent Biblio API
"""
from biblio import search, BASE_URL, publications_by_person
__author__ = 'Stef Bastiaansen'
__email__ = 'stef.bastiaansen@ugent.be'
__copyright__ = 'Copyright (c) 2016 LT3 - UGent'
__license__ = 'Apache License 2.0'
__version__ = '0.1'
__url__ = 'https://github.com/megasnort/pyt... | Fix import location of biblio package | Fix import location of biblio package
| Python | apache-2.0 | megasnort/python-ugent-biblio | """
Connect to the UGent Biblio API
"""
from .biblio import search, BASE_URL, publications_by_person
__author__ = 'Stef Bastiaansen'
__email__ = 'stef.bastiaansen@ugent.be'
__copyright__ = 'Copyright (c) 2016 LT3 - UGent'
__license__ = 'Apache License 2.0'
__version__ = '0.1'
__url__ = 'https://github.com/megasnort/py... | """
Connect to the UGent Biblio API
"""
from biblio import search, BASE_URL, publications_by_person
__author__ = 'Stef Bastiaansen'
__email__ = 'stef.bastiaansen@ugent.be'
__copyright__ = 'Copyright (c) 2016 LT3 - UGent'
__license__ = 'Apache License 2.0'
__version__ = '0.1'
__url__ = 'https://github.com/megasnort/pyt... | <commit_before>"""
Connect to the UGent Biblio API
"""
from .biblio import search, BASE_URL, publications_by_person
__author__ = 'Stef Bastiaansen'
__email__ = 'stef.bastiaansen@ugent.be'
__copyright__ = 'Copyright (c) 2016 LT3 - UGent'
__license__ = 'Apache License 2.0'
__version__ = '0.1'
__url__ = 'https://github.c... | """
Connect to the UGent Biblio API
"""
from biblio import search, BASE_URL, publications_by_person
__author__ = 'Stef Bastiaansen'
__email__ = 'stef.bastiaansen@ugent.be'
__copyright__ = 'Copyright (c) 2016 LT3 - UGent'
__license__ = 'Apache License 2.0'
__version__ = '0.1'
__url__ = 'https://github.com/megasnort/pyt... | """
Connect to the UGent Biblio API
"""
from .biblio import search, BASE_URL, publications_by_person
__author__ = 'Stef Bastiaansen'
__email__ = 'stef.bastiaansen@ugent.be'
__copyright__ = 'Copyright (c) 2016 LT3 - UGent'
__license__ = 'Apache License 2.0'
__version__ = '0.1'
__url__ = 'https://github.com/megasnort/py... | <commit_before>"""
Connect to the UGent Biblio API
"""
from .biblio import search, BASE_URL, publications_by_person
__author__ = 'Stef Bastiaansen'
__email__ = 'stef.bastiaansen@ugent.be'
__copyright__ = 'Copyright (c) 2016 LT3 - UGent'
__license__ = 'Apache License 2.0'
__version__ = '0.1'
__url__ = 'https://github.c... |
e255b92589000c2d485d35f9008b78e0313b4374 | pystache/template_spec.py | pystache/template_spec.py | # coding: utf-8
"""
Provides a class to customize template information on a per-view basis.
To customize template properties for a particular view, create that view
from a class that subclasses TemplateSpec. The "Spec" in TemplateSpec
stands for template information that is "special" or "specified".
"""
# TODO: fi... | # coding: utf-8
"""
Provides a class to customize template information on a per-view basis.
To customize template properties for a particular view, create that view
from a class that subclasses TemplateSpec. The "spec" in TemplateSpec
stands for "special" or "specified" template information.
"""
class TemplateSpec... | Reorder TemplateSpec attributes and add to docstring. | Reorder TemplateSpec attributes and add to docstring.
| Python | mit | nitish116/pystache,rismalrv/pystache,charbeljc/pystache,rismalrv/pystache,harsh00008/pystache,arlenesr28/pystache,defunkt/pystache,beni55/pystache,nitish116/pystache,nitish116/pystache,rismalrv/pystache,jrnold/pystache,jrnold/pystache,harsh00008/pystache,harsh00008/pystache,charbeljc/pystache,arlenesr28/pystache,beni55... | # coding: utf-8
"""
Provides a class to customize template information on a per-view basis.
To customize template properties for a particular view, create that view
from a class that subclasses TemplateSpec. The "Spec" in TemplateSpec
stands for template information that is "special" or "specified".
"""
# TODO: fi... | # coding: utf-8
"""
Provides a class to customize template information on a per-view basis.
To customize template properties for a particular view, create that view
from a class that subclasses TemplateSpec. The "spec" in TemplateSpec
stands for "special" or "specified" template information.
"""
class TemplateSpec... | <commit_before># coding: utf-8
"""
Provides a class to customize template information on a per-view basis.
To customize template properties for a particular view, create that view
from a class that subclasses TemplateSpec. The "Spec" in TemplateSpec
stands for template information that is "special" or "specified".
... | # coding: utf-8
"""
Provides a class to customize template information on a per-view basis.
To customize template properties for a particular view, create that view
from a class that subclasses TemplateSpec. The "spec" in TemplateSpec
stands for "special" or "specified" template information.
"""
class TemplateSpec... | # coding: utf-8
"""
Provides a class to customize template information on a per-view basis.
To customize template properties for a particular view, create that view
from a class that subclasses TemplateSpec. The "Spec" in TemplateSpec
stands for template information that is "special" or "specified".
"""
# TODO: fi... | <commit_before># coding: utf-8
"""
Provides a class to customize template information on a per-view basis.
To customize template properties for a particular view, create that view
from a class that subclasses TemplateSpec. The "Spec" in TemplateSpec
stands for template information that is "special" or "specified".
... |
ecb3a296b379f4abdc03ce5de447b30ada5f124e | txircd/modules/rfc/cmode_l.py | txircd/modules/rfc/cmode_l.py | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class LimitMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "Lim... | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class LimitMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "Lim... | Return the parameter for channel mode +l as a list | Return the parameter for channel mode +l as a list
This fixes a bug where every digit was handled as a separate parameter, causing
"MODE #channel +l 10" to turn into "MODE #channel +ll 1 0"
| Python | bsd-3-clause | Heufneutje/txircd,ElementalAlchemist/txircd | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class LimitMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "Lim... | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class LimitMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "Lim... | <commit_before>from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class LimitMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
... | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class LimitMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "Lim... | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class LimitMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "Lim... | <commit_before>from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class LimitMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
... |
a3ca99ab519401df8f2418ce877065dc3aa63146 | app/parsers/models.py | app/parsers/models.py | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | Add message_age property to ParsedMessage | Add message_age property to ParsedMessage
| Python | apache-2.0 | forseti-security/real-time-enforcer | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | <commit_before>#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# dist... | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | <commit_before>#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# dist... |
9cf29c769e3902c44914d3e216ae9457aa7e5fef | api/api/config_settings/redis_settings.py | api/api/config_settings/redis_settings.py | import redis
from api.utils import config
class RedisPools(object):
EXPERIMENTS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_EXPERIMENTS_STATUS_URL'))
JOBS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_JOBS_STATUS_URL'))
JOB_CONTAIN... | import redis
from api.utils import config
class RedisPools(object):
EXPERIMENTS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_EXPERIMENTS_STATUS_URL'))
JOBS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_JOBS_STATUS_URL'))
JOB_CONTAIN... | Add to stream redis db | Add to stream redis db
| Python | apache-2.0 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | import redis
from api.utils import config
class RedisPools(object):
EXPERIMENTS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_EXPERIMENTS_STATUS_URL'))
JOBS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_JOBS_STATUS_URL'))
JOB_CONTAIN... | import redis
from api.utils import config
class RedisPools(object):
EXPERIMENTS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_EXPERIMENTS_STATUS_URL'))
JOBS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_JOBS_STATUS_URL'))
JOB_CONTAIN... | <commit_before>import redis
from api.utils import config
class RedisPools(object):
EXPERIMENTS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_EXPERIMENTS_STATUS_URL'))
JOBS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_JOBS_STATUS_URL'))
... | import redis
from api.utils import config
class RedisPools(object):
EXPERIMENTS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_EXPERIMENTS_STATUS_URL'))
JOBS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_JOBS_STATUS_URL'))
JOB_CONTAIN... | import redis
from api.utils import config
class RedisPools(object):
EXPERIMENTS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_EXPERIMENTS_STATUS_URL'))
JOBS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_JOBS_STATUS_URL'))
JOB_CONTAIN... | <commit_before>import redis
from api.utils import config
class RedisPools(object):
EXPERIMENTS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_EXPERIMENTS_STATUS_URL'))
JOBS_STATUS = redis.ConnectionPool.from_url(
config.get_string('POLYAXON_REDIS_JOBS_STATUS_URL'))
... |
66b49f913513545e5ae0484963412e965c8f9aa1 | saleor/dashboard/category/forms.py | saleor/dashboard/category/forms.py | from django import forms
from django.utils.translation import ugettext_lazy as _
from mptt.forms import TreeNodeChoiceField
from ...product.models import Category
class CategoryForm(forms.ModelForm):
class Meta:
model = Category
exclude = []
def __init__(self, *args, **kwargs):
super... | from django import forms
from django.utils.translation import ugettext_lazy as _
from mptt.forms import TreeNodeChoiceField
from ...product.models import Category
class CategoryForm(forms.ModelForm):
class Meta:
model = Category
exclude = []
def __init__(self, *args, **kwargs):
super... | Check if new parent is not a descendant of current category | Check if new parent is not a descendant of current category
| Python | bsd-3-clause | rchav/vinerack,HyperManTT/ECommerceSaleor,rchav/vinerack,taedori81/saleor,jreigel/saleor,tfroehlich82/saleor,avorio/saleor,paweltin/saleor,laosunhust/saleor,UITools/saleor,spartonia/saleor,arth-co/saleor,spartonia/saleor,taedori81/saleor,arth-co/saleor,rchav/vinerack,tfroehlich82/saleor,avorio/saleor,josesanch/saleor,U... | from django import forms
from django.utils.translation import ugettext_lazy as _
from mptt.forms import TreeNodeChoiceField
from ...product.models import Category
class CategoryForm(forms.ModelForm):
class Meta:
model = Category
exclude = []
def __init__(self, *args, **kwargs):
super... | from django import forms
from django.utils.translation import ugettext_lazy as _
from mptt.forms import TreeNodeChoiceField
from ...product.models import Category
class CategoryForm(forms.ModelForm):
class Meta:
model = Category
exclude = []
def __init__(self, *args, **kwargs):
super... | <commit_before>from django import forms
from django.utils.translation import ugettext_lazy as _
from mptt.forms import TreeNodeChoiceField
from ...product.models import Category
class CategoryForm(forms.ModelForm):
class Meta:
model = Category
exclude = []
def __init__(self, *args, **kwargs)... | from django import forms
from django.utils.translation import ugettext_lazy as _
from mptt.forms import TreeNodeChoiceField
from ...product.models import Category
class CategoryForm(forms.ModelForm):
class Meta:
model = Category
exclude = []
def __init__(self, *args, **kwargs):
super... | from django import forms
from django.utils.translation import ugettext_lazy as _
from mptt.forms import TreeNodeChoiceField
from ...product.models import Category
class CategoryForm(forms.ModelForm):
class Meta:
model = Category
exclude = []
def __init__(self, *args, **kwargs):
super... | <commit_before>from django import forms
from django.utils.translation import ugettext_lazy as _
from mptt.forms import TreeNodeChoiceField
from ...product.models import Category
class CategoryForm(forms.ModelForm):
class Meta:
model = Category
exclude = []
def __init__(self, *args, **kwargs)... |
c7d9287b770a0033cb54f9c1f9ac5f8beb25d528 | scripts/cronRefreshEdxQualtrics.py | scripts/cronRefreshEdxQualtrics.py | from surveyextractor import QualtricsExtractor
import getopt
import sys
### Script for scheduling regular EdxQualtrics updates
### Usage for cron should be "cronRefreshEdxQualtrics.py -m -s -r"
# Append directory for dependencies to PYTHONPATH
sys.path.append("/home/dataman/Code/qualtrics_etl/src/qualtrics_etl/")
qe... | from surveyextractor import QualtricsExtractor
import getopt, sys
# Script for scheduling regular EdxQualtrics updates
# Usage for cron should be "cronRefreshEdxQualtrics.py -m -s -r"
qe = QualtricsExtractor()
opts, args = getopt.getopt(sys.argv[1:], 'amsr', ['--reset', '--loadmeta', '--loadsurveys', '--loadresponses... | Revert "Added script for cron job to load surveys to database." | Revert "Added script for cron job to load surveys to database."
This reverts commit 34e5560437348e5cfeab589b783c9cc524aa2abf.
| Python | bsd-3-clause | paepcke/json_to_relation,paepcke/json_to_relation,paepcke/json_to_relation,paepcke/json_to_relation | from surveyextractor import QualtricsExtractor
import getopt
import sys
### Script for scheduling regular EdxQualtrics updates
### Usage for cron should be "cronRefreshEdxQualtrics.py -m -s -r"
# Append directory for dependencies to PYTHONPATH
sys.path.append("/home/dataman/Code/qualtrics_etl/src/qualtrics_etl/")
qe... | from surveyextractor import QualtricsExtractor
import getopt, sys
# Script for scheduling regular EdxQualtrics updates
# Usage for cron should be "cronRefreshEdxQualtrics.py -m -s -r"
qe = QualtricsExtractor()
opts, args = getopt.getopt(sys.argv[1:], 'amsr', ['--reset', '--loadmeta', '--loadsurveys', '--loadresponses... | <commit_before>from surveyextractor import QualtricsExtractor
import getopt
import sys
### Script for scheduling regular EdxQualtrics updates
### Usage for cron should be "cronRefreshEdxQualtrics.py -m -s -r"
# Append directory for dependencies to PYTHONPATH
sys.path.append("/home/dataman/Code/qualtrics_etl/src/qualt... | from surveyextractor import QualtricsExtractor
import getopt, sys
# Script for scheduling regular EdxQualtrics updates
# Usage for cron should be "cronRefreshEdxQualtrics.py -m -s -r"
qe = QualtricsExtractor()
opts, args = getopt.getopt(sys.argv[1:], 'amsr', ['--reset', '--loadmeta', '--loadsurveys', '--loadresponses... | from surveyextractor import QualtricsExtractor
import getopt
import sys
### Script for scheduling regular EdxQualtrics updates
### Usage for cron should be "cronRefreshEdxQualtrics.py -m -s -r"
# Append directory for dependencies to PYTHONPATH
sys.path.append("/home/dataman/Code/qualtrics_etl/src/qualtrics_etl/")
qe... | <commit_before>from surveyextractor import QualtricsExtractor
import getopt
import sys
### Script for scheduling regular EdxQualtrics updates
### Usage for cron should be "cronRefreshEdxQualtrics.py -m -s -r"
# Append directory for dependencies to PYTHONPATH
sys.path.append("/home/dataman/Code/qualtrics_etl/src/qualt... |
250458aeb6619587443d6896c46a49c9754951e4 | byceps/services/tourney/models/tourney.py | byceps/services/tourney/models/tourney.py | """
byceps.services.tourney.models.tourney
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from typing import NewType
from uuid import UUID
from ....database import db, generate_uuid
from ....util.instances import ReprBuilder
fr... | """
byceps.services.tourney.models.tourney
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from typing import NewType
from uuid import UUID
from ....database import db, generate_uuid
from ....util.instances import ReprBuilder
fr... | Fix `Tourney` model's database table name | Fix `Tourney` model's database table name
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps | """
byceps.services.tourney.models.tourney
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from typing import NewType
from uuid import UUID
from ....database import db, generate_uuid
from ....util.instances import ReprBuilder
fr... | """
byceps.services.tourney.models.tourney
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from typing import NewType
from uuid import UUID
from ....database import db, generate_uuid
from ....util.instances import ReprBuilder
fr... | <commit_before>"""
byceps.services.tourney.models.tourney
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from typing import NewType
from uuid import UUID
from ....database import db, generate_uuid
from ....util.instances import ... | """
byceps.services.tourney.models.tourney
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from typing import NewType
from uuid import UUID
from ....database import db, generate_uuid
from ....util.instances import ReprBuilder
fr... | """
byceps.services.tourney.models.tourney
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from typing import NewType
from uuid import UUID
from ....database import db, generate_uuid
from ....util.instances import ReprBuilder
fr... | <commit_before>"""
byceps.services.tourney.models.tourney
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from typing import NewType
from uuid import UUID
from ....database import db, generate_uuid
from ....util.instances import ... |
d5049edc8567cebf936bb07847906c5400f9a6d9 | ceph_deploy/tests/unit/hosts/test_suse.py | ceph_deploy/tests/unit/hosts/test_suse.py | from ceph_deploy.hosts import suse
class TestSuseInit(object):
def setup(self):
self.host = suse
def test_choose_init_default(self):
self.host.release = None
init_type = self.host.choose_init()
assert init_type == "sysvinit"
def test_choose_init_SLE_11(self):
... | from ceph_deploy.hosts import suse
from ceph_deploy.hosts.suse.install import map_components
class TestSuseInit(object):
def setup(self):
self.host = suse
def test_choose_init_default(self):
self.host.release = None
init_type = self.host.choose_init()
assert init_type == "sysv... | Add tests for component to SUSE package mapping | Add tests for component to SUSE package mapping
Signed-off-by: David Disseldorp <589a549dc9f982d9f46aeeb82a09ab6d87ccf1d8@suse.de>
| Python | mit | zhouyuan/ceph-deploy,shenhequnying/ceph-deploy,ceph/ceph-deploy,ghxandsky/ceph-deploy,zhouyuan/ceph-deploy,imzhulei/ceph-deploy,SUSE/ceph-deploy,Vicente-Cheng/ceph-deploy,ceph/ceph-deploy,branto1/ceph-deploy,trhoden/ceph-deploy,trhoden/ceph-deploy,osynge/ceph-deploy,ghxandsky/ceph-deploy,SUSE/ceph-deploy,branto1/ceph-d... | from ceph_deploy.hosts import suse
class TestSuseInit(object):
def setup(self):
self.host = suse
def test_choose_init_default(self):
self.host.release = None
init_type = self.host.choose_init()
assert init_type == "sysvinit"
def test_choose_init_SLE_11(self):
... | from ceph_deploy.hosts import suse
from ceph_deploy.hosts.suse.install import map_components
class TestSuseInit(object):
def setup(self):
self.host = suse
def test_choose_init_default(self):
self.host.release = None
init_type = self.host.choose_init()
assert init_type == "sysv... | <commit_before>from ceph_deploy.hosts import suse
class TestSuseInit(object):
def setup(self):
self.host = suse
def test_choose_init_default(self):
self.host.release = None
init_type = self.host.choose_init()
assert init_type == "sysvinit"
def test_choose_init_SLE... | from ceph_deploy.hosts import suse
from ceph_deploy.hosts.suse.install import map_components
class TestSuseInit(object):
def setup(self):
self.host = suse
def test_choose_init_default(self):
self.host.release = None
init_type = self.host.choose_init()
assert init_type == "sysv... | from ceph_deploy.hosts import suse
class TestSuseInit(object):
def setup(self):
self.host = suse
def test_choose_init_default(self):
self.host.release = None
init_type = self.host.choose_init()
assert init_type == "sysvinit"
def test_choose_init_SLE_11(self):
... | <commit_before>from ceph_deploy.hosts import suse
class TestSuseInit(object):
def setup(self):
self.host = suse
def test_choose_init_default(self):
self.host.release = None
init_type = self.host.choose_init()
assert init_type == "sysvinit"
def test_choose_init_SLE... |
d8f33c46b6462788ef6e38dc5aefcdda2144eb66 | camoco/__init__.py | camoco/__init__.py | """
Camoco Library - CoAnalysis of Molecular Components
CacheMoneyCorn
"""
__license__ = """
Creative Commons Non-Commercial 4.0 Generic
http://creativecommons.org/licenses/by-nc/4.0/
"""
import pyximport; pyximport.install()
from camoco.Camoco import Camoco
from camoco.Expr import Expr
from camoco.CO... | """
Camoco Library - CoAnalysis of Molecular Components
CacheMoneyCorn
"""
__license__ = """
Creative Commons Non-Commercial 4.0 Generic
http://creativecommons.org/licenses/by-nc/4.0/
"""
import pyximport; pyximport.install()
from camoco.Camoco import Camoco
Camoco.create()
from camoco.Expr import Exp... | Fix initial create for camoco class | Fix initial create for camoco class
| Python | mit | schae234/Camoco,schae234/Camoco | """
Camoco Library - CoAnalysis of Molecular Components
CacheMoneyCorn
"""
__license__ = """
Creative Commons Non-Commercial 4.0 Generic
http://creativecommons.org/licenses/by-nc/4.0/
"""
import pyximport; pyximport.install()
from camoco.Camoco import Camoco
from camoco.Expr import Expr
from camoco.CO... | """
Camoco Library - CoAnalysis of Molecular Components
CacheMoneyCorn
"""
__license__ = """
Creative Commons Non-Commercial 4.0 Generic
http://creativecommons.org/licenses/by-nc/4.0/
"""
import pyximport; pyximport.install()
from camoco.Camoco import Camoco
Camoco.create()
from camoco.Expr import Exp... | <commit_before>"""
Camoco Library - CoAnalysis of Molecular Components
CacheMoneyCorn
"""
__license__ = """
Creative Commons Non-Commercial 4.0 Generic
http://creativecommons.org/licenses/by-nc/4.0/
"""
import pyximport; pyximport.install()
from camoco.Camoco import Camoco
from camoco.Expr import Expr... | """
Camoco Library - CoAnalysis of Molecular Components
CacheMoneyCorn
"""
__license__ = """
Creative Commons Non-Commercial 4.0 Generic
http://creativecommons.org/licenses/by-nc/4.0/
"""
import pyximport; pyximport.install()
from camoco.Camoco import Camoco
Camoco.create()
from camoco.Expr import Exp... | """
Camoco Library - CoAnalysis of Molecular Components
CacheMoneyCorn
"""
__license__ = """
Creative Commons Non-Commercial 4.0 Generic
http://creativecommons.org/licenses/by-nc/4.0/
"""
import pyximport; pyximport.install()
from camoco.Camoco import Camoco
from camoco.Expr import Expr
from camoco.CO... | <commit_before>"""
Camoco Library - CoAnalysis of Molecular Components
CacheMoneyCorn
"""
__license__ = """
Creative Commons Non-Commercial 4.0 Generic
http://creativecommons.org/licenses/by-nc/4.0/
"""
import pyximport; pyximport.install()
from camoco.Camoco import Camoco
from camoco.Expr import Expr... |
a1bcb99691f5a0238f6a34a5579df3e89e8d6823 | child_sync_gp/model/project_compassion.py | child_sync_gp/model/project_compassion.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file _... | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file _... | Fix bug in write project. | Fix bug in write project.
| Python | agpl-3.0 | CompassionCH/compassion-switzerland,ndtran/compassion-switzerland,MickSandoz/compassion-switzerland,eicher31/compassion-switzerland,Secheron/compassion-switzerland,CompassionCH/compassion-switzerland,Secheron/compassion-switzerland,CompassionCH/compassion-switzerland,MickSandoz/compassion-switzerland,ecino/compassion-s... | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file _... | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file _... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence i... | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file _... | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file _... | <commit_before># -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence i... |
4ad92bfcbfd2145b008cd18e934ebd6dc3be53e9 | pytest/test_prefork.py | pytest/test_prefork.py | from tectonic import prefork
def test_WorkerMetadata():
"""
This is a simple test, as WorkerMetadata only holds data
"""
pid = 'pid'
health_check_read = 100
last_seen = 'now'
metadata = prefork.WorkerMetadata(pid=pid,
health_check_read=health_check_re... | import os
import shutil
import os.path
import tempfile
from tectonic import prefork
def test_WorkerMetadata():
"""
This is a simple test, as WorkerMetadata only holds data
"""
pid = 'pid'
health_check_read = 100
last_seen = 'now'
metadata = prefork.WorkerMetadata(pid=pid,
... | Add a test for the file object | Add a test for the file object
| Python | bsd-3-clause | markrwilliams/tectonic | from tectonic import prefork
def test_WorkerMetadata():
"""
This is a simple test, as WorkerMetadata only holds data
"""
pid = 'pid'
health_check_read = 100
last_seen = 'now'
metadata = prefork.WorkerMetadata(pid=pid,
health_check_read=health_check_re... | import os
import shutil
import os.path
import tempfile
from tectonic import prefork
def test_WorkerMetadata():
"""
This is a simple test, as WorkerMetadata only holds data
"""
pid = 'pid'
health_check_read = 100
last_seen = 'now'
metadata = prefork.WorkerMetadata(pid=pid,
... | <commit_before>from tectonic import prefork
def test_WorkerMetadata():
"""
This is a simple test, as WorkerMetadata only holds data
"""
pid = 'pid'
health_check_read = 100
last_seen = 'now'
metadata = prefork.WorkerMetadata(pid=pid,
health_check_read=... | import os
import shutil
import os.path
import tempfile
from tectonic import prefork
def test_WorkerMetadata():
"""
This is a simple test, as WorkerMetadata only holds data
"""
pid = 'pid'
health_check_read = 100
last_seen = 'now'
metadata = prefork.WorkerMetadata(pid=pid,
... | from tectonic import prefork
def test_WorkerMetadata():
"""
This is a simple test, as WorkerMetadata only holds data
"""
pid = 'pid'
health_check_read = 100
last_seen = 'now'
metadata = prefork.WorkerMetadata(pid=pid,
health_check_read=health_check_re... | <commit_before>from tectonic import prefork
def test_WorkerMetadata():
"""
This is a simple test, as WorkerMetadata only holds data
"""
pid = 'pid'
health_check_read = 100
last_seen = 'now'
metadata = prefork.WorkerMetadata(pid=pid,
health_check_read=... |
cb8bf92ab2f71767de8b471992d79131e4dde9a1 | quicksort/quicksort.py | quicksort/quicksort.py | def sort(arr):
return arr;
if __name__ == '__main__':
unsorted = list(reversed(range(1000)));
print sort(unsorted); | def sort(arr, length):
if length == 1:
return
return (arr, length)
if __name__ == '__main__':
unsorted = list(reversed(range(1000)))
initial_len = len(unsorted)
print sort(unsorted, initial_len) | Add length parameter to sort and remove semicolons | Add length parameter to sort and remove semicolons
The sort function requires a length parameter, so the function
declaration and the initial call were modified to reflect that.
A length of just 1 element represents the base case of the
recursion, so the function simply returns in this case.
Also I forgot how python ... | Python | mit | timpel/stanford-algs,timpel/stanford-algs | def sort(arr):
return arr;
if __name__ == '__main__':
unsorted = list(reversed(range(1000)));
print sort(unsorted);Add length parameter to sort and remove semicolons
The sort function requires a length parameter, so the function
declaration and the initial call were modified to reflect that.
A length of just 1 ele... | def sort(arr, length):
if length == 1:
return
return (arr, length)
if __name__ == '__main__':
unsorted = list(reversed(range(1000)))
initial_len = len(unsorted)
print sort(unsorted, initial_len) | <commit_before>def sort(arr):
return arr;
if __name__ == '__main__':
unsorted = list(reversed(range(1000)));
print sort(unsorted);<commit_msg>Add length parameter to sort and remove semicolons
The sort function requires a length parameter, so the function
declaration and the initial call were modified to reflect t... | def sort(arr, length):
if length == 1:
return
return (arr, length)
if __name__ == '__main__':
unsorted = list(reversed(range(1000)))
initial_len = len(unsorted)
print sort(unsorted, initial_len) | def sort(arr):
return arr;
if __name__ == '__main__':
unsorted = list(reversed(range(1000)));
print sort(unsorted);Add length parameter to sort and remove semicolons
The sort function requires a length parameter, so the function
declaration and the initial call were modified to reflect that.
A length of just 1 ele... | <commit_before>def sort(arr):
return arr;
if __name__ == '__main__':
unsorted = list(reversed(range(1000)));
print sort(unsorted);<commit_msg>Add length parameter to sort and remove semicolons
The sort function requires a length parameter, so the function
declaration and the initial call were modified to reflect t... |
9256844b08edaff1b9755a6ffc25acc0df76934d | MoodJournal/entries/serializers.py | MoodJournal/entries/serializers.py | from django.contrib.auth.models import User
from rest_framework import serializers
from .models import UserDefinedCategory
from .models import EntryInstance
class UserDefinedCategorySerializer(serializers.HyperlinkedModelSerializer):
url = serializers.HyperlinkedIdentityField(
view_name='category-detail... | from rest_framework import serializers
from .models import UserDefinedCategory
from .models import EntryInstance
class UserDefinedCategorySerializer(serializers.ModelSerializer):
class Meta:
model = UserDefinedCategory
fields = ('user', 'category', 'pk',)
class EntryInstanceSerializer(serialize... | Revert "beginning hyperlink model serialization" | Revert "beginning hyperlink model serialization"
This reverts commit 6d41c54397512da69604f7e730757f4aff96374f.
| Python | mit | swpease/MoodJournal,swpease/MoodJournal,swpease/MoodJournal | from django.contrib.auth.models import User
from rest_framework import serializers
from .models import UserDefinedCategory
from .models import EntryInstance
class UserDefinedCategorySerializer(serializers.HyperlinkedModelSerializer):
url = serializers.HyperlinkedIdentityField(
view_name='category-detail... | from rest_framework import serializers
from .models import UserDefinedCategory
from .models import EntryInstance
class UserDefinedCategorySerializer(serializers.ModelSerializer):
class Meta:
model = UserDefinedCategory
fields = ('user', 'category', 'pk',)
class EntryInstanceSerializer(serialize... | <commit_before>from django.contrib.auth.models import User
from rest_framework import serializers
from .models import UserDefinedCategory
from .models import EntryInstance
class UserDefinedCategorySerializer(serializers.HyperlinkedModelSerializer):
url = serializers.HyperlinkedIdentityField(
view_name='... | from rest_framework import serializers
from .models import UserDefinedCategory
from .models import EntryInstance
class UserDefinedCategorySerializer(serializers.ModelSerializer):
class Meta:
model = UserDefinedCategory
fields = ('user', 'category', 'pk',)
class EntryInstanceSerializer(serialize... | from django.contrib.auth.models import User
from rest_framework import serializers
from .models import UserDefinedCategory
from .models import EntryInstance
class UserDefinedCategorySerializer(serializers.HyperlinkedModelSerializer):
url = serializers.HyperlinkedIdentityField(
view_name='category-detail... | <commit_before>from django.contrib.auth.models import User
from rest_framework import serializers
from .models import UserDefinedCategory
from .models import EntryInstance
class UserDefinedCategorySerializer(serializers.HyperlinkedModelSerializer):
url = serializers.HyperlinkedIdentityField(
view_name='... |
5a12f027079d109228456c6f3e4912317721246a | setup.py | setup.py | from distutils.core import setup
setup(
name='cyrtranslit',
packages=['cyrtranslit'],
version='0.4',
description='Bi-directional Cyrillic transliteration. Transliterate Cyrillic script text to Roman alphabet text and vice versa.',
author='Open Data Kosovo',
author_email='dev@opendatakosovo.org',
url='http... | from distutils.core import setup
setup(
name='cyrtranslit',
packages=['cyrtranslit'],
version='0.4',
description='Bi-directional Cyrillic transliteration. Transliterate Cyrillic script text to Roman alphabet text and vice versa.',
author='Open Data Kosovo',
author_email='dev@opendatakosovo.org',
url='http... | Declare that cyrtranslit supports Python 3.7 | Declare that cyrtranslit supports Python 3.7
| Python | mit | opendatakosovo/cyrillic-transliteration | from distutils.core import setup
setup(
name='cyrtranslit',
packages=['cyrtranslit'],
version='0.4',
description='Bi-directional Cyrillic transliteration. Transliterate Cyrillic script text to Roman alphabet text and vice versa.',
author='Open Data Kosovo',
author_email='dev@opendatakosovo.org',
url='http... | from distutils.core import setup
setup(
name='cyrtranslit',
packages=['cyrtranslit'],
version='0.4',
description='Bi-directional Cyrillic transliteration. Transliterate Cyrillic script text to Roman alphabet text and vice versa.',
author='Open Data Kosovo',
author_email='dev@opendatakosovo.org',
url='http... | <commit_before>from distutils.core import setup
setup(
name='cyrtranslit',
packages=['cyrtranslit'],
version='0.4',
description='Bi-directional Cyrillic transliteration. Transliterate Cyrillic script text to Roman alphabet text and vice versa.',
author='Open Data Kosovo',
author_email='dev@opendatakosovo.or... | from distutils.core import setup
setup(
name='cyrtranslit',
packages=['cyrtranslit'],
version='0.4',
description='Bi-directional Cyrillic transliteration. Transliterate Cyrillic script text to Roman alphabet text and vice versa.',
author='Open Data Kosovo',
author_email='dev@opendatakosovo.org',
url='http... | from distutils.core import setup
setup(
name='cyrtranslit',
packages=['cyrtranslit'],
version='0.4',
description='Bi-directional Cyrillic transliteration. Transliterate Cyrillic script text to Roman alphabet text and vice versa.',
author='Open Data Kosovo',
author_email='dev@opendatakosovo.org',
url='http... | <commit_before>from distutils.core import setup
setup(
name='cyrtranslit',
packages=['cyrtranslit'],
version='0.4',
description='Bi-directional Cyrillic transliteration. Transliterate Cyrillic script text to Roman alphabet text and vice versa.',
author='Open Data Kosovo',
author_email='dev@opendatakosovo.or... |
26730c073e183249a8eb7c0d0333fdd32e307e4a | setup.py | setup.py | from setuptools import setup, find_packages
deps = [
'ijson==2.2',
'mozci==0.15.1',
'MozillaPulse==1.2.1',
'requests==2.7.0', # Maximum version taskcluster will work with
'taskcluster==0.0.27',
'treeherder-client==1.7.0',
]
setup(name='pulse-actions',
version='0.2.0',
description='... | from setuptools import setup, find_packages
deps = [
'ijson==2.2',
'mozci==0.15.1',
'MozillaPulse==1.2.2',
'requests==2.7.0', # Maximum version taskcluster will work with
'taskcluster==0.0.27',
'treeherder-client==1.7.0',
]
setup(name='pulse-actions',
version='0.2.0',
description='... | Upgrade to working MozillaPulse version | Upgrade to working MozillaPulse version
| Python | mpl-2.0 | armenzg/pulse_actions,adusca/pulse_actions,mozilla/pulse_actions | from setuptools import setup, find_packages
deps = [
'ijson==2.2',
'mozci==0.15.1',
'MozillaPulse==1.2.1',
'requests==2.7.0', # Maximum version taskcluster will work with
'taskcluster==0.0.27',
'treeherder-client==1.7.0',
]
setup(name='pulse-actions',
version='0.2.0',
description='... | from setuptools import setup, find_packages
deps = [
'ijson==2.2',
'mozci==0.15.1',
'MozillaPulse==1.2.2',
'requests==2.7.0', # Maximum version taskcluster will work with
'taskcluster==0.0.27',
'treeherder-client==1.7.0',
]
setup(name='pulse-actions',
version='0.2.0',
description='... | <commit_before>from setuptools import setup, find_packages
deps = [
'ijson==2.2',
'mozci==0.15.1',
'MozillaPulse==1.2.1',
'requests==2.7.0', # Maximum version taskcluster will work with
'taskcluster==0.0.27',
'treeherder-client==1.7.0',
]
setup(name='pulse-actions',
version='0.2.0',
... | from setuptools import setup, find_packages
deps = [
'ijson==2.2',
'mozci==0.15.1',
'MozillaPulse==1.2.2',
'requests==2.7.0', # Maximum version taskcluster will work with
'taskcluster==0.0.27',
'treeherder-client==1.7.0',
]
setup(name='pulse-actions',
version='0.2.0',
description='... | from setuptools import setup, find_packages
deps = [
'ijson==2.2',
'mozci==0.15.1',
'MozillaPulse==1.2.1',
'requests==2.7.0', # Maximum version taskcluster will work with
'taskcluster==0.0.27',
'treeherder-client==1.7.0',
]
setup(name='pulse-actions',
version='0.2.0',
description='... | <commit_before>from setuptools import setup, find_packages
deps = [
'ijson==2.2',
'mozci==0.15.1',
'MozillaPulse==1.2.1',
'requests==2.7.0', # Maximum version taskcluster will work with
'taskcluster==0.0.27',
'treeherder-client==1.7.0',
]
setup(name='pulse-actions',
version='0.2.0',
... |
45369df80923fdd42f7d5c079f6131c0ace43130 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
# Package requirements here
"Jinja2==2.9.5"
]
test_requirements = [... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
# Package requirements here
"Jinja2==2.9.5"
]
test_requirements = [... | Update development status and keywords | Update development status and keywords
| Python | mit | oldani/HtmlTestRunner,oldani/HtmlTestRunner | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
# Package requirements here
"Jinja2==2.9.5"
]
test_requirements = [... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
# Package requirements here
"Jinja2==2.9.5"
]
test_requirements = [... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
# Package requirements here
"Jinja2==2.9.5"
]
test_r... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
# Package requirements here
"Jinja2==2.9.5"
]
test_requirements = [... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
# Package requirements here
"Jinja2==2.9.5"
]
test_requirements = [... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
# Package requirements here
"Jinja2==2.9.5"
]
test_r... |
5fb92c2cf19fc7990db9945c89db31ca32930696 | setup.py | setup.py | import os
from setuptools import find_packages, setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8') as readme:
README = readme.read().split('h1>', 2)[1]
setup(
name='django-postgres-extra',
version='1.21a3',
packages=find_packages(),
include_package_data=True,... | import os
from setuptools import find_packages, setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8') as readme:
README = readme.read().split('h1>\n\n', 2)[1]
setup(
name='django-postgres-extra',
version='1.21a4',
packages=find_packages(),
include_package_data=T... | Cut out blank lines at the start of PyPi README | Cut out blank lines at the start of PyPi README
| Python | mit | SectorLabs/django-postgres-extra | import os
from setuptools import find_packages, setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8') as readme:
README = readme.read().split('h1>', 2)[1]
setup(
name='django-postgres-extra',
version='1.21a3',
packages=find_packages(),
include_package_data=True,... | import os
from setuptools import find_packages, setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8') as readme:
README = readme.read().split('h1>\n\n', 2)[1]
setup(
name='django-postgres-extra',
version='1.21a4',
packages=find_packages(),
include_package_data=T... | <commit_before>import os
from setuptools import find_packages, setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8') as readme:
README = readme.read().split('h1>', 2)[1]
setup(
name='django-postgres-extra',
version='1.21a3',
packages=find_packages(),
include_pac... | import os
from setuptools import find_packages, setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8') as readme:
README = readme.read().split('h1>\n\n', 2)[1]
setup(
name='django-postgres-extra',
version='1.21a4',
packages=find_packages(),
include_package_data=T... | import os
from setuptools import find_packages, setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8') as readme:
README = readme.read().split('h1>', 2)[1]
setup(
name='django-postgres-extra',
version='1.21a3',
packages=find_packages(),
include_package_data=True,... | <commit_before>import os
from setuptools import find_packages, setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8') as readme:
README = readme.read().split('h1>', 2)[1]
setup(
name='django-postgres-extra',
version='1.21a3',
packages=find_packages(),
include_pac... |
19a47d8390ed1db3f91568375bb2726ee56d24f3 | setup.py | setup.py | from setuptools import setup
PACKAGE_VERSION = '1.0'
deps = []
setup(name='wptserve',
version=PACKAGE_VERSION,
description="Python webserver intended for in web browser testing",
long_description=open("README.md").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifier... | from setuptools import setup
PACKAGE_VERSION = '1.0.1'
deps = []
setup(name='wptserve',
version=PACKAGE_VERSION,
description="Python webserver intended for in web browser testing",
long_description=open("README.md").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifi... | Update the version for manifest update | Update the version for manifest update
| Python | bsd-3-clause | youennf/wptserve | from setuptools import setup
PACKAGE_VERSION = '1.0'
deps = []
setup(name='wptserve',
version=PACKAGE_VERSION,
description="Python webserver intended for in web browser testing",
long_description=open("README.md").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifier... | from setuptools import setup
PACKAGE_VERSION = '1.0.1'
deps = []
setup(name='wptserve',
version=PACKAGE_VERSION,
description="Python webserver intended for in web browser testing",
long_description=open("README.md").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifi... | <commit_before>from setuptools import setup
PACKAGE_VERSION = '1.0'
deps = []
setup(name='wptserve',
version=PACKAGE_VERSION,
description="Python webserver intended for in web browser testing",
long_description=open("README.md").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=... | from setuptools import setup
PACKAGE_VERSION = '1.0.1'
deps = []
setup(name='wptserve',
version=PACKAGE_VERSION,
description="Python webserver intended for in web browser testing",
long_description=open("README.md").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifi... | from setuptools import setup
PACKAGE_VERSION = '1.0'
deps = []
setup(name='wptserve',
version=PACKAGE_VERSION,
description="Python webserver intended for in web browser testing",
long_description=open("README.md").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifier... | <commit_before>from setuptools import setup
PACKAGE_VERSION = '1.0'
deps = []
setup(name='wptserve',
version=PACKAGE_VERSION,
description="Python webserver intended for in web browser testing",
long_description=open("README.md").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=... |
363dbc3dac71b9ce2d5ab7d9178253fc9b5bf483 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README')) as f:
README = f.read()
requires = []
setup(name='python-bitcoinlib',
version='0.2.0',
description='This python library provides an easy i... | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README')) as f:
README = f.read()
requires = []
setup(name='python-bitcoinlib',
version='0.2.1-SNAPSHOT',
description='This python library provides ... | Reset version for future development | Reset version for future development
| Python | mit | petertodd/dust-b-gone | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README')) as f:
README = f.read()
requires = []
setup(name='python-bitcoinlib',
version='0.2.0',
description='This python library provides an easy i... | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README')) as f:
README = f.read()
requires = []
setup(name='python-bitcoinlib',
version='0.2.1-SNAPSHOT',
description='This python library provides ... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
import os
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README')) as f:
README = f.read()
requires = []
setup(name='python-bitcoinlib',
version='0.2.0',
description='This python library pro... | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README')) as f:
README = f.read()
requires = []
setup(name='python-bitcoinlib',
version='0.2.1-SNAPSHOT',
description='This python library provides ... | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README')) as f:
README = f.read()
requires = []
setup(name='python-bitcoinlib',
version='0.2.0',
description='This python library provides an easy i... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
import os
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README')) as f:
README = f.read()
requires = []
setup(name='python-bitcoinlib',
version='0.2.0',
description='This python library pro... |
1e117182e6169645940a7d7acc3eba9181e5715e | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="pysolr",
version="3.0.3",
description="Lightweight python wrapper for Apache Solr.",
author='Daniel Lindsley',
author_email='daniel@toastdriven.com',
long_description=open('README.rst', ... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="pysolr",
version="3.0.4",
description="Lightweight python wrapper for Apache Solr.",
author='Daniel Lindsley',
author_email='daniel@toastdriven.com',
long_description=open('README.rst', ... | Tag version 3.0.4 for PyPI | Tag version 3.0.4 for PyPI
3.x had a minor bug (see SHA:74b0a36) but it broke logging for Solr
errors which seems worth an easily deployed fix
| Python | bsd-3-clause | rokaka/pysolr,toastdriven/pysolr,mbeacom/pysolr,CANTUS-Project/pysolr-tornado,mylanium/pysolr,swistakm/pysolr,toastdriven/pysolr,mbeacom/pysolr,django-searchstack/skisolr,10clouds/pysolr,django-haystack/pysolr,mylanium/pysolr,CANTUS-Project/pysolr-tornado,django-searchstack/skisolr,swistakm/pysolr,upayavira/pysolr,shas... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="pysolr",
version="3.0.3",
description="Lightweight python wrapper for Apache Solr.",
author='Daniel Lindsley',
author_email='daniel@toastdriven.com',
long_description=open('README.rst', ... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="pysolr",
version="3.0.4",
description="Lightweight python wrapper for Apache Solr.",
author='Daniel Lindsley',
author_email='daniel@toastdriven.com',
long_description=open('README.rst', ... | <commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="pysolr",
version="3.0.3",
description="Lightweight python wrapper for Apache Solr.",
author='Daniel Lindsley',
author_email='daniel@toastdriven.com',
long_description=open... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="pysolr",
version="3.0.4",
description="Lightweight python wrapper for Apache Solr.",
author='Daniel Lindsley',
author_email='daniel@toastdriven.com',
long_description=open('README.rst', ... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="pysolr",
version="3.0.3",
description="Lightweight python wrapper for Apache Solr.",
author='Daniel Lindsley',
author_email='daniel@toastdriven.com',
long_description=open('README.rst', ... | <commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="pysolr",
version="3.0.3",
description="Lightweight python wrapper for Apache Solr.",
author='Daniel Lindsley',
author_email='daniel@toastdriven.com',
long_description=open... |
ed8b46542c831b5e3692368c15619a46fbe338e1 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name="PyRundeck",
version="0.3.4",
description="A thin, pure Python wrapper for the Rundeck API",
author="Panagiotis Koutsourakis",
author_email="kutsurak@ekt.gr",
license='BSD',
url='https://github.com/EKT/pyrundeck',
classifiers=[
... | from setuptools import setup, find_packages
setup(
name="PyRundeck",
version="0.3.4",
description="A thin, pure Python wrapper for the Rundeck API",
author="Panagiotis Koutsourakis",
author_email="kutsurak@ekt.gr",
license='BSD',
url='https://github.com/EKT/pyrundeck',
classifiers=[
... | Add PyYAML as a dependency | Add PyYAML as a dependency
| Python | bsd-3-clause | EKT/pyrundeck | from setuptools import setup, find_packages
setup(
name="PyRundeck",
version="0.3.4",
description="A thin, pure Python wrapper for the Rundeck API",
author="Panagiotis Koutsourakis",
author_email="kutsurak@ekt.gr",
license='BSD',
url='https://github.com/EKT/pyrundeck',
classifiers=[
... | from setuptools import setup, find_packages
setup(
name="PyRundeck",
version="0.3.4",
description="A thin, pure Python wrapper for the Rundeck API",
author="Panagiotis Koutsourakis",
author_email="kutsurak@ekt.gr",
license='BSD',
url='https://github.com/EKT/pyrundeck',
classifiers=[
... | <commit_before>from setuptools import setup, find_packages
setup(
name="PyRundeck",
version="0.3.4",
description="A thin, pure Python wrapper for the Rundeck API",
author="Panagiotis Koutsourakis",
author_email="kutsurak@ekt.gr",
license='BSD',
url='https://github.com/EKT/pyrundeck',
cl... | from setuptools import setup, find_packages
setup(
name="PyRundeck",
version="0.3.4",
description="A thin, pure Python wrapper for the Rundeck API",
author="Panagiotis Koutsourakis",
author_email="kutsurak@ekt.gr",
license='BSD',
url='https://github.com/EKT/pyrundeck',
classifiers=[
... | from setuptools import setup, find_packages
setup(
name="PyRundeck",
version="0.3.4",
description="A thin, pure Python wrapper for the Rundeck API",
author="Panagiotis Koutsourakis",
author_email="kutsurak@ekt.gr",
license='BSD',
url='https://github.com/EKT/pyrundeck',
classifiers=[
... | <commit_before>from setuptools import setup, find_packages
setup(
name="PyRundeck",
version="0.3.4",
description="A thin, pure Python wrapper for the Rundeck API",
author="Panagiotis Koutsourakis",
author_email="kutsurak@ekt.gr",
license='BSD',
url='https://github.com/EKT/pyrundeck',
cl... |
dcf4d88b6562cafb7a365e14d66a3a1967365210 | setup.py | setup.py | from setuptools import find_packages, setup
setup(
name="redshift-etl",
version="0.27b.1",
author="Harry's Data Engineering and Contributors",
description="ETL code to ferry data from PostgreSQL databases (or S3 files) to Redshift cluster",
license="MIT",
keywords="redshift postgresql etl extr... | from setuptools import find_packages, setup
setup(
name="redshift-etl",
version="0.27.0",
author="Harry's Data Engineering and Contributors",
description="ETL code to ferry data from PostgreSQL databases (or S3 files) to Redshift cluster",
license="MIT",
keywords="redshift postgresql etl extra... | Change version to match RC (v0.27.0) | Change version to match RC (v0.27.0)
| Python | mit | harrystech/arthur-redshift-etl,harrystech/arthur-redshift-etl,harrystech/arthur-redshift-etl,harrystech/arthur-redshift-etl,harrystech/arthur-redshift-etl | from setuptools import find_packages, setup
setup(
name="redshift-etl",
version="0.27b.1",
author="Harry's Data Engineering and Contributors",
description="ETL code to ferry data from PostgreSQL databases (or S3 files) to Redshift cluster",
license="MIT",
keywords="redshift postgresql etl extr... | from setuptools import find_packages, setup
setup(
name="redshift-etl",
version="0.27.0",
author="Harry's Data Engineering and Contributors",
description="ETL code to ferry data from PostgreSQL databases (or S3 files) to Redshift cluster",
license="MIT",
keywords="redshift postgresql etl extra... | <commit_before>from setuptools import find_packages, setup
setup(
name="redshift-etl",
version="0.27b.1",
author="Harry's Data Engineering and Contributors",
description="ETL code to ferry data from PostgreSQL databases (or S3 files) to Redshift cluster",
license="MIT",
keywords="redshift post... | from setuptools import find_packages, setup
setup(
name="redshift-etl",
version="0.27.0",
author="Harry's Data Engineering and Contributors",
description="ETL code to ferry data from PostgreSQL databases (or S3 files) to Redshift cluster",
license="MIT",
keywords="redshift postgresql etl extra... | from setuptools import find_packages, setup
setup(
name="redshift-etl",
version="0.27b.1",
author="Harry's Data Engineering and Contributors",
description="ETL code to ferry data from PostgreSQL databases (or S3 files) to Redshift cluster",
license="MIT",
keywords="redshift postgresql etl extr... | <commit_before>from setuptools import find_packages, setup
setup(
name="redshift-etl",
version="0.27b.1",
author="Harry's Data Engineering and Contributors",
description="ETL code to ferry data from PostgreSQL databases (or S3 files) to Redshift cluster",
license="MIT",
keywords="redshift post... |
c0a8ead2092f6479621bed030bac5f3ee1c5872a | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(name="hal-json",
version="0.1",
description="Parse and encode links according to RFC 5988 or HAL specs",
author="Michael Burrows, Carlos Martín",
author_email="inean.es@gmail.com",
url="https:... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(name="hal-json",
version="0.1",
description="Parse and encode links according to RFC 5988 or HAL specs",
author="Michael Burrows, Carlos Martín",
author_email="inean.es@gmail.com",
url="https:... | Use public github URL for package homepage | Use public github URL for package homepage
| Python | mit | inean/LinkHeader | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(name="hal-json",
version="0.1",
description="Parse and encode links according to RFC 5988 or HAL specs",
author="Michael Burrows, Carlos Martín",
author_email="inean.es@gmail.com",
url="https:... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(name="hal-json",
version="0.1",
description="Parse and encode links according to RFC 5988 or HAL specs",
author="Michael Burrows, Carlos Martín",
author_email="inean.es@gmail.com",
url="https:... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(name="hal-json",
version="0.1",
description="Parse and encode links according to RFC 5988 or HAL specs",
author="Michael Burrows, Carlos Martín",
author_email="inean.es@gmail.com",
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(name="hal-json",
version="0.1",
description="Parse and encode links according to RFC 5988 or HAL specs",
author="Michael Burrows, Carlos Martín",
author_email="inean.es@gmail.com",
url="https:... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(name="hal-json",
version="0.1",
description="Parse and encode links according to RFC 5988 or HAL specs",
author="Michael Burrows, Carlos Martín",
author_email="inean.es@gmail.com",
url="https:... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(name="hal-json",
version="0.1",
description="Parse and encode links according to RFC 5988 or HAL specs",
author="Michael Burrows, Carlos Martín",
author_email="inean.es@gmail.com",
... |
17d2bde78fb195536bd57b5b92aa8ba557d4314b | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name = "clrsvsim",
version = "0.0.2",
description = "Color Genomics Structural Variant Simulator",
author = "Color Genomics",
author_email = "dev@color.com",
url = "https://github.com/Col... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name = "clrsvsim",
version = "0.1.0",
description = "Color Genomics Structural Variant Simulator",
author = "Color Genomics",
author_email = "dev@color.com",
url = "https://github.com/Col... | Stop pinning to specific patch versions | Stop pinning to specific patch versions
This package should not require specific patch versions. Rather, it
should express the broadest range of possible versions that it supports.
In the current `setup.py`, we are very particular about which versions
must be used. Because of the specificity, installing `clrsvsim` ma... | Python | apache-2.0 | color/clrsvsim | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name = "clrsvsim",
version = "0.0.2",
description = "Color Genomics Structural Variant Simulator",
author = "Color Genomics",
author_email = "dev@color.com",
url = "https://github.com/Col... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name = "clrsvsim",
version = "0.1.0",
description = "Color Genomics Structural Variant Simulator",
author = "Color Genomics",
author_email = "dev@color.com",
url = "https://github.com/Col... | <commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name = "clrsvsim",
version = "0.0.2",
description = "Color Genomics Structural Variant Simulator",
author = "Color Genomics",
author_email = "dev@color.com",
url = "https:/... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name = "clrsvsim",
version = "0.1.0",
description = "Color Genomics Structural Variant Simulator",
author = "Color Genomics",
author_email = "dev@color.com",
url = "https://github.com/Col... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name = "clrsvsim",
version = "0.0.2",
description = "Color Genomics Structural Variant Simulator",
author = "Color Genomics",
author_email = "dev@color.com",
url = "https://github.com/Col... | <commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name = "clrsvsim",
version = "0.0.2",
description = "Color Genomics Structural Variant Simulator",
author = "Color Genomics",
author_email = "dev@color.com",
url = "https:/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.