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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
edc5564d4c3677dc8b545e9c9a6a51b481247eab | contentcuration/contentcuration/tests/test_makemessages.py | contentcuration/contentcuration/tests/test_makemessages.py | import os
import subprocess
import pathlib
from django.conf import settings
from django.test import TestCase
class MakeMessagesCommandRunTestCase(TestCase):
"""
Sanity check to make sure makemessages runs to completion.
"""
def test_command_succeeds_without_postgres(self):
"""
Test t... | import os
import subprocess
import pathlib
import pytest
from django.conf import settings
from django.test import TestCase
class MakeMessagesCommandRunTestCase(TestCase):
"""
Sanity check to make sure makemessages runs to completion.
"""
# this test can make changes to committed files, so only run i... | Use pytest.skip so we can check the test wasn't skipped on the CI. | Use pytest.skip so we can check the test wasn't skipped on the CI.
| Python | mit | DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation | import os
import subprocess
import pathlib
from django.conf import settings
from django.test import TestCase
class MakeMessagesCommandRunTestCase(TestCase):
"""
Sanity check to make sure makemessages runs to completion.
"""
def test_command_succeeds_without_postgres(self):
"""
Test t... | import os
import subprocess
import pathlib
import pytest
from django.conf import settings
from django.test import TestCase
class MakeMessagesCommandRunTestCase(TestCase):
"""
Sanity check to make sure makemessages runs to completion.
"""
# this test can make changes to committed files, so only run i... | <commit_before>import os
import subprocess
import pathlib
from django.conf import settings
from django.test import TestCase
class MakeMessagesCommandRunTestCase(TestCase):
"""
Sanity check to make sure makemessages runs to completion.
"""
def test_command_succeeds_without_postgres(self):
"""... | import os
import subprocess
import pathlib
import pytest
from django.conf import settings
from django.test import TestCase
class MakeMessagesCommandRunTestCase(TestCase):
"""
Sanity check to make sure makemessages runs to completion.
"""
# this test can make changes to committed files, so only run i... | import os
import subprocess
import pathlib
from django.conf import settings
from django.test import TestCase
class MakeMessagesCommandRunTestCase(TestCase):
"""
Sanity check to make sure makemessages runs to completion.
"""
def test_command_succeeds_without_postgres(self):
"""
Test t... | <commit_before>import os
import subprocess
import pathlib
from django.conf import settings
from django.test import TestCase
class MakeMessagesCommandRunTestCase(TestCase):
"""
Sanity check to make sure makemessages runs to completion.
"""
def test_command_succeeds_without_postgres(self):
"""... |
c3f8069435f0f1c09c00ed6dba2e4f3bdb7ab91b | grow/testing/testdata/pod/extensions/preprocessors.py | grow/testing/testdata/pod/extensions/preprocessors.py | from grow import Preprocessor
from protorpc import messages
class CustomPreprocessor(Preprocessor):
KIND = 'custom_preprocessor'
class Config(messages.Message):
value = messages.StringField(1)
def run(self):
# To allow the test to check the result
self.pod._custom_preprocessor_va... | from grow import Preprocessor
from protorpc import messages
class CustomPreprocessor(Preprocessor):
KIND = 'custom_preprocessor'
class Config(messages.Message):
value = messages.StringField(1)
def run(self, **kwargs):
# To allow the test to check the result
self.pod._custom_prepr... | Update extension testdata to take **kwargs. | Update extension testdata to take **kwargs.
| Python | mit | grow/grow,grow/pygrow,denmojo/pygrow,grow/pygrow,grow/grow,denmojo/pygrow,denmojo/pygrow,grow/pygrow,denmojo/pygrow,grow/grow,grow/grow | from grow import Preprocessor
from protorpc import messages
class CustomPreprocessor(Preprocessor):
KIND = 'custom_preprocessor'
class Config(messages.Message):
value = messages.StringField(1)
def run(self):
# To allow the test to check the result
self.pod._custom_preprocessor_va... | from grow import Preprocessor
from protorpc import messages
class CustomPreprocessor(Preprocessor):
KIND = 'custom_preprocessor'
class Config(messages.Message):
value = messages.StringField(1)
def run(self, **kwargs):
# To allow the test to check the result
self.pod._custom_prepr... | <commit_before>from grow import Preprocessor
from protorpc import messages
class CustomPreprocessor(Preprocessor):
KIND = 'custom_preprocessor'
class Config(messages.Message):
value = messages.StringField(1)
def run(self):
# To allow the test to check the result
self.pod._custom_... | from grow import Preprocessor
from protorpc import messages
class CustomPreprocessor(Preprocessor):
KIND = 'custom_preprocessor'
class Config(messages.Message):
value = messages.StringField(1)
def run(self, **kwargs):
# To allow the test to check the result
self.pod._custom_prepr... | from grow import Preprocessor
from protorpc import messages
class CustomPreprocessor(Preprocessor):
KIND = 'custom_preprocessor'
class Config(messages.Message):
value = messages.StringField(1)
def run(self):
# To allow the test to check the result
self.pod._custom_preprocessor_va... | <commit_before>from grow import Preprocessor
from protorpc import messages
class CustomPreprocessor(Preprocessor):
KIND = 'custom_preprocessor'
class Config(messages.Message):
value = messages.StringField(1)
def run(self):
# To allow the test to check the result
self.pod._custom_... |
e29b1f6243fb7f9d2322b80573617ff9a0582d01 | pinax/blog/parsers/markdown_parser.py | pinax/blog/parsers/markdown_parser.py | from markdown import Markdown
from markdown.inlinepatterns import ImagePattern, IMAGE_LINK_RE
from ..models import Image
class ImageLookupImagePattern(ImagePattern):
def sanitize_url(self, url):
if url.startswith("http"):
return url
else:
try:
image = Imag... | from markdown import Markdown
from markdown.inlinepatterns import ImagePattern, IMAGE_LINK_RE
from ..models import Image
class ImageLookupImagePattern(ImagePattern):
def sanitize_url(self, url):
if url.startswith("http"):
return url
else:
try:
image = Imag... | Add some extensions to the markdown parser | Add some extensions to the markdown parser
Ultimately we should make this a setting or hookset so it could be overridden at the site level. | Python | mit | swilcox/pinax-blog,pinax/pinax-blog,miurahr/pinax-blog,miurahr/pinax-blog,swilcox/pinax-blog,easton402/pinax-blog,pinax/pinax-blog,pinax/pinax-blog,easton402/pinax-blog | from markdown import Markdown
from markdown.inlinepatterns import ImagePattern, IMAGE_LINK_RE
from ..models import Image
class ImageLookupImagePattern(ImagePattern):
def sanitize_url(self, url):
if url.startswith("http"):
return url
else:
try:
image = Imag... | from markdown import Markdown
from markdown.inlinepatterns import ImagePattern, IMAGE_LINK_RE
from ..models import Image
class ImageLookupImagePattern(ImagePattern):
def sanitize_url(self, url):
if url.startswith("http"):
return url
else:
try:
image = Imag... | <commit_before>from markdown import Markdown
from markdown.inlinepatterns import ImagePattern, IMAGE_LINK_RE
from ..models import Image
class ImageLookupImagePattern(ImagePattern):
def sanitize_url(self, url):
if url.startswith("http"):
return url
else:
try:
... | from markdown import Markdown
from markdown.inlinepatterns import ImagePattern, IMAGE_LINK_RE
from ..models import Image
class ImageLookupImagePattern(ImagePattern):
def sanitize_url(self, url):
if url.startswith("http"):
return url
else:
try:
image = Imag... | from markdown import Markdown
from markdown.inlinepatterns import ImagePattern, IMAGE_LINK_RE
from ..models import Image
class ImageLookupImagePattern(ImagePattern):
def sanitize_url(self, url):
if url.startswith("http"):
return url
else:
try:
image = Imag... | <commit_before>from markdown import Markdown
from markdown.inlinepatterns import ImagePattern, IMAGE_LINK_RE
from ..models import Image
class ImageLookupImagePattern(ImagePattern):
def sanitize_url(self, url):
if url.startswith("http"):
return url
else:
try:
... |
044e55544529aa8eb3a755428d990f0400403687 | xunit-autolabeler-v2/ast_parser/core/test_data/parser/exclude_tags/exclude_tags_main.py | xunit-autolabeler-v2/ast_parser/core/test_data/parser/exclude_tags/exclude_tags_main.py | # Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | Fix stepping on other tests >:( | Fix stepping on other tests >:(
| Python | apache-2.0 | GoogleCloudPlatform/repo-automation-playground,GoogleCloudPlatform/repo-automation-playground,GoogleCloudPlatform/repo-automation-playground,GoogleCloudPlatform/repo-automation-playground,GoogleCloudPlatform/repo-automation-playground,GoogleCloudPlatform/repo-automation-playground,GoogleCloudPlatform/repo-automation-pl... | # Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | <commit_before># Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | # Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | <commit_before># Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
606b2b6c84e9f9f67606a4d7e521cf4805855a98 | migrations/versions/0311_populate_returned_letters.py | migrations/versions/0311_populate_returned_letters.py | """
Revision ID: 0311_populate_returned_letters
Revises: 0310_returned_letters_table
Create Date: 2019-12-09 12:13:49.432993
"""
from alembic import op
from app.dao.returned_letters_dao import insert_or_update_returned_letters
revision = '0311_populate_returned_letters'
down_revision = '0310_returned_letters_table'... | """
Revision ID: 0311_populate_returned_letters
Revises: 0310_returned_letters_table
Create Date: 2019-12-09 12:13:49.432993
"""
from alembic import op
revision = '0311_populate_returned_letters'
down_revision = '0310_returned_letters_table'
def upgrade():
conn = op.get_bind()
sql = """
select id, ... | Change the insert to use updated_at as the reported_at date | Change the insert to use updated_at as the reported_at date
| Python | mit | alphagov/notifications-api,alphagov/notifications-api | """
Revision ID: 0311_populate_returned_letters
Revises: 0310_returned_letters_table
Create Date: 2019-12-09 12:13:49.432993
"""
from alembic import op
from app.dao.returned_letters_dao import insert_or_update_returned_letters
revision = '0311_populate_returned_letters'
down_revision = '0310_returned_letters_table'... | """
Revision ID: 0311_populate_returned_letters
Revises: 0310_returned_letters_table
Create Date: 2019-12-09 12:13:49.432993
"""
from alembic import op
revision = '0311_populate_returned_letters'
down_revision = '0310_returned_letters_table'
def upgrade():
conn = op.get_bind()
sql = """
select id, ... | <commit_before>"""
Revision ID: 0311_populate_returned_letters
Revises: 0310_returned_letters_table
Create Date: 2019-12-09 12:13:49.432993
"""
from alembic import op
from app.dao.returned_letters_dao import insert_or_update_returned_letters
revision = '0311_populate_returned_letters'
down_revision = '0310_returned... | """
Revision ID: 0311_populate_returned_letters
Revises: 0310_returned_letters_table
Create Date: 2019-12-09 12:13:49.432993
"""
from alembic import op
revision = '0311_populate_returned_letters'
down_revision = '0310_returned_letters_table'
def upgrade():
conn = op.get_bind()
sql = """
select id, ... | """
Revision ID: 0311_populate_returned_letters
Revises: 0310_returned_letters_table
Create Date: 2019-12-09 12:13:49.432993
"""
from alembic import op
from app.dao.returned_letters_dao import insert_or_update_returned_letters
revision = '0311_populate_returned_letters'
down_revision = '0310_returned_letters_table'... | <commit_before>"""
Revision ID: 0311_populate_returned_letters
Revises: 0310_returned_letters_table
Create Date: 2019-12-09 12:13:49.432993
"""
from alembic import op
from app.dao.returned_letters_dao import insert_or_update_returned_letters
revision = '0311_populate_returned_letters'
down_revision = '0310_returned... |
853d2907432a8d7fbedbed12ff28efbe520d4c80 | project_euler/library/number_theory/continued_fractions.py | project_euler/library/number_theory/continued_fractions.py | from fractions import Fraction
from math import sqrt
from itertools import chain, cycle
from typing import Generator, Iterable, List, Tuple
def convergent_sequence(generator: Iterable[int]) -> \
Generator[Fraction, None, None]:
h = (0, 1)
k = (1, 0)
for a in generator:
h = h[1], a * h[1]... | from fractions import Fraction
from math import sqrt
from itertools import chain, cycle
from typing import Generator, Iterable, List, Tuple
from .gcd import gcd
from ..sqrt import fsqrt
def convergent_sequence(generator: Iterable[int]) -> \
Generator[Fraction, None, None]:
h = (0, 1)
k = (1, 0)
... | Make continued fractions sqrt much faster | Make continued fractions sqrt much faster
| Python | mit | cryvate/project-euler,cryvate/project-euler | from fractions import Fraction
from math import sqrt
from itertools import chain, cycle
from typing import Generator, Iterable, List, Tuple
def convergent_sequence(generator: Iterable[int]) -> \
Generator[Fraction, None, None]:
h = (0, 1)
k = (1, 0)
for a in generator:
h = h[1], a * h[1]... | from fractions import Fraction
from math import sqrt
from itertools import chain, cycle
from typing import Generator, Iterable, List, Tuple
from .gcd import gcd
from ..sqrt import fsqrt
def convergent_sequence(generator: Iterable[int]) -> \
Generator[Fraction, None, None]:
h = (0, 1)
k = (1, 0)
... | <commit_before>from fractions import Fraction
from math import sqrt
from itertools import chain, cycle
from typing import Generator, Iterable, List, Tuple
def convergent_sequence(generator: Iterable[int]) -> \
Generator[Fraction, None, None]:
h = (0, 1)
k = (1, 0)
for a in generator:
h =... | from fractions import Fraction
from math import sqrt
from itertools import chain, cycle
from typing import Generator, Iterable, List, Tuple
from .gcd import gcd
from ..sqrt import fsqrt
def convergent_sequence(generator: Iterable[int]) -> \
Generator[Fraction, None, None]:
h = (0, 1)
k = (1, 0)
... | from fractions import Fraction
from math import sqrt
from itertools import chain, cycle
from typing import Generator, Iterable, List, Tuple
def convergent_sequence(generator: Iterable[int]) -> \
Generator[Fraction, None, None]:
h = (0, 1)
k = (1, 0)
for a in generator:
h = h[1], a * h[1]... | <commit_before>from fractions import Fraction
from math import sqrt
from itertools import chain, cycle
from typing import Generator, Iterable, List, Tuple
def convergent_sequence(generator: Iterable[int]) -> \
Generator[Fraction, None, None]:
h = (0, 1)
k = (1, 0)
for a in generator:
h =... |
36df41cf3f5345ab599b5a748562aec2af414239 | python/crypto-square/crypto_square.py | python/crypto-square/crypto_square.py | import string
import math
import itertools
class CryptoSquare:
@classmethod
def encode(cls, msg):
if len(cls.normalize(msg)) == 0:
return ''
return ' '.join(cls.transpose_square(cls.squarify(cls.normalize(msg))))
@classmethod
def squarify(cls, msg):
return [msg[i:... | import string
import math
import itertools
class CryptoSquare:
@classmethod
def encode(cls, msg):
if len(cls.normalize(msg)) == 0:
return ''
return ' '.join(cls.transpose_square(cls.squarify(cls.normalize(msg))))
@classmethod
def squarify(cls, msg):
return [msg[i:... | Clean up transpose helper method | Clean up transpose helper method
| Python | mit | rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism | import string
import math
import itertools
class CryptoSquare:
@classmethod
def encode(cls, msg):
if len(cls.normalize(msg)) == 0:
return ''
return ' '.join(cls.transpose_square(cls.squarify(cls.normalize(msg))))
@classmethod
def squarify(cls, msg):
return [msg[i:... | import string
import math
import itertools
class CryptoSquare:
@classmethod
def encode(cls, msg):
if len(cls.normalize(msg)) == 0:
return ''
return ' '.join(cls.transpose_square(cls.squarify(cls.normalize(msg))))
@classmethod
def squarify(cls, msg):
return [msg[i:... | <commit_before>import string
import math
import itertools
class CryptoSquare:
@classmethod
def encode(cls, msg):
if len(cls.normalize(msg)) == 0:
return ''
return ' '.join(cls.transpose_square(cls.squarify(cls.normalize(msg))))
@classmethod
def squarify(cls, msg):
... | import string
import math
import itertools
class CryptoSquare:
@classmethod
def encode(cls, msg):
if len(cls.normalize(msg)) == 0:
return ''
return ' '.join(cls.transpose_square(cls.squarify(cls.normalize(msg))))
@classmethod
def squarify(cls, msg):
return [msg[i:... | import string
import math
import itertools
class CryptoSquare:
@classmethod
def encode(cls, msg):
if len(cls.normalize(msg)) == 0:
return ''
return ' '.join(cls.transpose_square(cls.squarify(cls.normalize(msg))))
@classmethod
def squarify(cls, msg):
return [msg[i:... | <commit_before>import string
import math
import itertools
class CryptoSquare:
@classmethod
def encode(cls, msg):
if len(cls.normalize(msg)) == 0:
return ''
return ' '.join(cls.transpose_square(cls.squarify(cls.normalize(msg))))
@classmethod
def squarify(cls, msg):
... |
c8301f1e3165a5e5eaac46de9bdf97c4c1109718 | dht.py | dht.py | #!/usr/bin/env python
import time
import thread
import Adafruit_DHT as dht
import config
h = 0.0
t = 0.0
def get_ht_thread():
while True:
ht = dht.read_retry(dht.DHT22, config.DHT22_GPIO_NUM)
h = '{0:0.1f}'.format(ht[0])
t = '{0:0.1f}'.format(ht[1])
time.sleep(2)
def get_ht():
... | #!/usr/bin/env python
import time
import thread
import Adafruit_DHT as dht
import config
h = 0.0
t = 0.0
def get_ht_thread():
global h
global t
while True:
ht = dht.read_retry(dht.DHT22, config.DHT22_GPIO_NUM)
h = '{0:0.1f}'.format(ht[0])
t = '{0:0.1f}'.format(ht[1])
time.... | Fix a DHT reading error | Fix a DHT reading error
| Python | mit | yunbademo/yunba-smarthome,yunbademo/yunba-smarthome | #!/usr/bin/env python
import time
import thread
import Adafruit_DHT as dht
import config
h = 0.0
t = 0.0
def get_ht_thread():
while True:
ht = dht.read_retry(dht.DHT22, config.DHT22_GPIO_NUM)
h = '{0:0.1f}'.format(ht[0])
t = '{0:0.1f}'.format(ht[1])
time.sleep(2)
def get_ht():
... | #!/usr/bin/env python
import time
import thread
import Adafruit_DHT as dht
import config
h = 0.0
t = 0.0
def get_ht_thread():
global h
global t
while True:
ht = dht.read_retry(dht.DHT22, config.DHT22_GPIO_NUM)
h = '{0:0.1f}'.format(ht[0])
t = '{0:0.1f}'.format(ht[1])
time.... | <commit_before>#!/usr/bin/env python
import time
import thread
import Adafruit_DHT as dht
import config
h = 0.0
t = 0.0
def get_ht_thread():
while True:
ht = dht.read_retry(dht.DHT22, config.DHT22_GPIO_NUM)
h = '{0:0.1f}'.format(ht[0])
t = '{0:0.1f}'.format(ht[1])
time.sleep(2)
d... | #!/usr/bin/env python
import time
import thread
import Adafruit_DHT as dht
import config
h = 0.0
t = 0.0
def get_ht_thread():
global h
global t
while True:
ht = dht.read_retry(dht.DHT22, config.DHT22_GPIO_NUM)
h = '{0:0.1f}'.format(ht[0])
t = '{0:0.1f}'.format(ht[1])
time.... | #!/usr/bin/env python
import time
import thread
import Adafruit_DHT as dht
import config
h = 0.0
t = 0.0
def get_ht_thread():
while True:
ht = dht.read_retry(dht.DHT22, config.DHT22_GPIO_NUM)
h = '{0:0.1f}'.format(ht[0])
t = '{0:0.1f}'.format(ht[1])
time.sleep(2)
def get_ht():
... | <commit_before>#!/usr/bin/env python
import time
import thread
import Adafruit_DHT as dht
import config
h = 0.0
t = 0.0
def get_ht_thread():
while True:
ht = dht.read_retry(dht.DHT22, config.DHT22_GPIO_NUM)
h = '{0:0.1f}'.format(ht[0])
t = '{0:0.1f}'.format(ht[1])
time.sleep(2)
d... |
b86d23b0302bb4d0efa2aa203883a78d3dcbf26e | scipy/integrate/_ivp/tests/test_rk.py | scipy/integrate/_ivp/tests/test_rk.py | import pytest
from numpy.testing import assert_allclose
import numpy as np
from scipy.integrate import RK23, RK45, DOP853
from scipy.integrate._ivp import dop853_coefficients
@pytest.mark.parametrize("solver", [RK23, RK45, DOP853])
def test_coefficient_properties(solver):
assert_allclose(np.sum(solver.B), 1, rtol... | import pytest
from numpy.testing import assert_allclose, assert_
import numpy as np
from scipy.integrate import RK23, RK45, DOP853
from scipy.integrate._ivp import dop853_coefficients
@pytest.mark.parametrize("solver", [RK23, RK45, DOP853])
def test_coefficient_properties(solver):
assert_allclose(np.sum(solver.B)... | Test of error estimation of Runge-Kutta methods | TST: Test of error estimation of Runge-Kutta methods
| Python | bsd-3-clause | jor-/scipy,zerothi/scipy,mdhaber/scipy,anntzer/scipy,ilayn/scipy,Eric89GXL/scipy,mdhaber/scipy,matthew-brett/scipy,endolith/scipy,jor-/scipy,anntzer/scipy,grlee77/scipy,vigna/scipy,mdhaber/scipy,andyfaff/scipy,aarchiba/scipy,aeklant/scipy,tylerjereddy/scipy,aeklant/scipy,andyfaff/scipy,perimosocordiae/scipy,tylerjeredd... | import pytest
from numpy.testing import assert_allclose
import numpy as np
from scipy.integrate import RK23, RK45, DOP853
from scipy.integrate._ivp import dop853_coefficients
@pytest.mark.parametrize("solver", [RK23, RK45, DOP853])
def test_coefficient_properties(solver):
assert_allclose(np.sum(solver.B), 1, rtol... | import pytest
from numpy.testing import assert_allclose, assert_
import numpy as np
from scipy.integrate import RK23, RK45, DOP853
from scipy.integrate._ivp import dop853_coefficients
@pytest.mark.parametrize("solver", [RK23, RK45, DOP853])
def test_coefficient_properties(solver):
assert_allclose(np.sum(solver.B)... | <commit_before>import pytest
from numpy.testing import assert_allclose
import numpy as np
from scipy.integrate import RK23, RK45, DOP853
from scipy.integrate._ivp import dop853_coefficients
@pytest.mark.parametrize("solver", [RK23, RK45, DOP853])
def test_coefficient_properties(solver):
assert_allclose(np.sum(sol... | import pytest
from numpy.testing import assert_allclose, assert_
import numpy as np
from scipy.integrate import RK23, RK45, DOP853
from scipy.integrate._ivp import dop853_coefficients
@pytest.mark.parametrize("solver", [RK23, RK45, DOP853])
def test_coefficient_properties(solver):
assert_allclose(np.sum(solver.B)... | import pytest
from numpy.testing import assert_allclose
import numpy as np
from scipy.integrate import RK23, RK45, DOP853
from scipy.integrate._ivp import dop853_coefficients
@pytest.mark.parametrize("solver", [RK23, RK45, DOP853])
def test_coefficient_properties(solver):
assert_allclose(np.sum(solver.B), 1, rtol... | <commit_before>import pytest
from numpy.testing import assert_allclose
import numpy as np
from scipy.integrate import RK23, RK45, DOP853
from scipy.integrate._ivp import dop853_coefficients
@pytest.mark.parametrize("solver", [RK23, RK45, DOP853])
def test_coefficient_properties(solver):
assert_allclose(np.sum(sol... |
81dfb5cb952fbca90882bd39e76887f0fa6479eb | msmexplorer/tests/test_msm_plot.py | msmexplorer/tests/test_msm_plot.py | import numpy as np
from msmbuilder.msm import MarkovStateModel, BayesianMarkovStateModel
from matplotlib.axes import SubplotBase
from seaborn.apionly import JointGrid
from ..plots import plot_pop_resids, plot_msm_network, plot_timescales
rs = np.random.RandomState(42)
data = rs.randint(low=0, high=10, size=100000)
ms... | import numpy as np
from msmbuilder.msm import MarkovStateModel, BayesianMarkovStateModel
from matplotlib.axes import SubplotBase
from seaborn.apionly import JointGrid
from ..plots import plot_pop_resids, plot_msm_network, plot_timescales, plot_implied_timescales
rs = np.random.RandomState(42)
data = rs.randint(low=0,... | Add test for implied timescales plot | Add test for implied timescales plot
| Python | mit | msmexplorer/msmexplorer,msmexplorer/msmexplorer | import numpy as np
from msmbuilder.msm import MarkovStateModel, BayesianMarkovStateModel
from matplotlib.axes import SubplotBase
from seaborn.apionly import JointGrid
from ..plots import plot_pop_resids, plot_msm_network, plot_timescales
rs = np.random.RandomState(42)
data = rs.randint(low=0, high=10, size=100000)
ms... | import numpy as np
from msmbuilder.msm import MarkovStateModel, BayesianMarkovStateModel
from matplotlib.axes import SubplotBase
from seaborn.apionly import JointGrid
from ..plots import plot_pop_resids, plot_msm_network, plot_timescales, plot_implied_timescales
rs = np.random.RandomState(42)
data = rs.randint(low=0,... | <commit_before>import numpy as np
from msmbuilder.msm import MarkovStateModel, BayesianMarkovStateModel
from matplotlib.axes import SubplotBase
from seaborn.apionly import JointGrid
from ..plots import plot_pop_resids, plot_msm_network, plot_timescales
rs = np.random.RandomState(42)
data = rs.randint(low=0, high=10, ... | import numpy as np
from msmbuilder.msm import MarkovStateModel, BayesianMarkovStateModel
from matplotlib.axes import SubplotBase
from seaborn.apionly import JointGrid
from ..plots import plot_pop_resids, plot_msm_network, plot_timescales, plot_implied_timescales
rs = np.random.RandomState(42)
data = rs.randint(low=0,... | import numpy as np
from msmbuilder.msm import MarkovStateModel, BayesianMarkovStateModel
from matplotlib.axes import SubplotBase
from seaborn.apionly import JointGrid
from ..plots import plot_pop_resids, plot_msm_network, plot_timescales
rs = np.random.RandomState(42)
data = rs.randint(low=0, high=10, size=100000)
ms... | <commit_before>import numpy as np
from msmbuilder.msm import MarkovStateModel, BayesianMarkovStateModel
from matplotlib.axes import SubplotBase
from seaborn.apionly import JointGrid
from ..plots import plot_pop_resids, plot_msm_network, plot_timescales
rs = np.random.RandomState(42)
data = rs.randint(low=0, high=10, ... |
5f39fd311c735593ac41ba17a060f9cadbe80e18 | nlpipe/scripts/amcat_background.py | nlpipe/scripts/amcat_background.py | """
Assign articles from AmCAT sets for background processing in nlpipe
"""
import sys, argparse
from nlpipe import tasks
from nlpipe.pipeline import parse_background
from nlpipe.backend import get_input_ids
from nlpipe.celery import app
modules = {n.split(".")[-1]: t for (n,t) in app.tasks.iteritems() if n.startswi... | """
Assign articles from AmCAT sets for background processing in nlpipe
"""
import sys, argparse
from nlpipe import tasks
from nlpipe.pipeline import parse_background
from nlpipe.backend import get_input_ids
from nlpipe.celery import app
import logging
FORMAT = '[%(asctime)-15s] %(message)s'
logging.basicConfig(form... | Add logging to background assign | Add logging to background assign
| Python | mit | amcat/nlpipe | """
Assign articles from AmCAT sets for background processing in nlpipe
"""
import sys, argparse
from nlpipe import tasks
from nlpipe.pipeline import parse_background
from nlpipe.backend import get_input_ids
from nlpipe.celery import app
modules = {n.split(".")[-1]: t for (n,t) in app.tasks.iteritems() if n.startswi... | """
Assign articles from AmCAT sets for background processing in nlpipe
"""
import sys, argparse
from nlpipe import tasks
from nlpipe.pipeline import parse_background
from nlpipe.backend import get_input_ids
from nlpipe.celery import app
import logging
FORMAT = '[%(asctime)-15s] %(message)s'
logging.basicConfig(form... | <commit_before>"""
Assign articles from AmCAT sets for background processing in nlpipe
"""
import sys, argparse
from nlpipe import tasks
from nlpipe.pipeline import parse_background
from nlpipe.backend import get_input_ids
from nlpipe.celery import app
modules = {n.split(".")[-1]: t for (n,t) in app.tasks.iteritems(... | """
Assign articles from AmCAT sets for background processing in nlpipe
"""
import sys, argparse
from nlpipe import tasks
from nlpipe.pipeline import parse_background
from nlpipe.backend import get_input_ids
from nlpipe.celery import app
import logging
FORMAT = '[%(asctime)-15s] %(message)s'
logging.basicConfig(form... | """
Assign articles from AmCAT sets for background processing in nlpipe
"""
import sys, argparse
from nlpipe import tasks
from nlpipe.pipeline import parse_background
from nlpipe.backend import get_input_ids
from nlpipe.celery import app
modules = {n.split(".")[-1]: t for (n,t) in app.tasks.iteritems() if n.startswi... | <commit_before>"""
Assign articles from AmCAT sets for background processing in nlpipe
"""
import sys, argparse
from nlpipe import tasks
from nlpipe.pipeline import parse_background
from nlpipe.backend import get_input_ids
from nlpipe.celery import app
modules = {n.split(".")[-1]: t for (n,t) in app.tasks.iteritems(... |
8c11b2db7f09844aa860bfe7f1c3ff23c0d30f94 | sentry/migrations/0062_correct_del_index_sentry_groupedmessage_logger__view__checksum.py | sentry/migrations/0062_correct_del_index_sentry_groupedmessage_logger__view__checksum.py | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'GroupedMessage', fields ['logger', 'view', 'checksum']
# FIXES 0015
... | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
pass
def backwards(self, orm):
pass
complete_apps = ['sentry']
| Remove bad delete_unique call as it was already applied in migration 0015 | Remove bad delete_unique call as it was already applied in migration 0015
| Python | bsd-3-clause | camilonova/sentry,1tush/sentry,vperron/sentry,drcapulet/sentry,fuziontech/sentry,boneyao/sentry,mvaled/sentry,ifduyue/sentry,pauloschilling/sentry,boneyao/sentry,beni55/sentry,Kryz/sentry,beeftornado/sentry,jean/sentry,gg7/sentry,JamesMura/sentry,rdio/sentry,wong2/sentry,songyi199111/sentry,daevaorn/sentry,looker/sentr... | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'GroupedMessage', fields ['logger', 'view', 'checksum']
# FIXES 0015
... | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
pass
def backwards(self, orm):
pass
complete_apps = ['sentry']
| <commit_before># -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'GroupedMessage', fields ['logger', 'view', 'checksum']
# FIX... | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
pass
def backwards(self, orm):
pass
complete_apps = ['sentry']
| # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'GroupedMessage', fields ['logger', 'view', 'checksum']
# FIXES 0015
... | <commit_before># -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'GroupedMessage', fields ['logger', 'view', 'checksum']
# FIX... |
457f2d1d51b2bf008f837bf3ce8ee3cb47d5ba6b | var/spack/packages/libpng/package.py | var/spack/packages/libpng/package.py | from spack import *
class Libpng(Package):
"""libpng graphics file format"""
homepage = "http://www.libpng.org/pub/png/libpng.html"
url = "http://sourceforge.net/projects/libpng/files/libpng16/1.6.14/libpng-1.6.14.tar.gz/download"
version('1.6.14', '2101b3de1d5f348925990f9aa8405660')
def ins... | from spack import *
class Libpng(Package):
"""libpng graphics file format"""
homepage = "http://www.libpng.org/pub/png/libpng.html"
url = "http://download.sourceforge.net/libpng/libpng-1.6.16.tar.gz"
version('1.6.14', '2101b3de1d5f348925990f9aa8405660')
version('1.6.15', '829a256f3de9307731d4... | Fix libpng to use a better URL | Fix libpng to use a better URL
Sourceforge URLs like this eventually die when the libpng version is bumped:
http://sourceforge.net/projects/libpng/files/libpng16/1.6.14/libpng-1.6.14.tar.gz/download
But ones like this give you a "permanently moved", which curl -L will follow:
http://download.sourceforge.net/l... | Python | lgpl-2.1 | mfherbst/spack,tmerrick1/spack,iulian787/spack,TheTimmy/spack,tmerrick1/spack,krafczyk/spack,EmreAtes/spack,matthiasdiener/spack,TheTimmy/spack,lgarren/spack,EmreAtes/spack,lgarren/spack,krafczyk/spack,EmreAtes/spack,mfherbst/spack,LLNL/spack,lgarren/spack,krafczyk/spack,krafczyk/spack,skosukhin/spack,TheTimmy/spack,mf... | from spack import *
class Libpng(Package):
"""libpng graphics file format"""
homepage = "http://www.libpng.org/pub/png/libpng.html"
url = "http://sourceforge.net/projects/libpng/files/libpng16/1.6.14/libpng-1.6.14.tar.gz/download"
version('1.6.14', '2101b3de1d5f348925990f9aa8405660')
def ins... | from spack import *
class Libpng(Package):
"""libpng graphics file format"""
homepage = "http://www.libpng.org/pub/png/libpng.html"
url = "http://download.sourceforge.net/libpng/libpng-1.6.16.tar.gz"
version('1.6.14', '2101b3de1d5f348925990f9aa8405660')
version('1.6.15', '829a256f3de9307731d4... | <commit_before>from spack import *
class Libpng(Package):
"""libpng graphics file format"""
homepage = "http://www.libpng.org/pub/png/libpng.html"
url = "http://sourceforge.net/projects/libpng/files/libpng16/1.6.14/libpng-1.6.14.tar.gz/download"
version('1.6.14', '2101b3de1d5f348925990f9aa8405660... | from spack import *
class Libpng(Package):
"""libpng graphics file format"""
homepage = "http://www.libpng.org/pub/png/libpng.html"
url = "http://download.sourceforge.net/libpng/libpng-1.6.16.tar.gz"
version('1.6.14', '2101b3de1d5f348925990f9aa8405660')
version('1.6.15', '829a256f3de9307731d4... | from spack import *
class Libpng(Package):
"""libpng graphics file format"""
homepage = "http://www.libpng.org/pub/png/libpng.html"
url = "http://sourceforge.net/projects/libpng/files/libpng16/1.6.14/libpng-1.6.14.tar.gz/download"
version('1.6.14', '2101b3de1d5f348925990f9aa8405660')
def ins... | <commit_before>from spack import *
class Libpng(Package):
"""libpng graphics file format"""
homepage = "http://www.libpng.org/pub/png/libpng.html"
url = "http://sourceforge.net/projects/libpng/files/libpng16/1.6.14/libpng-1.6.14.tar.gz/download"
version('1.6.14', '2101b3de1d5f348925990f9aa8405660... |
f4429e49c8b493fa285d169a41b82cb761716705 | tests/explorers_tests/test_additive_ou.py | tests/explorers_tests/test_additive_ou.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()
import unittest
import numpy as np
from chainerrl.explorers.additive_ou import AdditiveOU
class ... | 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()
import unittest
import numpy as np
from chainerrl.explorers.additive_ou import AdditiveOU
class ... | Fix a test for AdditiveOU | Fix a test for AdditiveOU
| 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()
import unittest
import numpy as np
from chainerrl.explorers.additive_ou import AdditiveOU
class ... | 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()
import unittest
import numpy as np
from chainerrl.explorers.additive_ou import AdditiveOU
class ... | <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()
import unittest
import numpy as np
from chainerrl.explorers.additive_ou import Addi... | 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()
import unittest
import numpy as np
from chainerrl.explorers.additive_ou import AdditiveOU
class ... | 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()
import unittest
import numpy as np
from chainerrl.explorers.additive_ou import AdditiveOU
class ... | <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()
import unittest
import numpy as np
from chainerrl.explorers.additive_ou import Addi... |
bea258e2affc165f610de83248d9f958eec1ef4e | cmsplugin_markdown/models.py | cmsplugin_markdown/models.py | from django.db import models
from cms.models import CMSPlugin
class MarkdownPlugin(CMSPlugin):
markdown_text = models.TextField(max_length=8000)
| from django.db import models
from cms.models import CMSPlugin
from cms.utils.compat.dj import python_2_unicode_compatible
@python_2_unicode_compatible
class MarkdownPlugin(CMSPlugin):
markdown_text = models.TextField(max_length=8000)
def __str__(self):
text = self.markdown_text
return (text[... | Add __str__ method for better representation in frontend | Add __str__ method for better representation in frontend
| Python | mit | bitmazk/cmsplugin-markdown,bitmazk/cmsplugin-markdown,bitmazk/cmsplugin-markdown | from django.db import models
from cms.models import CMSPlugin
class MarkdownPlugin(CMSPlugin):
markdown_text = models.TextField(max_length=8000)
Add __str__ method for better representation in frontend | from django.db import models
from cms.models import CMSPlugin
from cms.utils.compat.dj import python_2_unicode_compatible
@python_2_unicode_compatible
class MarkdownPlugin(CMSPlugin):
markdown_text = models.TextField(max_length=8000)
def __str__(self):
text = self.markdown_text
return (text[... | <commit_before>from django.db import models
from cms.models import CMSPlugin
class MarkdownPlugin(CMSPlugin):
markdown_text = models.TextField(max_length=8000)
<commit_msg>Add __str__ method for better representation in frontend<commit_after> | from django.db import models
from cms.models import CMSPlugin
from cms.utils.compat.dj import python_2_unicode_compatible
@python_2_unicode_compatible
class MarkdownPlugin(CMSPlugin):
markdown_text = models.TextField(max_length=8000)
def __str__(self):
text = self.markdown_text
return (text[... | from django.db import models
from cms.models import CMSPlugin
class MarkdownPlugin(CMSPlugin):
markdown_text = models.TextField(max_length=8000)
Add __str__ method for better representation in frontendfrom django.db import models
from cms.models import CMSPlugin
from cms.utils.compat.dj import python_2_unicode_... | <commit_before>from django.db import models
from cms.models import CMSPlugin
class MarkdownPlugin(CMSPlugin):
markdown_text = models.TextField(max_length=8000)
<commit_msg>Add __str__ method for better representation in frontend<commit_after>from django.db import models
from cms.models import CMSPlugin
from cms... |
6776a538f946a25e921f8ecd11a0ce1ddd422d0d | tools/skp/page_sets/skia_ukwsj_nexus10.py | tools/skp/page_sets/skia_ukwsj_nexus10.py | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=W0401,W0614
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class SkiaBuildbotDesk... | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=W0401,W0614
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class SkiaBuildbotDesk... | Increase timeout of ukwsj to get more consistent SKP captures | Increase timeout of ukwsj to get more consistent SKP captures
BUG=skia:3574
TBR=borenet
NOTRY=true
Review URL: https://codereview.chromium.org/1038443002
| Python | bsd-3-clause | TeamTwisted/external_skia,vanish87/skia,shahrzadmn/skia,VRToxin-AOSP/android_external_skia,TeamTwisted/external_skia,shahrzadmn/skia,pcwalton/skia,TeamExodus/external_skia,YUPlayGodDev/platform_external_skia,boulzordev/android_external_skia,qrealka/skia-hc,TeamTwisted/external_skia,HalCanary/skia-hc,rubenvb/skia,pcwalt... | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=W0401,W0614
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class SkiaBuildbotDesk... | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=W0401,W0614
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class SkiaBuildbotDesk... | <commit_before># Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=W0401,W0614
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class S... | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=W0401,W0614
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class SkiaBuildbotDesk... | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=W0401,W0614
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class SkiaBuildbotDesk... | <commit_before># Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=W0401,W0614
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class S... |
9828e5125cdbc01a773c60b1e211d0e434a2c5aa | tests/test_modules/test_pmac/test_pmacstatuspart.py | tests/test_modules/test_pmac/test_pmacstatuspart.py | from malcolm.core import Process
from malcolm.modules.builtin.controllers import ManagerController
from malcolm.modules.pmac.blocks import pmac_status_block
from malcolm.modules.pmac.parts import PmacStatusPart
from malcolm.testutil import ChildTestCase
class TestPmacStatusPart(ChildTestCase):
def setUp(self):
... | from malcolm.core import Process
from malcolm.modules.builtin.controllers import ManagerController
from malcolm.modules.pmac.blocks import pmac_status_block
from malcolm.modules.pmac.parts import PmacStatusPart
from malcolm.testutil import ChildTestCase
class TestPmacStatusPart(ChildTestCase):
def setUp(self):
... | Change TestPmacStatusPart to not use i10 | Change TestPmacStatusPart to not use i10
| Python | apache-2.0 | dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm | from malcolm.core import Process
from malcolm.modules.builtin.controllers import ManagerController
from malcolm.modules.pmac.blocks import pmac_status_block
from malcolm.modules.pmac.parts import PmacStatusPart
from malcolm.testutil import ChildTestCase
class TestPmacStatusPart(ChildTestCase):
def setUp(self):
... | from malcolm.core import Process
from malcolm.modules.builtin.controllers import ManagerController
from malcolm.modules.pmac.blocks import pmac_status_block
from malcolm.modules.pmac.parts import PmacStatusPart
from malcolm.testutil import ChildTestCase
class TestPmacStatusPart(ChildTestCase):
def setUp(self):
... | <commit_before>from malcolm.core import Process
from malcolm.modules.builtin.controllers import ManagerController
from malcolm.modules.pmac.blocks import pmac_status_block
from malcolm.modules.pmac.parts import PmacStatusPart
from malcolm.testutil import ChildTestCase
class TestPmacStatusPart(ChildTestCase):
def ... | from malcolm.core import Process
from malcolm.modules.builtin.controllers import ManagerController
from malcolm.modules.pmac.blocks import pmac_status_block
from malcolm.modules.pmac.parts import PmacStatusPart
from malcolm.testutil import ChildTestCase
class TestPmacStatusPart(ChildTestCase):
def setUp(self):
... | from malcolm.core import Process
from malcolm.modules.builtin.controllers import ManagerController
from malcolm.modules.pmac.blocks import pmac_status_block
from malcolm.modules.pmac.parts import PmacStatusPart
from malcolm.testutil import ChildTestCase
class TestPmacStatusPart(ChildTestCase):
def setUp(self):
... | <commit_before>from malcolm.core import Process
from malcolm.modules.builtin.controllers import ManagerController
from malcolm.modules.pmac.blocks import pmac_status_block
from malcolm.modules.pmac.parts import PmacStatusPart
from malcolm.testutil import ChildTestCase
class TestPmacStatusPart(ChildTestCase):
def ... |
864d8908fce4c92382916f5e3e02992f83fd6e6e | feincms/content/raw/models.py | feincms/content/raw/models.py | from django.db import models
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
class RawContent(models.Model):
text = models.TextField(_('text'), blank=True)
class Meta:
abstract = True
verbose_name = _('raw content')
verbose_name_pl... | from django.db import models
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
class RawContent(models.Model):
text = models.TextField(_('content'), blank=True)
class Meta:
abstract = True
verbose_name = _('raw content')
verbose_name... | Rename RawContent text field, describes field better | Rename RawContent text field, describes field better
| Python | bsd-3-clause | joshuajonah/feincms,pjdelport/feincms,michaelkuty/feincms,matthiask/django-content-editor,feincms/feincms,joshuajonah/feincms,hgrimelid/feincms,joshuajonah/feincms,matthiask/feincms2-content,mjl/feincms,michaelkuty/feincms,matthiask/django-content-editor,nickburlett/feincms,pjdelport/feincms,mjl/feincms,joshuajonah/fei... | from django.db import models
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
class RawContent(models.Model):
text = models.TextField(_('text'), blank=True)
class Meta:
abstract = True
verbose_name = _('raw content')
verbose_name_pl... | from django.db import models
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
class RawContent(models.Model):
text = models.TextField(_('content'), blank=True)
class Meta:
abstract = True
verbose_name = _('raw content')
verbose_name... | <commit_before>from django.db import models
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
class RawContent(models.Model):
text = models.TextField(_('text'), blank=True)
class Meta:
abstract = True
verbose_name = _('raw content')
... | from django.db import models
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
class RawContent(models.Model):
text = models.TextField(_('content'), blank=True)
class Meta:
abstract = True
verbose_name = _('raw content')
verbose_name... | from django.db import models
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
class RawContent(models.Model):
text = models.TextField(_('text'), blank=True)
class Meta:
abstract = True
verbose_name = _('raw content')
verbose_name_pl... | <commit_before>from django.db import models
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
class RawContent(models.Model):
text = models.TextField(_('text'), blank=True)
class Meta:
abstract = True
verbose_name = _('raw content')
... |
58dbfa0b449b8e4171c5f9cef1c15db39b52c1f0 | tests/run_tests.py | tests/run_tests.py | #!/usr/bin/env python
import os.path
import sys
import subprocess
import unittest
tests_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.dirname(tests_dir))
import secretstorage
if __name__ == '__main__':
major, minor, patch = sys.version_info[:3]
print('Running with Python %d.%d.%d (SecretStorage from ... | #!/usr/bin/env python
import os.path
import sys
import subprocess
import unittest
tests_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.dirname(tests_dir))
import secretstorage
if __name__ == '__main__':
major, minor, patch = sys.version_info[:3]
print('Running with Python %d.%d.%d (SecretStorage from ... | Add an assert to make mypy check pass again | Add an assert to make mypy check pass again
| Python | bsd-3-clause | mitya57/secretstorage | #!/usr/bin/env python
import os.path
import sys
import subprocess
import unittest
tests_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.dirname(tests_dir))
import secretstorage
if __name__ == '__main__':
major, minor, patch = sys.version_info[:3]
print('Running with Python %d.%d.%d (SecretStorage from ... | #!/usr/bin/env python
import os.path
import sys
import subprocess
import unittest
tests_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.dirname(tests_dir))
import secretstorage
if __name__ == '__main__':
major, minor, patch = sys.version_info[:3]
print('Running with Python %d.%d.%d (SecretStorage from ... | <commit_before>#!/usr/bin/env python
import os.path
import sys
import subprocess
import unittest
tests_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.dirname(tests_dir))
import secretstorage
if __name__ == '__main__':
major, minor, patch = sys.version_info[:3]
print('Running with Python %d.%d.%d (Secr... | #!/usr/bin/env python
import os.path
import sys
import subprocess
import unittest
tests_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.dirname(tests_dir))
import secretstorage
if __name__ == '__main__':
major, minor, patch = sys.version_info[:3]
print('Running with Python %d.%d.%d (SecretStorage from ... | #!/usr/bin/env python
import os.path
import sys
import subprocess
import unittest
tests_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.dirname(tests_dir))
import secretstorage
if __name__ == '__main__':
major, minor, patch = sys.version_info[:3]
print('Running with Python %d.%d.%d (SecretStorage from ... | <commit_before>#!/usr/bin/env python
import os.path
import sys
import subprocess
import unittest
tests_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.dirname(tests_dir))
import secretstorage
if __name__ == '__main__':
major, minor, patch = sys.version_info[:3]
print('Running with Python %d.%d.%d (Secr... |
99496d97f3e00284840d2127556bba0e21d1a99e | frappe/tests/test_commands.py | frappe/tests/test_commands.py | # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
from __future__ import unicode_literals
import shlex
import subprocess
import unittest
import frappe
def clean(value):
if isinstance(value, (bytes, str)):
value = value.decode().strip()
return value
class BaseTestCommands:
def execute(self... | # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
from __future__ import unicode_literals
import shlex
import subprocess
import unittest
import frappe
def clean(value):
if isinstance(value, (bytes, str)):
value = value.decode().strip()
return value
class BaseTestCommands:
def execute(self... | Add tests for bench execute | test: Add tests for bench execute
| Python | mit | saurabh6790/frappe,StrellaGroup/frappe,adityahase/frappe,mhbu50/frappe,adityahase/frappe,yashodhank/frappe,mhbu50/frappe,yashodhank/frappe,mhbu50/frappe,mhbu50/frappe,StrellaGroup/frappe,saurabh6790/frappe,yashodhank/frappe,frappe/frappe,almeidapaulopt/frappe,almeidapaulopt/frappe,StrellaGroup/frappe,adityahase/frappe,... | # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
from __future__ import unicode_literals
import shlex
import subprocess
import unittest
import frappe
def clean(value):
if isinstance(value, (bytes, str)):
value = value.decode().strip()
return value
class BaseTestCommands:
def execute(self... | # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
from __future__ import unicode_literals
import shlex
import subprocess
import unittest
import frappe
def clean(value):
if isinstance(value, (bytes, str)):
value = value.decode().strip()
return value
class BaseTestCommands:
def execute(self... | <commit_before># Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
from __future__ import unicode_literals
import shlex
import subprocess
import unittest
import frappe
def clean(value):
if isinstance(value, (bytes, str)):
value = value.decode().strip()
return value
class BaseTestCommands:
d... | # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
from __future__ import unicode_literals
import shlex
import subprocess
import unittest
import frappe
def clean(value):
if isinstance(value, (bytes, str)):
value = value.decode().strip()
return value
class BaseTestCommands:
def execute(self... | # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
from __future__ import unicode_literals
import shlex
import subprocess
import unittest
import frappe
def clean(value):
if isinstance(value, (bytes, str)):
value = value.decode().strip()
return value
class BaseTestCommands:
def execute(self... | <commit_before># Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
from __future__ import unicode_literals
import shlex
import subprocess
import unittest
import frappe
def clean(value):
if isinstance(value, (bytes, str)):
value = value.decode().strip()
return value
class BaseTestCommands:
d... |
fac280a022c8728f14bbe1194cf74af761b7ec3f | vfp2py/__main__.py | vfp2py/__main__.py | import argparse
import vfp2py
def parse_args(argv=None):
parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python')
parser.add_argument("infile", help="file to convert", type=str)
parser.add_argument("outfile", help="file to output to", type=str)
parser.add_argument("sear... | import argparse
import vfp2py
def parse_args(argv=None):
parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python')
parser.add_argument("infile", help="file to convert", type=str)
parser.add_argument("outfile", help="file to output to", type=str)
parser.add_argument("sear... | Fix search paths not being added from arguments. | Fix search paths not being added from arguments.
| Python | mit | mwisslead/vfp2py,mwisslead/vfp2py | import argparse
import vfp2py
def parse_args(argv=None):
parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python')
parser.add_argument("infile", help="file to convert", type=str)
parser.add_argument("outfile", help="file to output to", type=str)
parser.add_argument("sear... | import argparse
import vfp2py
def parse_args(argv=None):
parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python')
parser.add_argument("infile", help="file to convert", type=str)
parser.add_argument("outfile", help="file to output to", type=str)
parser.add_argument("sear... | <commit_before>import argparse
import vfp2py
def parse_args(argv=None):
parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python')
parser.add_argument("infile", help="file to convert", type=str)
parser.add_argument("outfile", help="file to output to", type=str)
parser.add... | import argparse
import vfp2py
def parse_args(argv=None):
parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python')
parser.add_argument("infile", help="file to convert", type=str)
parser.add_argument("outfile", help="file to output to", type=str)
parser.add_argument("sear... | import argparse
import vfp2py
def parse_args(argv=None):
parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python')
parser.add_argument("infile", help="file to convert", type=str)
parser.add_argument("outfile", help="file to output to", type=str)
parser.add_argument("sear... | <commit_before>import argparse
import vfp2py
def parse_args(argv=None):
parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python')
parser.add_argument("infile", help="file to convert", type=str)
parser.add_argument("outfile", help="file to output to", type=str)
parser.add... |
2088b3df274fd31c28baa6193c937046c04b98a6 | scripts/generate_wiki_languages.py | scripts/generate_wiki_languages.py | from urllib2 import urlopen
import csv
import lxml.builder as lb
from lxml import etree
# Returns CSV of all wikipedias, ordered by number of 'good' articles
URL = "https://wikistats.wmflabs.org/api.php?action=dump&table=wikipedias&format=csv&s=good"
data = csv.reader(urlopen(URL))
# Column 2 is the language code
la... | from urllib2 import urlopen
import csv
import json
import lxml.builder as lb
from lxml import etree
# Returns CSV of all wikipedias, ordered by number of 'good' articles
URL = "https://wikistats.wmflabs.org/api.php?action=dump&table=wikipedias&format=csv&s=good"
data = csv.reader(urlopen(URL))
lang_keys = []
lang_lo... | Modify language generation script to make JSON for iOS | Modify language generation script to make JSON for iOS
Change-Id: Ib5aec2f6cfcb5bd1187cf8863ecd50f1b1a2d20c
| Python | apache-2.0 | Wikinaut/wikipedia-app,carloshwa/apps-android-wikipedia,dbrant/apps-android-wikipedia,creaITve/apps-android-tbrc-works,reproio/apps-android-wikipedia,anirudh24seven/apps-android-wikipedia,reproio/apps-android-wikipedia,wikimedia/apps-android-wikipedia,BrunoMRodrigues/apps-android-tbrc-work,BrunoMRodrigues/apps-android-... | from urllib2 import urlopen
import csv
import lxml.builder as lb
from lxml import etree
# Returns CSV of all wikipedias, ordered by number of 'good' articles
URL = "https://wikistats.wmflabs.org/api.php?action=dump&table=wikipedias&format=csv&s=good"
data = csv.reader(urlopen(URL))
# Column 2 is the language code
la... | from urllib2 import urlopen
import csv
import json
import lxml.builder as lb
from lxml import etree
# Returns CSV of all wikipedias, ordered by number of 'good' articles
URL = "https://wikistats.wmflabs.org/api.php?action=dump&table=wikipedias&format=csv&s=good"
data = csv.reader(urlopen(URL))
lang_keys = []
lang_lo... | <commit_before>from urllib2 import urlopen
import csv
import lxml.builder as lb
from lxml import etree
# Returns CSV of all wikipedias, ordered by number of 'good' articles
URL = "https://wikistats.wmflabs.org/api.php?action=dump&table=wikipedias&format=csv&s=good"
data = csv.reader(urlopen(URL))
# Column 2 is the l... | from urllib2 import urlopen
import csv
import json
import lxml.builder as lb
from lxml import etree
# Returns CSV of all wikipedias, ordered by number of 'good' articles
URL = "https://wikistats.wmflabs.org/api.php?action=dump&table=wikipedias&format=csv&s=good"
data = csv.reader(urlopen(URL))
lang_keys = []
lang_lo... | from urllib2 import urlopen
import csv
import lxml.builder as lb
from lxml import etree
# Returns CSV of all wikipedias, ordered by number of 'good' articles
URL = "https://wikistats.wmflabs.org/api.php?action=dump&table=wikipedias&format=csv&s=good"
data = csv.reader(urlopen(URL))
# Column 2 is the language code
la... | <commit_before>from urllib2 import urlopen
import csv
import lxml.builder as lb
from lxml import etree
# Returns CSV of all wikipedias, ordered by number of 'good' articles
URL = "https://wikistats.wmflabs.org/api.php?action=dump&table=wikipedias&format=csv&s=good"
data = csv.reader(urlopen(URL))
# Column 2 is the l... |
914fe4f61b5cae2804d293169d318df499ab8183 | examples/benchmarking/client.py | examples/benchmarking/client.py | import smtplib, time
messages_sent = 0.0
start_time = time.time()
msg = file('examples/benchmarking/benchmark.eml').read()
while True:
if (messages_sent % 10) == 0:
current_time = time.time()
print '%s msg-written/sec' % (messages_sent / (current_time - start_time))
server = smtplib.... | import smtplib, time
messages_sent = 0.0
start_time = time.time()
msg = file('examples/benchmarking/benchmark.eml').read()
while True:
if (messages_sent % 10) == 0:
current_time = time.time()
print '%s msg-written/sec' % (messages_sent / (current_time - start_time))
server = smtplib.... | Switch to non-privledged port to make testing easier | Switch to non-privledged port to make testing easier
| Python | isc | bcoe/secure-smtpd | import smtplib, time
messages_sent = 0.0
start_time = time.time()
msg = file('examples/benchmarking/benchmark.eml').read()
while True:
if (messages_sent % 10) == 0:
current_time = time.time()
print '%s msg-written/sec' % (messages_sent / (current_time - start_time))
server = smtplib.... | import smtplib, time
messages_sent = 0.0
start_time = time.time()
msg = file('examples/benchmarking/benchmark.eml').read()
while True:
if (messages_sent % 10) == 0:
current_time = time.time()
print '%s msg-written/sec' % (messages_sent / (current_time - start_time))
server = smtplib.... | <commit_before>import smtplib, time
messages_sent = 0.0
start_time = time.time()
msg = file('examples/benchmarking/benchmark.eml').read()
while True:
if (messages_sent % 10) == 0:
current_time = time.time()
print '%s msg-written/sec' % (messages_sent / (current_time - start_time))
se... | import smtplib, time
messages_sent = 0.0
start_time = time.time()
msg = file('examples/benchmarking/benchmark.eml').read()
while True:
if (messages_sent % 10) == 0:
current_time = time.time()
print '%s msg-written/sec' % (messages_sent / (current_time - start_time))
server = smtplib.... | import smtplib, time
messages_sent = 0.0
start_time = time.time()
msg = file('examples/benchmarking/benchmark.eml').read()
while True:
if (messages_sent % 10) == 0:
current_time = time.time()
print '%s msg-written/sec' % (messages_sent / (current_time - start_time))
server = smtplib.... | <commit_before>import smtplib, time
messages_sent = 0.0
start_time = time.time()
msg = file('examples/benchmarking/benchmark.eml').read()
while True:
if (messages_sent % 10) == 0:
current_time = time.time()
print '%s msg-written/sec' % (messages_sent / (current_time - start_time))
se... |
f340c674737431c15875007f92de4dbe558ba377 | molo/yourwords/templatetags/competition_tag.py | molo/yourwords/templatetags/competition_tag.py | from django import template
from copy import copy
from molo.yourwords.models import (YourWordsCompetition, ThankYou,
YourWordsCompetitionIndexPage)
register = template.Library()
@register.inclusion_tag(
'yourwords/your_words_competition_tag.html',
takes_context=True
)
def y... | from django import template
from copy import copy
from molo.yourwords.models import (YourWordsCompetition, ThankYou,
YourWordsCompetitionIndexPage)
from molo.core.core_tags import get_pages
register = template.Library()
@register.inclusion_tag(
'yourwords/your_words_competition... | Add support for hiding untranslated content | Add support for hiding untranslated content
| Python | bsd-2-clause | praekelt/molo.yourwords,praekelt/molo.yourwords | from django import template
from copy import copy
from molo.yourwords.models import (YourWordsCompetition, ThankYou,
YourWordsCompetitionIndexPage)
register = template.Library()
@register.inclusion_tag(
'yourwords/your_words_competition_tag.html',
takes_context=True
)
def y... | from django import template
from copy import copy
from molo.yourwords.models import (YourWordsCompetition, ThankYou,
YourWordsCompetitionIndexPage)
from molo.core.core_tags import get_pages
register = template.Library()
@register.inclusion_tag(
'yourwords/your_words_competition... | <commit_before>from django import template
from copy import copy
from molo.yourwords.models import (YourWordsCompetition, ThankYou,
YourWordsCompetitionIndexPage)
register = template.Library()
@register.inclusion_tag(
'yourwords/your_words_competition_tag.html',
takes_conte... | from django import template
from copy import copy
from molo.yourwords.models import (YourWordsCompetition, ThankYou,
YourWordsCompetitionIndexPage)
from molo.core.core_tags import get_pages
register = template.Library()
@register.inclusion_tag(
'yourwords/your_words_competition... | from django import template
from copy import copy
from molo.yourwords.models import (YourWordsCompetition, ThankYou,
YourWordsCompetitionIndexPage)
register = template.Library()
@register.inclusion_tag(
'yourwords/your_words_competition_tag.html',
takes_context=True
)
def y... | <commit_before>from django import template
from copy import copy
from molo.yourwords.models import (YourWordsCompetition, ThankYou,
YourWordsCompetitionIndexPage)
register = template.Library()
@register.inclusion_tag(
'yourwords/your_words_competition_tag.html',
takes_conte... |
abdd6d6e75fb7c6f9cff4b42f6b12a2cfb7a342a | fpsd/test/test_sketchy_sites.py | fpsd/test/test_sketchy_sites.py | #!/usr/bin/env python3.5
# This test crawls some sets that have triggered http.client.RemoteDisconnected
# exceptions
import unittest
from crawler import Crawler
class CrawlBadSitesTest(unittest.TestCase):
bad_sites = ["http://jlve2diknf45qwjv.onion/",
"http://money2mxtcfcauot.onion",
... | #!/usr/bin/env python3.5
# This test crawls some sets that have triggered http.client.RemoteDisconnected
# exceptions
import unittest
from crawler import Crawler
class CrawlBadSitesTest(unittest.TestCase):
bad_sites = ["http://jlve2diknf45qwjv.onion/",
"http://money2mxtcfcauot.onion",
... | Use known-to-trigger-exceptions sites to test crawler restart method | Use known-to-trigger-exceptions sites to test crawler restart method
| Python | agpl-3.0 | freedomofpress/fingerprint-securedrop,freedomofpress/FingerprintSecureDrop,freedomofpress/fingerprint-securedrop,freedomofpress/fingerprint-securedrop,freedomofpress/FingerprintSecureDrop | #!/usr/bin/env python3.5
# This test crawls some sets that have triggered http.client.RemoteDisconnected
# exceptions
import unittest
from crawler import Crawler
class CrawlBadSitesTest(unittest.TestCase):
bad_sites = ["http://jlve2diknf45qwjv.onion/",
"http://money2mxtcfcauot.onion",
... | #!/usr/bin/env python3.5
# This test crawls some sets that have triggered http.client.RemoteDisconnected
# exceptions
import unittest
from crawler import Crawler
class CrawlBadSitesTest(unittest.TestCase):
bad_sites = ["http://jlve2diknf45qwjv.onion/",
"http://money2mxtcfcauot.onion",
... | <commit_before>#!/usr/bin/env python3.5
# This test crawls some sets that have triggered http.client.RemoteDisconnected
# exceptions
import unittest
from crawler import Crawler
class CrawlBadSitesTest(unittest.TestCase):
bad_sites = ["http://jlve2diknf45qwjv.onion/",
"http://money2mxtcfcauot.on... | #!/usr/bin/env python3.5
# This test crawls some sets that have triggered http.client.RemoteDisconnected
# exceptions
import unittest
from crawler import Crawler
class CrawlBadSitesTest(unittest.TestCase):
bad_sites = ["http://jlve2diknf45qwjv.onion/",
"http://money2mxtcfcauot.onion",
... | #!/usr/bin/env python3.5
# This test crawls some sets that have triggered http.client.RemoteDisconnected
# exceptions
import unittest
from crawler import Crawler
class CrawlBadSitesTest(unittest.TestCase):
bad_sites = ["http://jlve2diknf45qwjv.onion/",
"http://money2mxtcfcauot.onion",
... | <commit_before>#!/usr/bin/env python3.5
# This test crawls some sets that have triggered http.client.RemoteDisconnected
# exceptions
import unittest
from crawler import Crawler
class CrawlBadSitesTest(unittest.TestCase):
bad_sites = ["http://jlve2diknf45qwjv.onion/",
"http://money2mxtcfcauot.on... |
053147c19acbf467bb0e044f2fb58304b759b72d | frameworks/Python/pyramid/create_database.py | frameworks/Python/pyramid/create_database.py | import codecs
from frameworkbenchmarks.models import DBSession
if __name__ == "__main__":
"""
Initialize database
"""
with codecs.open('../config/create-postgres.sql', 'r', encoding='utf-8') as fp:
sql = fp.read()
DBSession.execute(sql)
DBSession.commit()
| import codecs
from frameworkbenchmarks.models import DBSession
if __name__ == "__main__":
"""
Initialize database
"""
with codecs.open('../../../config/create-postgres.sql',
'r',
encoding='utf-8') as fp:
sql = fp.read()
DBSession.execute(sql)
DB... | Fix the path to create-postgres.sql | Fix the path to create-postgres.sql
| Python | bsd-3-clause | k-r-g/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,sxend/FrameworkBenchmarks,doom369/FrameworkBenchmarks,herloct/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,actframework/FrameworkBenchm... | import codecs
from frameworkbenchmarks.models import DBSession
if __name__ == "__main__":
"""
Initialize database
"""
with codecs.open('../config/create-postgres.sql', 'r', encoding='utf-8') as fp:
sql = fp.read()
DBSession.execute(sql)
DBSession.commit()
Fix the path to create-postgr... | import codecs
from frameworkbenchmarks.models import DBSession
if __name__ == "__main__":
"""
Initialize database
"""
with codecs.open('../../../config/create-postgres.sql',
'r',
encoding='utf-8') as fp:
sql = fp.read()
DBSession.execute(sql)
DB... | <commit_before>import codecs
from frameworkbenchmarks.models import DBSession
if __name__ == "__main__":
"""
Initialize database
"""
with codecs.open('../config/create-postgres.sql', 'r', encoding='utf-8') as fp:
sql = fp.read()
DBSession.execute(sql)
DBSession.commit()
<commit_msg>Fi... | import codecs
from frameworkbenchmarks.models import DBSession
if __name__ == "__main__":
"""
Initialize database
"""
with codecs.open('../../../config/create-postgres.sql',
'r',
encoding='utf-8') as fp:
sql = fp.read()
DBSession.execute(sql)
DB... | import codecs
from frameworkbenchmarks.models import DBSession
if __name__ == "__main__":
"""
Initialize database
"""
with codecs.open('../config/create-postgres.sql', 'r', encoding='utf-8') as fp:
sql = fp.read()
DBSession.execute(sql)
DBSession.commit()
Fix the path to create-postgr... | <commit_before>import codecs
from frameworkbenchmarks.models import DBSession
if __name__ == "__main__":
"""
Initialize database
"""
with codecs.open('../config/create-postgres.sql', 'r', encoding='utf-8') as fp:
sql = fp.read()
DBSession.execute(sql)
DBSession.commit()
<commit_msg>Fi... |
310553e1282231c35093ff355c61129e9f073a0a | src/lib/verify_email_google.py | src/lib/verify_email_google.py | import DNS
from validate_email import validate_email
from DNS.Lib import PackError
def is_google_apps_email(email):
hostname = email[email.find('@')+1:]
try:
mx_hosts = DNS.mxlookup(hostname)
except DNS.ServerError as e:
return False
except PackError as e:
return False
for mx in mx_hosts:
... | import DNS
import re
from validate_email import validate_email
from DNS.Lib import PackError
EMAIL_RE = re.compile('^[a-zA-Z0-9\.\@]+$')
def is_valid_email(email):
if email.count('@') != 1:
return False
return bool(EMAIL_RE.match(email))
def is_google_apps_email(email):
if not is_valid_email(email):
r... | Add Google Apps email address validation | Add Google Apps email address validation
| Python | agpl-3.0 | juposocial/jupo,juposocial/jupo,juposocial/jupo,juposocial/jupo | import DNS
from validate_email import validate_email
from DNS.Lib import PackError
def is_google_apps_email(email):
hostname = email[email.find('@')+1:]
try:
mx_hosts = DNS.mxlookup(hostname)
except DNS.ServerError as e:
return False
except PackError as e:
return False
for mx in mx_hosts:
... | import DNS
import re
from validate_email import validate_email
from DNS.Lib import PackError
EMAIL_RE = re.compile('^[a-zA-Z0-9\.\@]+$')
def is_valid_email(email):
if email.count('@') != 1:
return False
return bool(EMAIL_RE.match(email))
def is_google_apps_email(email):
if not is_valid_email(email):
r... | <commit_before>import DNS
from validate_email import validate_email
from DNS.Lib import PackError
def is_google_apps_email(email):
hostname = email[email.find('@')+1:]
try:
mx_hosts = DNS.mxlookup(hostname)
except DNS.ServerError as e:
return False
except PackError as e:
return False
for m... | import DNS
import re
from validate_email import validate_email
from DNS.Lib import PackError
EMAIL_RE = re.compile('^[a-zA-Z0-9\.\@]+$')
def is_valid_email(email):
if email.count('@') != 1:
return False
return bool(EMAIL_RE.match(email))
def is_google_apps_email(email):
if not is_valid_email(email):
r... | import DNS
from validate_email import validate_email
from DNS.Lib import PackError
def is_google_apps_email(email):
hostname = email[email.find('@')+1:]
try:
mx_hosts = DNS.mxlookup(hostname)
except DNS.ServerError as e:
return False
except PackError as e:
return False
for mx in mx_hosts:
... | <commit_before>import DNS
from validate_email import validate_email
from DNS.Lib import PackError
def is_google_apps_email(email):
hostname = email[email.find('@')+1:]
try:
mx_hosts = DNS.mxlookup(hostname)
except DNS.ServerError as e:
return False
except PackError as e:
return False
for m... |
0dc1412ad6e7cbe47eda1e476ce16603b7f6a030 | raspigibbon_bringup/scripts/raspigibbon_joint_subscriber.py | raspigibbon_bringup/scripts/raspigibbon_joint_subscriber.py | #!/usr/bin/env python
# coding: utf-8
from futaba_serial_servo import RS30X
import rospy
from sensor_msgs.msg import JointState
class Slave:
def __init__(self):
self.rs = RS30X.RS304MD()
self.sub = rospy.Subscriber("/raspigibbon/master_joint_state", JointState, self.joint_callback, queue_size=10)
... | #!/usr/bin/env python
# coding: utf-8
from futaba_serial_servo import RS30X
import rospy
from sensor_msgs.msg import JointState
class Slave:
def __init__(self):
self.rs = RS30X.RS304MD()
self.sub = rospy.Subscriber("/raspigibbon/master_joint_state", JointState, self.joint_callback, queue_size=10)
... | Add shutdown scripts to turn_off servo after subscribing | Add shutdown scripts to turn_off servo after subscribing
| Python | mit | raspberrypigibbon/raspigibbon_ros | #!/usr/bin/env python
# coding: utf-8
from futaba_serial_servo import RS30X
import rospy
from sensor_msgs.msg import JointState
class Slave:
def __init__(self):
self.rs = RS30X.RS304MD()
self.sub = rospy.Subscriber("/raspigibbon/master_joint_state", JointState, self.joint_callback, queue_size=10)
... | #!/usr/bin/env python
# coding: utf-8
from futaba_serial_servo import RS30X
import rospy
from sensor_msgs.msg import JointState
class Slave:
def __init__(self):
self.rs = RS30X.RS304MD()
self.sub = rospy.Subscriber("/raspigibbon/master_joint_state", JointState, self.joint_callback, queue_size=10)
... | <commit_before>#!/usr/bin/env python
# coding: utf-8
from futaba_serial_servo import RS30X
import rospy
from sensor_msgs.msg import JointState
class Slave:
def __init__(self):
self.rs = RS30X.RS304MD()
self.sub = rospy.Subscriber("/raspigibbon/master_joint_state", JointState, self.joint_callback, ... | #!/usr/bin/env python
# coding: utf-8
from futaba_serial_servo import RS30X
import rospy
from sensor_msgs.msg import JointState
class Slave:
def __init__(self):
self.rs = RS30X.RS304MD()
self.sub = rospy.Subscriber("/raspigibbon/master_joint_state", JointState, self.joint_callback, queue_size=10)
... | #!/usr/bin/env python
# coding: utf-8
from futaba_serial_servo import RS30X
import rospy
from sensor_msgs.msg import JointState
class Slave:
def __init__(self):
self.rs = RS30X.RS304MD()
self.sub = rospy.Subscriber("/raspigibbon/master_joint_state", JointState, self.joint_callback, queue_size=10)
... | <commit_before>#!/usr/bin/env python
# coding: utf-8
from futaba_serial_servo import RS30X
import rospy
from sensor_msgs.msg import JointState
class Slave:
def __init__(self):
self.rs = RS30X.RS304MD()
self.sub = rospy.Subscriber("/raspigibbon/master_joint_state", JointState, self.joint_callback, ... |
cf58ebf492cd0dfaf640d2fd8d3cf4e5b2706424 | alembic/versions/47dd43c1491_create_category_tabl.py | alembic/versions/47dd43c1491_create_category_tabl.py | """create category table
Revision ID: 47dd43c1491
Revises: 27bf0aefa49d
Create Date: 2013-05-21 10:41:43.548449
"""
# revision identifiers, used by Alembic.
revision = '47dd43c1491'
down_revision = '27bf0aefa49d'
from alembic import op
import sqlalchemy as sa
import datetime
def make_timestamp():
now = dateti... | """create category table
Revision ID: 47dd43c1491
Revises: 27bf0aefa49d
Create Date: 2013-05-21 10:41:43.548449
"""
# revision identifiers, used by Alembic.
revision = '47dd43c1491'
down_revision = '27bf0aefa49d'
from alembic import op
import sqlalchemy as sa
import datetime
def make_timestamp():
now = dateti... | Add description to the table and populate it with two categories | Add description to the table and populate it with two categories
| Python | agpl-3.0 | geotagx/geotagx-pybossa-archive,OpenNewsLabs/pybossa,PyBossa/pybossa,proyectos-analizo-info/pybossa-analizo-info,Scifabric/pybossa,CulturePlex/pybossa,geotagx/pybossa,proyectos-analizo-info/pybossa-analizo-info,CulturePlex/pybossa,OpenNewsLabs/pybossa,geotagx/geotagx-pybossa-archive,harihpr/tweetclickers,geotagx/geotag... | """create category table
Revision ID: 47dd43c1491
Revises: 27bf0aefa49d
Create Date: 2013-05-21 10:41:43.548449
"""
# revision identifiers, used by Alembic.
revision = '47dd43c1491'
down_revision = '27bf0aefa49d'
from alembic import op
import sqlalchemy as sa
import datetime
def make_timestamp():
now = dateti... | """create category table
Revision ID: 47dd43c1491
Revises: 27bf0aefa49d
Create Date: 2013-05-21 10:41:43.548449
"""
# revision identifiers, used by Alembic.
revision = '47dd43c1491'
down_revision = '27bf0aefa49d'
from alembic import op
import sqlalchemy as sa
import datetime
def make_timestamp():
now = dateti... | <commit_before>"""create category table
Revision ID: 47dd43c1491
Revises: 27bf0aefa49d
Create Date: 2013-05-21 10:41:43.548449
"""
# revision identifiers, used by Alembic.
revision = '47dd43c1491'
down_revision = '27bf0aefa49d'
from alembic import op
import sqlalchemy as sa
import datetime
def make_timestamp():
... | """create category table
Revision ID: 47dd43c1491
Revises: 27bf0aefa49d
Create Date: 2013-05-21 10:41:43.548449
"""
# revision identifiers, used by Alembic.
revision = '47dd43c1491'
down_revision = '27bf0aefa49d'
from alembic import op
import sqlalchemy as sa
import datetime
def make_timestamp():
now = dateti... | """create category table
Revision ID: 47dd43c1491
Revises: 27bf0aefa49d
Create Date: 2013-05-21 10:41:43.548449
"""
# revision identifiers, used by Alembic.
revision = '47dd43c1491'
down_revision = '27bf0aefa49d'
from alembic import op
import sqlalchemy as sa
import datetime
def make_timestamp():
now = dateti... | <commit_before>"""create category table
Revision ID: 47dd43c1491
Revises: 27bf0aefa49d
Create Date: 2013-05-21 10:41:43.548449
"""
# revision identifiers, used by Alembic.
revision = '47dd43c1491'
down_revision = '27bf0aefa49d'
from alembic import op
import sqlalchemy as sa
import datetime
def make_timestamp():
... |
8b7ab303340ba65aa219103c568ce9d88ea39689 | airmozilla/main/context_processors.py | airmozilla/main/context_processors.py | from django.conf import settings
from airmozilla.main.models import Event
def sidebar(request):
featured = Event.objects.approved().filter(public=True, featured=True)
upcoming = Event.objects.upcoming().order_by('start_time')
if not request.user.is_active:
featured = featured.filter(public=True)
... | from django.conf import settings
from airmozilla.main.models import Event
def sidebar(request):
featured = Event.objects.approved().filter(featured=True)
upcoming = Event.objects.upcoming().order_by('start_time')
if not request.user.is_active:
featured = featured.filter(public=True)
upcom... | Fix context processor to correctly display internal featured videos. | Fix context processor to correctly display internal featured videos.
| Python | bsd-3-clause | EricSekyere/airmozilla,lcamacho/airmozilla,kenrick95/airmozilla,tannishk/airmozilla,tannishk/airmozilla,a-buck/airmozilla,bugzPDX/airmozilla,ehsan/airmozilla,mythmon/airmozilla,Nolski/airmozilla,blossomica/airmozilla,EricSekyere/airmozilla,blossomica/airmozilla,zofuthan/airmozilla,bugzPDX/airmozilla,EricSekyere/airmozi... | from django.conf import settings
from airmozilla.main.models import Event
def sidebar(request):
featured = Event.objects.approved().filter(public=True, featured=True)
upcoming = Event.objects.upcoming().order_by('start_time')
if not request.user.is_active:
featured = featured.filter(public=True)
... | from django.conf import settings
from airmozilla.main.models import Event
def sidebar(request):
featured = Event.objects.approved().filter(featured=True)
upcoming = Event.objects.upcoming().order_by('start_time')
if not request.user.is_active:
featured = featured.filter(public=True)
upcom... | <commit_before>from django.conf import settings
from airmozilla.main.models import Event
def sidebar(request):
featured = Event.objects.approved().filter(public=True, featured=True)
upcoming = Event.objects.upcoming().order_by('start_time')
if not request.user.is_active:
featured = featured.filte... | from django.conf import settings
from airmozilla.main.models import Event
def sidebar(request):
featured = Event.objects.approved().filter(featured=True)
upcoming = Event.objects.upcoming().order_by('start_time')
if not request.user.is_active:
featured = featured.filter(public=True)
upcom... | from django.conf import settings
from airmozilla.main.models import Event
def sidebar(request):
featured = Event.objects.approved().filter(public=True, featured=True)
upcoming = Event.objects.upcoming().order_by('start_time')
if not request.user.is_active:
featured = featured.filter(public=True)
... | <commit_before>from django.conf import settings
from airmozilla.main.models import Event
def sidebar(request):
featured = Event.objects.approved().filter(public=True, featured=True)
upcoming = Event.objects.upcoming().order_by('start_time')
if not request.user.is_active:
featured = featured.filte... |
ee55ce9cc95e0e058cac77f45fac0f899398061e | api/preprint_providers/serializers.py | api/preprint_providers/serializers.py | from rest_framework import serializers as ser
from api.base.utils import absolute_reverse
from api.base.serializers import JSONAPISerializer, LinksField
class PreprintProviderSerializer(JSONAPISerializer):
filterable_fields = frozenset([
'name',
'description',
'id'
])
name = ser... | from rest_framework import serializers as ser
from api.base.utils import absolute_reverse
from api.base.serializers import JSONAPISerializer, LinksField
class PreprintProviderSerializer(JSONAPISerializer):
filterable_fields = frozenset([
'name',
'description',
'id'
])
name = ser... | Add external url to preprint provider serializer | Add external url to preprint provider serializer
| Python | apache-2.0 | chrisseto/osf.io,adlius/osf.io,samchrisinger/osf.io,laurenrevere/osf.io,cslzchen/osf.io,mluo613/osf.io,binoculars/osf.io,adlius/osf.io,monikagrabowska/osf.io,cslzchen/osf.io,felliott/osf.io,CenterForOpenScience/osf.io,caneruguz/osf.io,binoculars/osf.io,Nesiehr/osf.io,alexschiller/osf.io,cwisecarver/osf.io,HalcyonChimer... | from rest_framework import serializers as ser
from api.base.utils import absolute_reverse
from api.base.serializers import JSONAPISerializer, LinksField
class PreprintProviderSerializer(JSONAPISerializer):
filterable_fields = frozenset([
'name',
'description',
'id'
])
name = ser... | from rest_framework import serializers as ser
from api.base.utils import absolute_reverse
from api.base.serializers import JSONAPISerializer, LinksField
class PreprintProviderSerializer(JSONAPISerializer):
filterable_fields = frozenset([
'name',
'description',
'id'
])
name = ser... | <commit_before>from rest_framework import serializers as ser
from api.base.utils import absolute_reverse
from api.base.serializers import JSONAPISerializer, LinksField
class PreprintProviderSerializer(JSONAPISerializer):
filterable_fields = frozenset([
'name',
'description',
'id'
])
... | from rest_framework import serializers as ser
from api.base.utils import absolute_reverse
from api.base.serializers import JSONAPISerializer, LinksField
class PreprintProviderSerializer(JSONAPISerializer):
filterable_fields = frozenset([
'name',
'description',
'id'
])
name = ser... | from rest_framework import serializers as ser
from api.base.utils import absolute_reverse
from api.base.serializers import JSONAPISerializer, LinksField
class PreprintProviderSerializer(JSONAPISerializer):
filterable_fields = frozenset([
'name',
'description',
'id'
])
name = ser... | <commit_before>from rest_framework import serializers as ser
from api.base.utils import absolute_reverse
from api.base.serializers import JSONAPISerializer, LinksField
class PreprintProviderSerializer(JSONAPISerializer):
filterable_fields = frozenset([
'name',
'description',
'id'
])
... |
ac44332d53736f1ac3e067eecf1064bcef038b3a | core/platform/transactions/django_transaction_services.py | core/platform/transactions/django_transaction_services.py | # coding: utf-8
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | # coding: utf-8
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | Add transaction support for django models. | Add transaction support for django models.
| Python | apache-2.0 | oulan/oppia,directorlive/oppia,google-code-export/oppia,oulan/oppia,michaelWagner/oppia,edallison/oppia,terrameijar/oppia,Dev4X/oppia,amitdeutsch/oppia,zgchizi/oppia-uc,virajprabhu/oppia,won0089/oppia,sunu/oppia,mit0110/oppia,sanyaade-teachings/oppia,kennho/oppia,BenHenning/oppia,CMDann/oppia,whygee/oppia,gale320/oppia... | # coding: utf-8
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | # coding: utf-8
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | <commit_before># coding: utf-8
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... | # coding: utf-8
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | # coding: utf-8
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | <commit_before># coding: utf-8
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... |
e5bd4884fc7ea4389315d0d2b8ff248bbda9a905 | custom/enikshay/integrations/utils.py | custom/enikshay/integrations/utils.py | from corehq.apps.locations.models import SQLLocation
from dimagi.utils.logging import notify_exception
def is_submission_from_test_location(person_case):
try:
phi_location = SQLLocation.objects.get(location_id=person_case.owner_id)
except SQLLocation.DoesNotExist:
message = ("Location with id ... | from corehq.apps.locations.models import SQLLocation
from custom.enikshay.exceptions import NikshayLocationNotFound
def is_submission_from_test_location(person_case):
try:
phi_location = SQLLocation.objects.get(location_id=person_case.owner_id)
except SQLLocation.DoesNotExist:
raise NikshayLoc... | Revert "Fallback is test location" | Revert "Fallback is test location"
This reverts commit 2ba9865fa0f05e9ae244b2513e046c961540fca1.
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | from corehq.apps.locations.models import SQLLocation
from dimagi.utils.logging import notify_exception
def is_submission_from_test_location(person_case):
try:
phi_location = SQLLocation.objects.get(location_id=person_case.owner_id)
except SQLLocation.DoesNotExist:
message = ("Location with id ... | from corehq.apps.locations.models import SQLLocation
from custom.enikshay.exceptions import NikshayLocationNotFound
def is_submission_from_test_location(person_case):
try:
phi_location = SQLLocation.objects.get(location_id=person_case.owner_id)
except SQLLocation.DoesNotExist:
raise NikshayLoc... | <commit_before>from corehq.apps.locations.models import SQLLocation
from dimagi.utils.logging import notify_exception
def is_submission_from_test_location(person_case):
try:
phi_location = SQLLocation.objects.get(location_id=person_case.owner_id)
except SQLLocation.DoesNotExist:
message = ("Lo... | from corehq.apps.locations.models import SQLLocation
from custom.enikshay.exceptions import NikshayLocationNotFound
def is_submission_from_test_location(person_case):
try:
phi_location = SQLLocation.objects.get(location_id=person_case.owner_id)
except SQLLocation.DoesNotExist:
raise NikshayLoc... | from corehq.apps.locations.models import SQLLocation
from dimagi.utils.logging import notify_exception
def is_submission_from_test_location(person_case):
try:
phi_location = SQLLocation.objects.get(location_id=person_case.owner_id)
except SQLLocation.DoesNotExist:
message = ("Location with id ... | <commit_before>from corehq.apps.locations.models import SQLLocation
from dimagi.utils.logging import notify_exception
def is_submission_from_test_location(person_case):
try:
phi_location = SQLLocation.objects.get(location_id=person_case.owner_id)
except SQLLocation.DoesNotExist:
message = ("Lo... |
78136c619ebafb54e4bd65af3cfd85a8ff67766b | osfclient/tests/test_cloning.py | osfclient/tests/test_cloning.py | """Test `osf clone` command."""
import os
from mock import patch, mock_open, call
from osfclient import OSF
from osfclient.cli import clone
from osfclient.tests.mocks import MockProject
from osfclient.tests.mocks import MockArgs
@patch.object(OSF, 'project', return_value=MockProject('1234'))
def test_clone_projec... | """Test `osf clone` command."""
import os
from mock import patch, mock_open, call
from osfclient import OSF
from osfclient.cli import clone
from osfclient.tests.mocks import MockProject
from osfclient.tests.mocks import MockArgs
@patch.object(OSF, 'project', return_value=MockProject('1234'))
def test_clone_projec... | Fix osf clone test that was asking for a password | Fix osf clone test that was asking for a password
| Python | bsd-3-clause | betatim/osf-cli,betatim/osf-cli | """Test `osf clone` command."""
import os
from mock import patch, mock_open, call
from osfclient import OSF
from osfclient.cli import clone
from osfclient.tests.mocks import MockProject
from osfclient.tests.mocks import MockArgs
@patch.object(OSF, 'project', return_value=MockProject('1234'))
def test_clone_projec... | """Test `osf clone` command."""
import os
from mock import patch, mock_open, call
from osfclient import OSF
from osfclient.cli import clone
from osfclient.tests.mocks import MockProject
from osfclient.tests.mocks import MockArgs
@patch.object(OSF, 'project', return_value=MockProject('1234'))
def test_clone_projec... | <commit_before>"""Test `osf clone` command."""
import os
from mock import patch, mock_open, call
from osfclient import OSF
from osfclient.cli import clone
from osfclient.tests.mocks import MockProject
from osfclient.tests.mocks import MockArgs
@patch.object(OSF, 'project', return_value=MockProject('1234'))
def te... | """Test `osf clone` command."""
import os
from mock import patch, mock_open, call
from osfclient import OSF
from osfclient.cli import clone
from osfclient.tests.mocks import MockProject
from osfclient.tests.mocks import MockArgs
@patch.object(OSF, 'project', return_value=MockProject('1234'))
def test_clone_projec... | """Test `osf clone` command."""
import os
from mock import patch, mock_open, call
from osfclient import OSF
from osfclient.cli import clone
from osfclient.tests.mocks import MockProject
from osfclient.tests.mocks import MockArgs
@patch.object(OSF, 'project', return_value=MockProject('1234'))
def test_clone_projec... | <commit_before>"""Test `osf clone` command."""
import os
from mock import patch, mock_open, call
from osfclient import OSF
from osfclient.cli import clone
from osfclient.tests.mocks import MockProject
from osfclient.tests.mocks import MockArgs
@patch.object(OSF, 'project', return_value=MockProject('1234'))
def te... |
f17baf70d08f47dc4ebb8e0142ce0a3566aa1e9a | tests/window/WINDOW_CAPTION.py | tests/window/WINDOW_CAPTION.py | #!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window to finished the ... | #!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window to finished the ... | Make windows bigger in this test so the captions can be read. | Make windows bigger in this test so the captions can be read.
Index: tests/window/WINDOW_CAPTION.py
===================================================================
--- tests/window/WINDOW_CAPTION.py (revision 777)
+++ tests/window/WINDOW_CAPTION.py (working copy)
@@ -19,8 +19,8 @@
class WINDOW_CAPTION(unittest... | Python | bsd-3-clause | regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations,regular/pyglet-avbin-optimizations | #!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window to finished the ... | #!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window to finished the ... | <commit_before>#!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window t... | #!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window to finished the ... | #!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window to finished the ... | <commit_before>#!/usr/bin/env python
'''Test that the window caption can be set.
Expected behaviour:
Two windows will be opened, one with the caption "Window caption 1"
counting up every second; the other with a Unicode string including
some non-ASCII characters.
Press escape or close either window t... |
eca659b789cc80c7d99bc38e551def972af11607 | cs251tk/student/markdownify/check_submit_date.py | cs251tk/student/markdownify/check_submit_date.py | import os
from dateutil.parser import parse
from ...common import run, chdir
def check_dates(spec_id, username, spec, basedir):
""" Port of the CheckDates program from C++
Finds the first submission date for an assignment
by comparing first commits for all files in the spec
and re... | import os
from dateutil.parser import parse
from ...common import run, chdir
def check_dates(spec_id, username, spec, basedir):
""" Port of the CheckDates program from C++
Finds the first submission date for an assignment
by comparing first commits for all files in the spec
and re... | Add check for unsuccessful date checks | Add check for unsuccessful date checks
| Python | mit | StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit,StoDevX/cs251-toolkit | import os
from dateutil.parser import parse
from ...common import run, chdir
def check_dates(spec_id, username, spec, basedir):
""" Port of the CheckDates program from C++
Finds the first submission date for an assignment
by comparing first commits for all files in the spec
and re... | import os
from dateutil.parser import parse
from ...common import run, chdir
def check_dates(spec_id, username, spec, basedir):
""" Port of the CheckDates program from C++
Finds the first submission date for an assignment
by comparing first commits for all files in the spec
and re... | <commit_before>import os
from dateutil.parser import parse
from ...common import run, chdir
def check_dates(spec_id, username, spec, basedir):
""" Port of the CheckDates program from C++
Finds the first submission date for an assignment
by comparing first commits for all files in the spec
... | import os
from dateutil.parser import parse
from ...common import run, chdir
def check_dates(spec_id, username, spec, basedir):
""" Port of the CheckDates program from C++
Finds the first submission date for an assignment
by comparing first commits for all files in the spec
and re... | import os
from dateutil.parser import parse
from ...common import run, chdir
def check_dates(spec_id, username, spec, basedir):
""" Port of the CheckDates program from C++
Finds the first submission date for an assignment
by comparing first commits for all files in the spec
and re... | <commit_before>import os
from dateutil.parser import parse
from ...common import run, chdir
def check_dates(spec_id, username, spec, basedir):
""" Port of the CheckDates program from C++
Finds the first submission date for an assignment
by comparing first commits for all files in the spec
... |
9c7ff0d98d324e3a52664f9dcd6fe64334778e00 | web/dbconfig/dbconfigbock7k.py | web/dbconfig/dbconfigbock7k.py | #
# Configuration for the will database
#
import dbconfig
class dbConfigBock7k ( dbconfig.dbConfig ):
# cubedim is a dictionary so it can vary
# size of the cube at resolution
cubedim = { 0: [128, 128, 16] }
#information about the image stack
slicerange = [0,61]
tilesz = [ 256,256 ]
#resolution inf... | #
# Configuration for the will database
#
import dbconfig
class dbConfigBock7k ( dbconfig.dbConfig ):
# cubedim is a dictionary so it can vary
# size of the cube at resolution
cubedim = { 0: [128, 128, 16],
1: [128, 128, 16],
2: [128, 128, 16],
3: [128, 128, 16] }... | Expand bock7k to be a multi-resolution project. | Expand bock7k to be a multi-resolution project.
| Python | apache-2.0 | neurodata/ndstore,openconnectome/open-connectome,openconnectome/open-connectome,neurodata/ndstore,neurodata/ndstore,openconnectome/open-connectome,openconnectome/open-connectome,neurodata/ndstore,openconnectome/open-connectome,openconnectome/open-connectome | #
# Configuration for the will database
#
import dbconfig
class dbConfigBock7k ( dbconfig.dbConfig ):
# cubedim is a dictionary so it can vary
# size of the cube at resolution
cubedim = { 0: [128, 128, 16] }
#information about the image stack
slicerange = [0,61]
tilesz = [ 256,256 ]
#resolution inf... | #
# Configuration for the will database
#
import dbconfig
class dbConfigBock7k ( dbconfig.dbConfig ):
# cubedim is a dictionary so it can vary
# size of the cube at resolution
cubedim = { 0: [128, 128, 16],
1: [128, 128, 16],
2: [128, 128, 16],
3: [128, 128, 16] }... | <commit_before>#
# Configuration for the will database
#
import dbconfig
class dbConfigBock7k ( dbconfig.dbConfig ):
# cubedim is a dictionary so it can vary
# size of the cube at resolution
cubedim = { 0: [128, 128, 16] }
#information about the image stack
slicerange = [0,61]
tilesz = [ 256,256 ]
... | #
# Configuration for the will database
#
import dbconfig
class dbConfigBock7k ( dbconfig.dbConfig ):
# cubedim is a dictionary so it can vary
# size of the cube at resolution
cubedim = { 0: [128, 128, 16],
1: [128, 128, 16],
2: [128, 128, 16],
3: [128, 128, 16] }... | #
# Configuration for the will database
#
import dbconfig
class dbConfigBock7k ( dbconfig.dbConfig ):
# cubedim is a dictionary so it can vary
# size of the cube at resolution
cubedim = { 0: [128, 128, 16] }
#information about the image stack
slicerange = [0,61]
tilesz = [ 256,256 ]
#resolution inf... | <commit_before>#
# Configuration for the will database
#
import dbconfig
class dbConfigBock7k ( dbconfig.dbConfig ):
# cubedim is a dictionary so it can vary
# size of the cube at resolution
cubedim = { 0: [128, 128, 16] }
#information about the image stack
slicerange = [0,61]
tilesz = [ 256,256 ]
... |
d82111c5415176ea07674723151f14445e4b52ab | fire_rs/firemodel/test_propagation.py | fire_rs/firemodel/test_propagation.py | import unittest
import fire_rs.firemodel.propagation as propagation
class TestPropagation(unittest.TestCase):
def test_propagate(self):
env = propagation.Environment([[475060.0, 477060.0], [6200074.0, 6202074.0]], wind_speed=4.11, wind_dir=0)
prop = propagation.propagate(env, 10, 20)
# pr... | import unittest
import fire_rs.firemodel.propagation as propagation
class TestPropagation(unittest.TestCase):
def test_propagate(self):
env = propagation.Environment([[480060.0, 490060.0], [6210074.0, 6220074.0]], wind_speed=4.11, wind_dir=0)
prop = propagation.propagate(env, 10, 20, horizon=3*36... | Set test area to a burnable one. | [fire-models] Set test area to a burnable one.
| Python | bsd-2-clause | fire-rs-laas/fire-rs-saop,fire-rs-laas/fire-rs-saop,fire-rs-laas/fire-rs-saop,fire-rs-laas/fire-rs-saop | import unittest
import fire_rs.firemodel.propagation as propagation
class TestPropagation(unittest.TestCase):
def test_propagate(self):
env = propagation.Environment([[475060.0, 477060.0], [6200074.0, 6202074.0]], wind_speed=4.11, wind_dir=0)
prop = propagation.propagate(env, 10, 20)
# pr... | import unittest
import fire_rs.firemodel.propagation as propagation
class TestPropagation(unittest.TestCase):
def test_propagate(self):
env = propagation.Environment([[480060.0, 490060.0], [6210074.0, 6220074.0]], wind_speed=4.11, wind_dir=0)
prop = propagation.propagate(env, 10, 20, horizon=3*36... | <commit_before>import unittest
import fire_rs.firemodel.propagation as propagation
class TestPropagation(unittest.TestCase):
def test_propagate(self):
env = propagation.Environment([[475060.0, 477060.0], [6200074.0, 6202074.0]], wind_speed=4.11, wind_dir=0)
prop = propagation.propagate(env, 10, 2... | import unittest
import fire_rs.firemodel.propagation as propagation
class TestPropagation(unittest.TestCase):
def test_propagate(self):
env = propagation.Environment([[480060.0, 490060.0], [6210074.0, 6220074.0]], wind_speed=4.11, wind_dir=0)
prop = propagation.propagate(env, 10, 20, horizon=3*36... | import unittest
import fire_rs.firemodel.propagation as propagation
class TestPropagation(unittest.TestCase):
def test_propagate(self):
env = propagation.Environment([[475060.0, 477060.0], [6200074.0, 6202074.0]], wind_speed=4.11, wind_dir=0)
prop = propagation.propagate(env, 10, 20)
# pr... | <commit_before>import unittest
import fire_rs.firemodel.propagation as propagation
class TestPropagation(unittest.TestCase):
def test_propagate(self):
env = propagation.Environment([[475060.0, 477060.0], [6200074.0, 6202074.0]], wind_speed=4.11, wind_dir=0)
prop = propagation.propagate(env, 10, 2... |
d919c1e29645a52e795e85686de6de8f1e57196e | glue/plugins/ginga_viewer/__init__.py | glue/plugins/ginga_viewer/__init__.py | try:
from .client import *
from .qt_widget import *
except ImportError:
import warnings
warnings.warn("Could not import ginga plugin, since ginga is required")
# Register qt client
from ...config import qt_client
qt_client.add(GingaWidget)
| try:
from .client import *
from .qt_widget import *
except ImportError:
import warnings
warnings.warn("Could not import ginga plugin, since ginga is required")
else:
# Register qt client
from ...config import qt_client
qt_client.add(GingaWidget)
| Fix if ginga is not installed | Fix if ginga is not installed | Python | bsd-3-clause | JudoWill/glue,stscieisenhamer/glue,saimn/glue,JudoWill/glue,saimn/glue,stscieisenhamer/glue | try:
from .client import *
from .qt_widget import *
except ImportError:
import warnings
warnings.warn("Could not import ginga plugin, since ginga is required")
# Register qt client
from ...config import qt_client
qt_client.add(GingaWidget)
Fix if ginga is not installed | try:
from .client import *
from .qt_widget import *
except ImportError:
import warnings
warnings.warn("Could not import ginga plugin, since ginga is required")
else:
# Register qt client
from ...config import qt_client
qt_client.add(GingaWidget)
| <commit_before>try:
from .client import *
from .qt_widget import *
except ImportError:
import warnings
warnings.warn("Could not import ginga plugin, since ginga is required")
# Register qt client
from ...config import qt_client
qt_client.add(GingaWidget)
<commit_msg>Fix if ginga is not installed<commit... | try:
from .client import *
from .qt_widget import *
except ImportError:
import warnings
warnings.warn("Could not import ginga plugin, since ginga is required")
else:
# Register qt client
from ...config import qt_client
qt_client.add(GingaWidget)
| try:
from .client import *
from .qt_widget import *
except ImportError:
import warnings
warnings.warn("Could not import ginga plugin, since ginga is required")
# Register qt client
from ...config import qt_client
qt_client.add(GingaWidget)
Fix if ginga is not installedtry:
from .client import *
... | <commit_before>try:
from .client import *
from .qt_widget import *
except ImportError:
import warnings
warnings.warn("Could not import ginga plugin, since ginga is required")
# Register qt client
from ...config import qt_client
qt_client.add(GingaWidget)
<commit_msg>Fix if ginga is not installed<commit... |
ee425b43502054895986c447e4cdae2c7e6c9278 | Lib/fontTools/misc/timeTools.py | Lib/fontTools/misc/timeTools.py | """fontTools.misc.timeTools.py -- miscellaneous routines."""
from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
import time
import calendar
# OpenType timestamp handling
epoch_diff = calendar.timegm((1904, 1, 1, 0, 0, 0, 0, 0, 0))
def timestampToString(value):
try:... | """fontTools.misc.timeTools.py -- miscellaneous routines."""
from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
import time
import calendar
# OpenType timestamp handling
epoch_diff = calendar.timegm((1904, 1, 1, 0, 0, 0, 0, 0, 0))
def timestampToString(value):
# ht... | Adjust for Python 3.3 change in gmtime() exception type | Adjust for Python 3.3 change in gmtime() exception type
https://github.com/behdad/fonttools/issues/99#issuecomment-66776810
Fixes https://github.com/behdad/fonttools/issues/99
| Python | mit | googlefonts/fonttools,fonttools/fonttools | """fontTools.misc.timeTools.py -- miscellaneous routines."""
from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
import time
import calendar
# OpenType timestamp handling
epoch_diff = calendar.timegm((1904, 1, 1, 0, 0, 0, 0, 0, 0))
def timestampToString(value):
try:... | """fontTools.misc.timeTools.py -- miscellaneous routines."""
from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
import time
import calendar
# OpenType timestamp handling
epoch_diff = calendar.timegm((1904, 1, 1, 0, 0, 0, 0, 0, 0))
def timestampToString(value):
# ht... | <commit_before>"""fontTools.misc.timeTools.py -- miscellaneous routines."""
from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
import time
import calendar
# OpenType timestamp handling
epoch_diff = calendar.timegm((1904, 1, 1, 0, 0, 0, 0, 0, 0))
def timestampToStrin... | """fontTools.misc.timeTools.py -- miscellaneous routines."""
from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
import time
import calendar
# OpenType timestamp handling
epoch_diff = calendar.timegm((1904, 1, 1, 0, 0, 0, 0, 0, 0))
def timestampToString(value):
# ht... | """fontTools.misc.timeTools.py -- miscellaneous routines."""
from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
import time
import calendar
# OpenType timestamp handling
epoch_diff = calendar.timegm((1904, 1, 1, 0, 0, 0, 0, 0, 0))
def timestampToString(value):
try:... | <commit_before>"""fontTools.misc.timeTools.py -- miscellaneous routines."""
from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
import time
import calendar
# OpenType timestamp handling
epoch_diff = calendar.timegm((1904, 1, 1, 0, 0, 0, 0, 0, 0))
def timestampToStrin... |
80e98c2291689aca97427abb3b85c89dce1f0af5 | lib/fuzzer/scripts/merge_data_flow.py | lib/fuzzer/scripts/merge_data_flow.py | #!/usr/bin/env python3
#===- lib/fuzzer/scripts/merge_data_flow.py ------------------------------===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===------------... | #!/usr/bin/env python3
#===- lib/fuzzer/scripts/merge_data_flow.py ------------------------------===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===------------... | Fix output format in data flow merge script after Py3 change. | [libFuzzer] Fix output format in data flow merge script after Py3 change.
Reviewers: Dor1s
Reviewed By: Dor1s
Subscribers: delcypher, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D60288
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@357730 91177308-0d34-... | Python | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt | #!/usr/bin/env python3
#===- lib/fuzzer/scripts/merge_data_flow.py ------------------------------===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===------------... | #!/usr/bin/env python3
#===- lib/fuzzer/scripts/merge_data_flow.py ------------------------------===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===------------... | <commit_before>#!/usr/bin/env python3
#===- lib/fuzzer/scripts/merge_data_flow.py ------------------------------===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#... | #!/usr/bin/env python3
#===- lib/fuzzer/scripts/merge_data_flow.py ------------------------------===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===------------... | #!/usr/bin/env python3
#===- lib/fuzzer/scripts/merge_data_flow.py ------------------------------===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===------------... | <commit_before>#!/usr/bin/env python3
#===- lib/fuzzer/scripts/merge_data_flow.py ------------------------------===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#... |
58c056894f0a2f5940a8ec9eb5fd30a57aade4aa | scripts/install_new_database.py | scripts/install_new_database.py | #!/usr/bin/env python3
import os
import sys
_upper_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
if _upper_dir not in sys.path:
sys.path.append(_upper_dir)
import chdb
def sanity_check():
sdb = chdb.init_scratch_db()
snippet_count = sdb.execute_with_retry_s(
'''SELECT ... | #!/usr/bin/env python3
import os
import sys
_upper_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
if _upper_dir not in sys.path:
sys.path.append(_upper_dir)
import chdb
def sanity_check():
sdb = chdb.init_scratch_db()
snippet_count = sdb.execute_with_retry_s(
'''SELECT ... | Add the sanity checks, but doing it right this time. | Add the sanity checks, but doing it right this time.
| Python | mit | eggpi/citationhunt,eggpi/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt,guilherme-pg/citationhunt,guilherme-pg/citationhunt | #!/usr/bin/env python3
import os
import sys
_upper_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
if _upper_dir not in sys.path:
sys.path.append(_upper_dir)
import chdb
def sanity_check():
sdb = chdb.init_scratch_db()
snippet_count = sdb.execute_with_retry_s(
'''SELECT ... | #!/usr/bin/env python3
import os
import sys
_upper_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
if _upper_dir not in sys.path:
sys.path.append(_upper_dir)
import chdb
def sanity_check():
sdb = chdb.init_scratch_db()
snippet_count = sdb.execute_with_retry_s(
'''SELECT ... | <commit_before>#!/usr/bin/env python3
import os
import sys
_upper_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
if _upper_dir not in sys.path:
sys.path.append(_upper_dir)
import chdb
def sanity_check():
sdb = chdb.init_scratch_db()
snippet_count = sdb.execute_with_retry_s(
... | #!/usr/bin/env python3
import os
import sys
_upper_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
if _upper_dir not in sys.path:
sys.path.append(_upper_dir)
import chdb
def sanity_check():
sdb = chdb.init_scratch_db()
snippet_count = sdb.execute_with_retry_s(
'''SELECT ... | #!/usr/bin/env python3
import os
import sys
_upper_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
if _upper_dir not in sys.path:
sys.path.append(_upper_dir)
import chdb
def sanity_check():
sdb = chdb.init_scratch_db()
snippet_count = sdb.execute_with_retry_s(
'''SELECT ... | <commit_before>#!/usr/bin/env python3
import os
import sys
_upper_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
if _upper_dir not in sys.path:
sys.path.append(_upper_dir)
import chdb
def sanity_check():
sdb = chdb.init_scratch_db()
snippet_count = sdb.execute_with_retry_s(
... |
fbdc69e218a71e984982a39fc36de19b7cf56f90 | Publishers/SamplePachube.py | Publishers/SamplePachube.py | import clr
from System import *
from System.Net import WebClient
from System.Xml import XmlDocument
from System.Diagnostics import Trace
url = "http://pachube.com/api/"
apiKey = "40ab667a92d6f892fef6099f38ad5eb31e619dffd793ff8842ae3b00eaf7d7cb"
environmentId = 2065
def Publish(topic, data):
ms = MemoryStream()
... | import clr
from System import *
from System.Net import WebClient
from System.Xml import XmlDocument
from System.Diagnostics import Trace
url = "http://pachube.com/api/"
apiKey = "<Your-Pachube-Api-Key-Here>"
environmentId = -1
def Publish(topic, data):
ms = MemoryStream()
Trace.WriteLine("Pachube Sample")
... | Change to sample pachube script | Change to sample pachube script
| Python | mit | markallanson/sspe,markallanson/sspe | import clr
from System import *
from System.Net import WebClient
from System.Xml import XmlDocument
from System.Diagnostics import Trace
url = "http://pachube.com/api/"
apiKey = "40ab667a92d6f892fef6099f38ad5eb31e619dffd793ff8842ae3b00eaf7d7cb"
environmentId = 2065
def Publish(topic, data):
ms = MemoryStream()
... | import clr
from System import *
from System.Net import WebClient
from System.Xml import XmlDocument
from System.Diagnostics import Trace
url = "http://pachube.com/api/"
apiKey = "<Your-Pachube-Api-Key-Here>"
environmentId = -1
def Publish(topic, data):
ms = MemoryStream()
Trace.WriteLine("Pachube Sample")
... | <commit_before>import clr
from System import *
from System.Net import WebClient
from System.Xml import XmlDocument
from System.Diagnostics import Trace
url = "http://pachube.com/api/"
apiKey = "40ab667a92d6f892fef6099f38ad5eb31e619dffd793ff8842ae3b00eaf7d7cb"
environmentId = 2065
def Publish(topic, data):
ms = M... | import clr
from System import *
from System.Net import WebClient
from System.Xml import XmlDocument
from System.Diagnostics import Trace
url = "http://pachube.com/api/"
apiKey = "<Your-Pachube-Api-Key-Here>"
environmentId = -1
def Publish(topic, data):
ms = MemoryStream()
Trace.WriteLine("Pachube Sample")
... | import clr
from System import *
from System.Net import WebClient
from System.Xml import XmlDocument
from System.Diagnostics import Trace
url = "http://pachube.com/api/"
apiKey = "40ab667a92d6f892fef6099f38ad5eb31e619dffd793ff8842ae3b00eaf7d7cb"
environmentId = 2065
def Publish(topic, data):
ms = MemoryStream()
... | <commit_before>import clr
from System import *
from System.Net import WebClient
from System.Xml import XmlDocument
from System.Diagnostics import Trace
url = "http://pachube.com/api/"
apiKey = "40ab667a92d6f892fef6099f38ad5eb31e619dffd793ff8842ae3b00eaf7d7cb"
environmentId = 2065
def Publish(topic, data):
ms = M... |
5b66ef91a1f73563cf869ca455052b037ab9551f | backdrop/write/config/development_environment_sample.py | backdrop/write/config/development_environment_sample.py | # Copy this file to development_environment.py
# and replace OAuth credentials your dev credentials
TOKENS = {
'_foo_bucket': '_foo_bucket-bearer-token',
'bucket': 'bucket-bearer-token',
'foo': 'foo-bearer-token',
'foo_bucket': 'foo_bucket-bearer-token',
'licensing': 'licensing-bearer-token',
'l... | # Copy this file to development_environment.py
# and replace OAuth credentials your dev credentials
TOKENS = {
'_foo_bucket': '_foo_bucket-bearer-token',
'bucket': 'bucket-bearer-token',
'foo': 'foo-bearer-token',
'foo_bucket': 'foo_bucket-bearer-token',
'licensing': 'licensing-bearer-token',
'l... | Use consistent naming for tokens | Use consistent naming for tokens
| Python | mit | alphagov/backdrop,alphagov/backdrop,alphagov/backdrop | # Copy this file to development_environment.py
# and replace OAuth credentials your dev credentials
TOKENS = {
'_foo_bucket': '_foo_bucket-bearer-token',
'bucket': 'bucket-bearer-token',
'foo': 'foo-bearer-token',
'foo_bucket': 'foo_bucket-bearer-token',
'licensing': 'licensing-bearer-token',
'l... | # Copy this file to development_environment.py
# and replace OAuth credentials your dev credentials
TOKENS = {
'_foo_bucket': '_foo_bucket-bearer-token',
'bucket': 'bucket-bearer-token',
'foo': 'foo-bearer-token',
'foo_bucket': 'foo_bucket-bearer-token',
'licensing': 'licensing-bearer-token',
'l... | <commit_before># Copy this file to development_environment.py
# and replace OAuth credentials your dev credentials
TOKENS = {
'_foo_bucket': '_foo_bucket-bearer-token',
'bucket': 'bucket-bearer-token',
'foo': 'foo-bearer-token',
'foo_bucket': 'foo_bucket-bearer-token',
'licensing': 'licensing-bearer... | # Copy this file to development_environment.py
# and replace OAuth credentials your dev credentials
TOKENS = {
'_foo_bucket': '_foo_bucket-bearer-token',
'bucket': 'bucket-bearer-token',
'foo': 'foo-bearer-token',
'foo_bucket': 'foo_bucket-bearer-token',
'licensing': 'licensing-bearer-token',
'l... | # Copy this file to development_environment.py
# and replace OAuth credentials your dev credentials
TOKENS = {
'_foo_bucket': '_foo_bucket-bearer-token',
'bucket': 'bucket-bearer-token',
'foo': 'foo-bearer-token',
'foo_bucket': 'foo_bucket-bearer-token',
'licensing': 'licensing-bearer-token',
'l... | <commit_before># Copy this file to development_environment.py
# and replace OAuth credentials your dev credentials
TOKENS = {
'_foo_bucket': '_foo_bucket-bearer-token',
'bucket': 'bucket-bearer-token',
'foo': 'foo-bearer-token',
'foo_bucket': 'foo_bucket-bearer-token',
'licensing': 'licensing-bearer... |
7f6c151d8d5c18fb78a5603792ee19738d625aab | python_scripts/extractor_python_readability_server.py | python_scripts/extractor_python_readability_server.py | #!/usr/bin/python
import sys
import glob
sys.path.append("python_scripts/gen-py")
sys.path.append("gen-py/thrift_solr/")
from thrift.transport import TSocket
from thrift.server import TServer
#import thrift_solr
import ExtractorService
import sys
import readability
import readability
def extract_with_python_rea... | #!/usr/bin/python
import sys
import os
import glob
#sys.path.append(os.path.join(os.path.dirname(__file__), "gen-py"))
sys.path.append(os.path.join(os.path.dirname(__file__),"gen-py/thrift_solr/"))
sys.path.append(os.path.dirname(__file__) )
from thrift.transport import TSocket
from thrift.server import TServer
#im... | Fix include path and ascii / utf8 errors. | Fix include path and ascii / utf8 errors.
| Python | agpl-3.0 | AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,AchyuthIIIT... | #!/usr/bin/python
import sys
import glob
sys.path.append("python_scripts/gen-py")
sys.path.append("gen-py/thrift_solr/")
from thrift.transport import TSocket
from thrift.server import TServer
#import thrift_solr
import ExtractorService
import sys
import readability
import readability
def extract_with_python_rea... | #!/usr/bin/python
import sys
import os
import glob
#sys.path.append(os.path.join(os.path.dirname(__file__), "gen-py"))
sys.path.append(os.path.join(os.path.dirname(__file__),"gen-py/thrift_solr/"))
sys.path.append(os.path.dirname(__file__) )
from thrift.transport import TSocket
from thrift.server import TServer
#im... | <commit_before>#!/usr/bin/python
import sys
import glob
sys.path.append("python_scripts/gen-py")
sys.path.append("gen-py/thrift_solr/")
from thrift.transport import TSocket
from thrift.server import TServer
#import thrift_solr
import ExtractorService
import sys
import readability
import readability
def extract_... | #!/usr/bin/python
import sys
import os
import glob
#sys.path.append(os.path.join(os.path.dirname(__file__), "gen-py"))
sys.path.append(os.path.join(os.path.dirname(__file__),"gen-py/thrift_solr/"))
sys.path.append(os.path.dirname(__file__) )
from thrift.transport import TSocket
from thrift.server import TServer
#im... | #!/usr/bin/python
import sys
import glob
sys.path.append("python_scripts/gen-py")
sys.path.append("gen-py/thrift_solr/")
from thrift.transport import TSocket
from thrift.server import TServer
#import thrift_solr
import ExtractorService
import sys
import readability
import readability
def extract_with_python_rea... | <commit_before>#!/usr/bin/python
import sys
import glob
sys.path.append("python_scripts/gen-py")
sys.path.append("gen-py/thrift_solr/")
from thrift.transport import TSocket
from thrift.server import TServer
#import thrift_solr
import ExtractorService
import sys
import readability
import readability
def extract_... |
fa0e95f5447947f3d2c01d7c5760ad9db53bb73d | api/wph/settings/third_party.py | api/wph/settings/third_party.py | SHELL_PLUS = "ipython"
SOCIAL_AUTH_STEAM_EXTRA_DATA = ['player']
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/'
SOCIAL_AUTH_LOGIN_ERROR_URL = '/login/error/'
SOCIAL_AUTH_INACTIVE_USER_URL = '/login/inactive/'
SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/'
SOCIAL_AUTH_PASSWORDLESS = True
SOCIAL_AUTH_PIPELINE = (
'social_core.pipel... | SHELL_PLUS = "ipython"
SOCIAL_AUTH_STEAM_EXTRA_DATA = ['player']
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/'
SOCIAL_AUTH_LOGIN_ERROR_URL = '/login/error/'
SOCIAL_AUTH_INACTIVE_USER_URL = '/login/inactive/'
SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/'
SOCIAL_AUTH_PASSWORDLESS = True
SOCIAL_AUTH_PIPELINE = (
'social_core.pipel... | Remove assosiate user social auth step | Remove assosiate user social auth step
| Python | mit | prattl/wepickheroes,prattl/wepickheroes,prattl/wepickheroes,prattl/wepickheroes | SHELL_PLUS = "ipython"
SOCIAL_AUTH_STEAM_EXTRA_DATA = ['player']
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/'
SOCIAL_AUTH_LOGIN_ERROR_URL = '/login/error/'
SOCIAL_AUTH_INACTIVE_USER_URL = '/login/inactive/'
SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/'
SOCIAL_AUTH_PASSWORDLESS = True
SOCIAL_AUTH_PIPELINE = (
'social_core.pipel... | SHELL_PLUS = "ipython"
SOCIAL_AUTH_STEAM_EXTRA_DATA = ['player']
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/'
SOCIAL_AUTH_LOGIN_ERROR_URL = '/login/error/'
SOCIAL_AUTH_INACTIVE_USER_URL = '/login/inactive/'
SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/'
SOCIAL_AUTH_PASSWORDLESS = True
SOCIAL_AUTH_PIPELINE = (
'social_core.pipel... | <commit_before>SHELL_PLUS = "ipython"
SOCIAL_AUTH_STEAM_EXTRA_DATA = ['player']
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/'
SOCIAL_AUTH_LOGIN_ERROR_URL = '/login/error/'
SOCIAL_AUTH_INACTIVE_USER_URL = '/login/inactive/'
SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/'
SOCIAL_AUTH_PASSWORDLESS = True
SOCIAL_AUTH_PIPELINE = (
'so... | SHELL_PLUS = "ipython"
SOCIAL_AUTH_STEAM_EXTRA_DATA = ['player']
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/'
SOCIAL_AUTH_LOGIN_ERROR_URL = '/login/error/'
SOCIAL_AUTH_INACTIVE_USER_URL = '/login/inactive/'
SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/'
SOCIAL_AUTH_PASSWORDLESS = True
SOCIAL_AUTH_PIPELINE = (
'social_core.pipel... | SHELL_PLUS = "ipython"
SOCIAL_AUTH_STEAM_EXTRA_DATA = ['player']
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/'
SOCIAL_AUTH_LOGIN_ERROR_URL = '/login/error/'
SOCIAL_AUTH_INACTIVE_USER_URL = '/login/inactive/'
SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/'
SOCIAL_AUTH_PASSWORDLESS = True
SOCIAL_AUTH_PIPELINE = (
'social_core.pipel... | <commit_before>SHELL_PLUS = "ipython"
SOCIAL_AUTH_STEAM_EXTRA_DATA = ['player']
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/'
SOCIAL_AUTH_LOGIN_ERROR_URL = '/login/error/'
SOCIAL_AUTH_INACTIVE_USER_URL = '/login/inactive/'
SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/'
SOCIAL_AUTH_PASSWORDLESS = True
SOCIAL_AUTH_PIPELINE = (
'so... |
2a8a564fbd48fba25c4876ff3d4317152a1d647c | tests/basics/builtin_range.py | tests/basics/builtin_range.py | # test builtin range type
# print
print(range(4))
# bool
print(bool(range(0)))
print(bool(range(10)))
# len
print(len(range(0)))
print(len(range(4)))
print(len(range(1, 4)))
print(len(range(1, 4, 2)))
print(len(range(1, 4, -1)))
print(len(range(4, 1, -1)))
print(len(range(4, 1, -2)))
# subscr
print(range(4)[0])
pri... | # test builtin range type
# print
print(range(4))
# bool
print(bool(range(0)))
print(bool(range(10)))
# len
print(len(range(0)))
print(len(range(4)))
print(len(range(1, 4)))
print(len(range(1, 4, 2)))
print(len(range(1, 4, -1)))
print(len(range(4, 1, -1)))
print(len(range(4, 1, -2)))
# subscr
print(range(4)[0])
pri... | Test slicing a range that does not start at zero. | tests: Test slicing a range that does not start at zero.
| Python | mit | torwag/micropython,TDAbboud/micropython,dinau/micropython,dmazzella/micropython,pramasoul/micropython,adafruit/micropython,danicampora/micropython,misterdanb/micropython,trezor/micropython,misterdanb/micropython,redbear/micropython,noahwilliamsson/micropython,adafruit/circuitpython,alex-robbins/micropython,torwag/micro... | # test builtin range type
# print
print(range(4))
# bool
print(bool(range(0)))
print(bool(range(10)))
# len
print(len(range(0)))
print(len(range(4)))
print(len(range(1, 4)))
print(len(range(1, 4, 2)))
print(len(range(1, 4, -1)))
print(len(range(4, 1, -1)))
print(len(range(4, 1, -2)))
# subscr
print(range(4)[0])
pri... | # test builtin range type
# print
print(range(4))
# bool
print(bool(range(0)))
print(bool(range(10)))
# len
print(len(range(0)))
print(len(range(4)))
print(len(range(1, 4)))
print(len(range(1, 4, 2)))
print(len(range(1, 4, -1)))
print(len(range(4, 1, -1)))
print(len(range(4, 1, -2)))
# subscr
print(range(4)[0])
pri... | <commit_before># test builtin range type
# print
print(range(4))
# bool
print(bool(range(0)))
print(bool(range(10)))
# len
print(len(range(0)))
print(len(range(4)))
print(len(range(1, 4)))
print(len(range(1, 4, 2)))
print(len(range(1, 4, -1)))
print(len(range(4, 1, -1)))
print(len(range(4, 1, -2)))
# subscr
print(r... | # test builtin range type
# print
print(range(4))
# bool
print(bool(range(0)))
print(bool(range(10)))
# len
print(len(range(0)))
print(len(range(4)))
print(len(range(1, 4)))
print(len(range(1, 4, 2)))
print(len(range(1, 4, -1)))
print(len(range(4, 1, -1)))
print(len(range(4, 1, -2)))
# subscr
print(range(4)[0])
pri... | # test builtin range type
# print
print(range(4))
# bool
print(bool(range(0)))
print(bool(range(10)))
# len
print(len(range(0)))
print(len(range(4)))
print(len(range(1, 4)))
print(len(range(1, 4, 2)))
print(len(range(1, 4, -1)))
print(len(range(4, 1, -1)))
print(len(range(4, 1, -2)))
# subscr
print(range(4)[0])
pri... | <commit_before># test builtin range type
# print
print(range(4))
# bool
print(bool(range(0)))
print(bool(range(10)))
# len
print(len(range(0)))
print(len(range(4)))
print(len(range(1, 4)))
print(len(range(1, 4, 2)))
print(len(range(1, 4, -1)))
print(len(range(4, 1, -1)))
print(len(range(4, 1, -2)))
# subscr
print(r... |
73cb3c6883940e96e656b9b7dd6033ed2e41cb33 | custom/intrahealth/reports/recap_passage_report_v2.py | custom/intrahealth/reports/recap_passage_report_v2.py | from __future__ import absolute_import
from __future__ import unicode_literals
from memoized import memoized
from custom.intrahealth.filters import RecapPassageLocationFilter2, FRMonthFilter, FRYearFilter
from custom.intrahealth.sqldata import RecapPassageData2, DateSource2
from custom.intrahealth.reports.tableu_de_boa... | from __future__ import absolute_import
from __future__ import unicode_literals
from memoized import memoized
from corehq.apps.reports.standard import MonthYearMixin
from custom.intrahealth.filters import RecapPassageLocationFilter2, FRMonthFilter, FRYearFilter
from custom.intrahealth.sqldata import RecapPassageData2, ... | Fix month filter for recap passage report | Fix month filter for recap passage report
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | from __future__ import absolute_import
from __future__ import unicode_literals
from memoized import memoized
from custom.intrahealth.filters import RecapPassageLocationFilter2, FRMonthFilter, FRYearFilter
from custom.intrahealth.sqldata import RecapPassageData2, DateSource2
from custom.intrahealth.reports.tableu_de_boa... | from __future__ import absolute_import
from __future__ import unicode_literals
from memoized import memoized
from corehq.apps.reports.standard import MonthYearMixin
from custom.intrahealth.filters import RecapPassageLocationFilter2, FRMonthFilter, FRYearFilter
from custom.intrahealth.sqldata import RecapPassageData2, ... | <commit_before>from __future__ import absolute_import
from __future__ import unicode_literals
from memoized import memoized
from custom.intrahealth.filters import RecapPassageLocationFilter2, FRMonthFilter, FRYearFilter
from custom.intrahealth.sqldata import RecapPassageData2, DateSource2
from custom.intrahealth.report... | from __future__ import absolute_import
from __future__ import unicode_literals
from memoized import memoized
from corehq.apps.reports.standard import MonthYearMixin
from custom.intrahealth.filters import RecapPassageLocationFilter2, FRMonthFilter, FRYearFilter
from custom.intrahealth.sqldata import RecapPassageData2, ... | from __future__ import absolute_import
from __future__ import unicode_literals
from memoized import memoized
from custom.intrahealth.filters import RecapPassageLocationFilter2, FRMonthFilter, FRYearFilter
from custom.intrahealth.sqldata import RecapPassageData2, DateSource2
from custom.intrahealth.reports.tableu_de_boa... | <commit_before>from __future__ import absolute_import
from __future__ import unicode_literals
from memoized import memoized
from custom.intrahealth.filters import RecapPassageLocationFilter2, FRMonthFilter, FRYearFilter
from custom.intrahealth.sqldata import RecapPassageData2, DateSource2
from custom.intrahealth.report... |
23a88191e5d827dea84ad533853657110c94c840 | app/public/views.py | app/public/views.py | from flask import Blueprint, render_template, redirect, session, url_for
from app.decorators import login_required
blueprint = Blueprint('public', __name__)
@blueprint.route('/')
def home():
"""Return Home Page"""
return render_template('public/index.html')
@blueprint.route('/login', methods=['GET', 'POST... | import os
from flask import Blueprint, redirect, render_template, request, session, url_for
from app.decorators import login_required
ADMIN_USERNAME = os.environ['CUSTOMER_INFO_ADMIN_USERNAME']
ADMIN_PASSWORD_HASH = os.environ['CUSTOMER_INFO_ADMIN_PASSWORD_HASH']
blueprint = Blueprint('public', __name__)
@blueprin... | Add logic to verify and login admin | Add logic to verify and login admin
| Python | apache-2.0 | ueg1990/customer-info,ueg1990/customer-info | from flask import Blueprint, render_template, redirect, session, url_for
from app.decorators import login_required
blueprint = Blueprint('public', __name__)
@blueprint.route('/')
def home():
"""Return Home Page"""
return render_template('public/index.html')
@blueprint.route('/login', methods=['GET', 'POST... | import os
from flask import Blueprint, redirect, render_template, request, session, url_for
from app.decorators import login_required
ADMIN_USERNAME = os.environ['CUSTOMER_INFO_ADMIN_USERNAME']
ADMIN_PASSWORD_HASH = os.environ['CUSTOMER_INFO_ADMIN_PASSWORD_HASH']
blueprint = Blueprint('public', __name__)
@blueprin... | <commit_before>from flask import Blueprint, render_template, redirect, session, url_for
from app.decorators import login_required
blueprint = Blueprint('public', __name__)
@blueprint.route('/')
def home():
"""Return Home Page"""
return render_template('public/index.html')
@blueprint.route('/login', method... | import os
from flask import Blueprint, redirect, render_template, request, session, url_for
from app.decorators import login_required
ADMIN_USERNAME = os.environ['CUSTOMER_INFO_ADMIN_USERNAME']
ADMIN_PASSWORD_HASH = os.environ['CUSTOMER_INFO_ADMIN_PASSWORD_HASH']
blueprint = Blueprint('public', __name__)
@blueprin... | from flask import Blueprint, render_template, redirect, session, url_for
from app.decorators import login_required
blueprint = Blueprint('public', __name__)
@blueprint.route('/')
def home():
"""Return Home Page"""
return render_template('public/index.html')
@blueprint.route('/login', methods=['GET', 'POST... | <commit_before>from flask import Blueprint, render_template, redirect, session, url_for
from app.decorators import login_required
blueprint = Blueprint('public', __name__)
@blueprint.route('/')
def home():
"""Return Home Page"""
return render_template('public/index.html')
@blueprint.route('/login', method... |
9c9fff8617a048a32cbff3fb72b3b3ba23476996 | thinc/neural/_classes/softmax.py | thinc/neural/_classes/softmax.py | from .affine import Affine
from ... import describe
from ...describe import Dimension, Synapses, Biases
@describe.attributes(
W=Synapses("Weights matrix",
lambda obj: (obj.nO, obj.nI),
lambda W, ops: None)
)
class Softmax(Affine):
def predict(self, input__BI):
output__BO = self.ops.aff... | from .affine import Affine
from ... import describe
from ...describe import Dimension, Synapses, Biases
@describe.attributes(
W=Synapses("Weights matrix",
lambda obj: (obj.nO, obj.nI),
lambda W, ops: None)
)
class Softmax(Affine):
name = 'softmax'
def predict(self, input__BI):
outp... | Fix passing of params to optimizer in Softmax | Fix passing of params to optimizer in Softmax
| Python | mit | spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc | from .affine import Affine
from ... import describe
from ...describe import Dimension, Synapses, Biases
@describe.attributes(
W=Synapses("Weights matrix",
lambda obj: (obj.nO, obj.nI),
lambda W, ops: None)
)
class Softmax(Affine):
def predict(self, input__BI):
output__BO = self.ops.aff... | from .affine import Affine
from ... import describe
from ...describe import Dimension, Synapses, Biases
@describe.attributes(
W=Synapses("Weights matrix",
lambda obj: (obj.nO, obj.nI),
lambda W, ops: None)
)
class Softmax(Affine):
name = 'softmax'
def predict(self, input__BI):
outp... | <commit_before>from .affine import Affine
from ... import describe
from ...describe import Dimension, Synapses, Biases
@describe.attributes(
W=Synapses("Weights matrix",
lambda obj: (obj.nO, obj.nI),
lambda W, ops: None)
)
class Softmax(Affine):
def predict(self, input__BI):
output__BO... | from .affine import Affine
from ... import describe
from ...describe import Dimension, Synapses, Biases
@describe.attributes(
W=Synapses("Weights matrix",
lambda obj: (obj.nO, obj.nI),
lambda W, ops: None)
)
class Softmax(Affine):
name = 'softmax'
def predict(self, input__BI):
outp... | from .affine import Affine
from ... import describe
from ...describe import Dimension, Synapses, Biases
@describe.attributes(
W=Synapses("Weights matrix",
lambda obj: (obj.nO, obj.nI),
lambda W, ops: None)
)
class Softmax(Affine):
def predict(self, input__BI):
output__BO = self.ops.aff... | <commit_before>from .affine import Affine
from ... import describe
from ...describe import Dimension, Synapses, Biases
@describe.attributes(
W=Synapses("Weights matrix",
lambda obj: (obj.nO, obj.nI),
lambda W, ops: None)
)
class Softmax(Affine):
def predict(self, input__BI):
output__BO... |
0c6dfa4ad297562ec263a8e98bb75d836d2ab054 | src/python/expedient/ui/html/forms.py | src/python/expedient/ui/html/forms.py | '''
Created on Jun 20, 2010
@author: jnaous
'''
from django import forms
from expedient.ui.html.models import SliceFlowSpace
class FlowSpaceForm(forms.ModelForm):
"""
Form to edit flowspace.
"""
class Meta:
model = SliceFlowSpace
exclude = ["slice"]
| '''
Created on Jun 20, 2010
@author: jnaous
'''
from django import forms
from openflow.plugin.models import FlowSpaceRule
class FlowSpaceForm(forms.ModelForm):
"""
Form to edit flowspace.
"""
class Meta:
model = FlowSpaceRule
def __init__(self, sliver_qs, *args, **kwargs):
... | Modify FlowSpaceForm to use actual stored rules | Modify FlowSpaceForm to use actual stored rules
| Python | bsd-3-clause | avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf | '''
Created on Jun 20, 2010
@author: jnaous
'''
from django import forms
from expedient.ui.html.models import SliceFlowSpace
class FlowSpaceForm(forms.ModelForm):
"""
Form to edit flowspace.
"""
class Meta:
model = SliceFlowSpace
exclude = ["slice"]
Modify FlowSpaceForm ... | '''
Created on Jun 20, 2010
@author: jnaous
'''
from django import forms
from openflow.plugin.models import FlowSpaceRule
class FlowSpaceForm(forms.ModelForm):
"""
Form to edit flowspace.
"""
class Meta:
model = FlowSpaceRule
def __init__(self, sliver_qs, *args, **kwargs):
... | <commit_before>'''
Created on Jun 20, 2010
@author: jnaous
'''
from django import forms
from expedient.ui.html.models import SliceFlowSpace
class FlowSpaceForm(forms.ModelForm):
"""
Form to edit flowspace.
"""
class Meta:
model = SliceFlowSpace
exclude = ["slice"]
<commi... | '''
Created on Jun 20, 2010
@author: jnaous
'''
from django import forms
from openflow.plugin.models import FlowSpaceRule
class FlowSpaceForm(forms.ModelForm):
"""
Form to edit flowspace.
"""
class Meta:
model = FlowSpaceRule
def __init__(self, sliver_qs, *args, **kwargs):
... | '''
Created on Jun 20, 2010
@author: jnaous
'''
from django import forms
from expedient.ui.html.models import SliceFlowSpace
class FlowSpaceForm(forms.ModelForm):
"""
Form to edit flowspace.
"""
class Meta:
model = SliceFlowSpace
exclude = ["slice"]
Modify FlowSpaceForm ... | <commit_before>'''
Created on Jun 20, 2010
@author: jnaous
'''
from django import forms
from expedient.ui.html.models import SliceFlowSpace
class FlowSpaceForm(forms.ModelForm):
"""
Form to edit flowspace.
"""
class Meta:
model = SliceFlowSpace
exclude = ["slice"]
<commi... |
cf1da65820085a84eee51884431b0020d3018f23 | bot/project_info.py | bot/project_info.py | # Shared project info
name = 'telegram-bot-framework'
description = 'Python Telegram bot API framework'
url = 'https://github.com/alvarogzp/telegram-bot-framework'
author_name = 'Alvaro Gutierrez Perez'
author_email = '[email protected]'
authors_credits = (
("@AlvaroGP", "main developer"),
("@KouteiCheke... | # Shared project info
name = 'telegram-bot-framework'
description = 'Python Telegram bot API framework'
url = 'https://github.com/alvarogzp/telegram-bot-framework'
author_name = 'Alvaro Gutierrez Perez'
author_email = '[email protected]'
authors_credits = (
("@AlvaroGP", "main developer"),
("@KouteiCheke... | Add bitcoin address to donation addresses | Add bitcoin address to donation addresses
| Python | agpl-3.0 | alvarogzp/telegram-bot,alvarogzp/telegram-bot | # Shared project info
name = 'telegram-bot-framework'
description = 'Python Telegram bot API framework'
url = 'https://github.com/alvarogzp/telegram-bot-framework'
author_name = 'Alvaro Gutierrez Perez'
author_email = '[email protected]'
authors_credits = (
("@AlvaroGP", "main developer"),
("@KouteiCheke... | # Shared project info
name = 'telegram-bot-framework'
description = 'Python Telegram bot API framework'
url = 'https://github.com/alvarogzp/telegram-bot-framework'
author_name = 'Alvaro Gutierrez Perez'
author_email = '[email protected]'
authors_credits = (
("@AlvaroGP", "main developer"),
("@KouteiCheke... | <commit_before># Shared project info
name = 'telegram-bot-framework'
description = 'Python Telegram bot API framework'
url = 'https://github.com/alvarogzp/telegram-bot-framework'
author_name = 'Alvaro Gutierrez Perez'
author_email = '[email protected]'
authors_credits = (
("@AlvaroGP", "main developer"),
... | # Shared project info
name = 'telegram-bot-framework'
description = 'Python Telegram bot API framework'
url = 'https://github.com/alvarogzp/telegram-bot-framework'
author_name = 'Alvaro Gutierrez Perez'
author_email = '[email protected]'
authors_credits = (
("@AlvaroGP", "main developer"),
("@KouteiCheke... | # Shared project info
name = 'telegram-bot-framework'
description = 'Python Telegram bot API framework'
url = 'https://github.com/alvarogzp/telegram-bot-framework'
author_name = 'Alvaro Gutierrez Perez'
author_email = '[email protected]'
authors_credits = (
("@AlvaroGP", "main developer"),
("@KouteiCheke... | <commit_before># Shared project info
name = 'telegram-bot-framework'
description = 'Python Telegram bot API framework'
url = 'https://github.com/alvarogzp/telegram-bot-framework'
author_name = 'Alvaro Gutierrez Perez'
author_email = '[email protected]'
authors_credits = (
("@AlvaroGP", "main developer"),
... |
2adf8e8bbf1d0f623e14b8490d511ac45cbb7430 | djangochurch_data/management/commands/djangochurchimages.py | djangochurch_data/management/commands/djangochurchimages.py | import os.path
from blanc_basic_assets.models import Image
from django.apps import apps
from django.core.files import File
from django.core.management.base import BaseCommand
IMAGE_LIST = [
(1, 'remember.jpg'),
(2, 'sample-image-1.jpg'),
(3, 'sample-image-2.jpg'),
(4, 'sample-image-3.jpg'),
(5, '... | import os.path
from blanc_basic_assets.models import Image
from django.apps import apps
from django.core.files import File
from django.core.management.base import BaseCommand
IMAGE_LIST = [
(1, 'remember.jpg'),
(2, 'sample-image-1.jpg'),
(3, 'sample-image-2.jpg'),
(4, 'sample-image-3.jpg'),
(5, '... | Use updated app config for getting the path | Use updated app config for getting the path
Prevent warning with Django 1.8, fixes #3
| Python | bsd-3-clause | djangochurch/djangochurch-data | import os.path
from blanc_basic_assets.models import Image
from django.apps import apps
from django.core.files import File
from django.core.management.base import BaseCommand
IMAGE_LIST = [
(1, 'remember.jpg'),
(2, 'sample-image-1.jpg'),
(3, 'sample-image-2.jpg'),
(4, 'sample-image-3.jpg'),
(5, '... | import os.path
from blanc_basic_assets.models import Image
from django.apps import apps
from django.core.files import File
from django.core.management.base import BaseCommand
IMAGE_LIST = [
(1, 'remember.jpg'),
(2, 'sample-image-1.jpg'),
(3, 'sample-image-2.jpg'),
(4, 'sample-image-3.jpg'),
(5, '... | <commit_before>import os.path
from blanc_basic_assets.models import Image
from django.apps import apps
from django.core.files import File
from django.core.management.base import BaseCommand
IMAGE_LIST = [
(1, 'remember.jpg'),
(2, 'sample-image-1.jpg'),
(3, 'sample-image-2.jpg'),
(4, 'sample-image-3.j... | import os.path
from blanc_basic_assets.models import Image
from django.apps import apps
from django.core.files import File
from django.core.management.base import BaseCommand
IMAGE_LIST = [
(1, 'remember.jpg'),
(2, 'sample-image-1.jpg'),
(3, 'sample-image-2.jpg'),
(4, 'sample-image-3.jpg'),
(5, '... | import os.path
from blanc_basic_assets.models import Image
from django.apps import apps
from django.core.files import File
from django.core.management.base import BaseCommand
IMAGE_LIST = [
(1, 'remember.jpg'),
(2, 'sample-image-1.jpg'),
(3, 'sample-image-2.jpg'),
(4, 'sample-image-3.jpg'),
(5, '... | <commit_before>import os.path
from blanc_basic_assets.models import Image
from django.apps import apps
from django.core.files import File
from django.core.management.base import BaseCommand
IMAGE_LIST = [
(1, 'remember.jpg'),
(2, 'sample-image-1.jpg'),
(3, 'sample-image-2.jpg'),
(4, 'sample-image-3.j... |
43e3df5a07caa1370e71858f593c9c8bd73d1e2f | cloudly/rqworker.py | cloudly/rqworker.py | from rq import Worker, Queue, Connection
from rq.job import Job
from cloudly.cache import redis
from cloudly.memoized import Memoized
def enqueue(function, *args):
return _get_queue().enqueue(function, *args)
def fetch_job(job_id):
return Job.fetch(job_id, redis)
@Memoized
def _get_queue():
return Que... | from rq import Worker, Queue, Connection
from rq.job import Job
from cloudly.cache import redis
from cloudly.memoized import Memoized
def enqueue(function, *args, **kwargs):
return _get_queue().enqueue(function, *args, **kwargs)
def fetch_job(job_id):
return Job.fetch(job_id, redis)
@Memoized
def _get_qu... | Fix missing `kwargs` argument to enqueue. | Fix missing `kwargs` argument to enqueue.
| Python | mit | ooda/cloudly,ooda/cloudly | from rq import Worker, Queue, Connection
from rq.job import Job
from cloudly.cache import redis
from cloudly.memoized import Memoized
def enqueue(function, *args):
return _get_queue().enqueue(function, *args)
def fetch_job(job_id):
return Job.fetch(job_id, redis)
@Memoized
def _get_queue():
return Que... | from rq import Worker, Queue, Connection
from rq.job import Job
from cloudly.cache import redis
from cloudly.memoized import Memoized
def enqueue(function, *args, **kwargs):
return _get_queue().enqueue(function, *args, **kwargs)
def fetch_job(job_id):
return Job.fetch(job_id, redis)
@Memoized
def _get_qu... | <commit_before>from rq import Worker, Queue, Connection
from rq.job import Job
from cloudly.cache import redis
from cloudly.memoized import Memoized
def enqueue(function, *args):
return _get_queue().enqueue(function, *args)
def fetch_job(job_id):
return Job.fetch(job_id, redis)
@Memoized
def _get_queue():... | from rq import Worker, Queue, Connection
from rq.job import Job
from cloudly.cache import redis
from cloudly.memoized import Memoized
def enqueue(function, *args, **kwargs):
return _get_queue().enqueue(function, *args, **kwargs)
def fetch_job(job_id):
return Job.fetch(job_id, redis)
@Memoized
def _get_qu... | from rq import Worker, Queue, Connection
from rq.job import Job
from cloudly.cache import redis
from cloudly.memoized import Memoized
def enqueue(function, *args):
return _get_queue().enqueue(function, *args)
def fetch_job(job_id):
return Job.fetch(job_id, redis)
@Memoized
def _get_queue():
return Que... | <commit_before>from rq import Worker, Queue, Connection
from rq.job import Job
from cloudly.cache import redis
from cloudly.memoized import Memoized
def enqueue(function, *args):
return _get_queue().enqueue(function, *args)
def fetch_job(job_id):
return Job.fetch(job_id, redis)
@Memoized
def _get_queue():... |
0c0e81798b078547bc5931c26dd2b0ab6507db94 | devilry/project/common/devilry_test_runner.py | devilry/project/common/devilry_test_runner.py | import warnings
from django.test.runner import DiscoverRunner
from django.utils.deprecation import RemovedInDjango20Warning, RemovedInDjango110Warning
class DevilryTestRunner(DiscoverRunner):
def setup_test_environment(self, **kwargs):
# warnings.filterwarnings('ignore', category=RemovedInDjango)
... | import warnings
from django.test.runner import DiscoverRunner
from django.utils.deprecation import RemovedInDjango20Warning
class DevilryTestRunner(DiscoverRunner):
def setup_test_environment(self, **kwargs):
# warnings.filterwarnings('ignore', category=RemovedInDjango)
super(DevilryTestRunner, s... | Update warning ignores for Django 1.10. | project...DevilryTestRunner: Update warning ignores for Django 1.10.
| Python | bsd-3-clause | devilry/devilry-django,devilry/devilry-django,devilry/devilry-django,devilry/devilry-django | import warnings
from django.test.runner import DiscoverRunner
from django.utils.deprecation import RemovedInDjango20Warning, RemovedInDjango110Warning
class DevilryTestRunner(DiscoverRunner):
def setup_test_environment(self, **kwargs):
# warnings.filterwarnings('ignore', category=RemovedInDjango)
... | import warnings
from django.test.runner import DiscoverRunner
from django.utils.deprecation import RemovedInDjango20Warning
class DevilryTestRunner(DiscoverRunner):
def setup_test_environment(self, **kwargs):
# warnings.filterwarnings('ignore', category=RemovedInDjango)
super(DevilryTestRunner, s... | <commit_before>import warnings
from django.test.runner import DiscoverRunner
from django.utils.deprecation import RemovedInDjango20Warning, RemovedInDjango110Warning
class DevilryTestRunner(DiscoverRunner):
def setup_test_environment(self, **kwargs):
# warnings.filterwarnings('ignore', category=RemovedIn... | import warnings
from django.test.runner import DiscoverRunner
from django.utils.deprecation import RemovedInDjango20Warning
class DevilryTestRunner(DiscoverRunner):
def setup_test_environment(self, **kwargs):
# warnings.filterwarnings('ignore', category=RemovedInDjango)
super(DevilryTestRunner, s... | import warnings
from django.test.runner import DiscoverRunner
from django.utils.deprecation import RemovedInDjango20Warning, RemovedInDjango110Warning
class DevilryTestRunner(DiscoverRunner):
def setup_test_environment(self, **kwargs):
# warnings.filterwarnings('ignore', category=RemovedInDjango)
... | <commit_before>import warnings
from django.test.runner import DiscoverRunner
from django.utils.deprecation import RemovedInDjango20Warning, RemovedInDjango110Warning
class DevilryTestRunner(DiscoverRunner):
def setup_test_environment(self, **kwargs):
# warnings.filterwarnings('ignore', category=RemovedIn... |
c9402c1685a3351a9a39fe433fa343b58f895960 | Lib/fontTools/encodings/codecs_test.py | Lib/fontTools/encodings/codecs_test.py | from __future__ import print_function, division, absolute_import, unicode_literals
from fontTools.misc.py23 import *
import unittest
import fontTools.encodings.codecs # Not to be confused with "import codecs"
class ExtendedCodecsTest(unittest.TestCase):
def test_decode(self):
self.assertEqual(b'x\xfe\xfdy'.decode(... | from __future__ import print_function, division, absolute_import, unicode_literals
from fontTools.misc.py23 import *
import unittest
import fontTools.encodings.codecs # Not to be confused with "import codecs"
class ExtendedCodecsTest(unittest.TestCase):
def test_decode(self):
self.assertEqual(b'x\xfe\xfdy'.decode(... | Fix test on Python 2.6 | Fix test on Python 2.6
| Python | mit | fonttools/fonttools,googlefonts/fonttools | from __future__ import print_function, division, absolute_import, unicode_literals
from fontTools.misc.py23 import *
import unittest
import fontTools.encodings.codecs # Not to be confused with "import codecs"
class ExtendedCodecsTest(unittest.TestCase):
def test_decode(self):
self.assertEqual(b'x\xfe\xfdy'.decode(... | from __future__ import print_function, division, absolute_import, unicode_literals
from fontTools.misc.py23 import *
import unittest
import fontTools.encodings.codecs # Not to be confused with "import codecs"
class ExtendedCodecsTest(unittest.TestCase):
def test_decode(self):
self.assertEqual(b'x\xfe\xfdy'.decode(... | <commit_before>from __future__ import print_function, division, absolute_import, unicode_literals
from fontTools.misc.py23 import *
import unittest
import fontTools.encodings.codecs # Not to be confused with "import codecs"
class ExtendedCodecsTest(unittest.TestCase):
def test_decode(self):
self.assertEqual(b'x\xf... | from __future__ import print_function, division, absolute_import, unicode_literals
from fontTools.misc.py23 import *
import unittest
import fontTools.encodings.codecs # Not to be confused with "import codecs"
class ExtendedCodecsTest(unittest.TestCase):
def test_decode(self):
self.assertEqual(b'x\xfe\xfdy'.decode(... | from __future__ import print_function, division, absolute_import, unicode_literals
from fontTools.misc.py23 import *
import unittest
import fontTools.encodings.codecs # Not to be confused with "import codecs"
class ExtendedCodecsTest(unittest.TestCase):
def test_decode(self):
self.assertEqual(b'x\xfe\xfdy'.decode(... | <commit_before>from __future__ import print_function, division, absolute_import, unicode_literals
from fontTools.misc.py23 import *
import unittest
import fontTools.encodings.codecs # Not to be confused with "import codecs"
class ExtendedCodecsTest(unittest.TestCase):
def test_decode(self):
self.assertEqual(b'x\xf... |
2bfcbebe6535e2ea36cf969287e3ec7f5fe0cf86 | datapackage_pipelines/specs/hashers/hash_calculator.py | datapackage_pipelines/specs/hashers/hash_calculator.py | import hashlib
from datapackage_pipelines.utilities.extended_json import json
from ..errors import SpecError
from .dependency_resolver import resolve_dependencies
class HashCalculator(object):
def __init__(self):
self.all_pipeline_ids = {}
def calculate_hash(self, spec):
cache_hash = None... | import hashlib
from datapackage_pipelines.utilities.extended_json import json
from ..errors import SpecError
from .dependency_resolver import resolve_dependencies
class HashCalculator(object):
def __init__(self):
self.all_pipeline_ids = {}
def calculate_hash(self, spec):
cache_hash = None... | Fix error in error log | Fix error in error log
| Python | mit | frictionlessdata/datapackage-pipelines,frictionlessdata/datapackage-pipelines,frictionlessdata/datapackage-pipelines | import hashlib
from datapackage_pipelines.utilities.extended_json import json
from ..errors import SpecError
from .dependency_resolver import resolve_dependencies
class HashCalculator(object):
def __init__(self):
self.all_pipeline_ids = {}
def calculate_hash(self, spec):
cache_hash = None... | import hashlib
from datapackage_pipelines.utilities.extended_json import json
from ..errors import SpecError
from .dependency_resolver import resolve_dependencies
class HashCalculator(object):
def __init__(self):
self.all_pipeline_ids = {}
def calculate_hash(self, spec):
cache_hash = None... | <commit_before>import hashlib
from datapackage_pipelines.utilities.extended_json import json
from ..errors import SpecError
from .dependency_resolver import resolve_dependencies
class HashCalculator(object):
def __init__(self):
self.all_pipeline_ids = {}
def calculate_hash(self, spec):
ca... | import hashlib
from datapackage_pipelines.utilities.extended_json import json
from ..errors import SpecError
from .dependency_resolver import resolve_dependencies
class HashCalculator(object):
def __init__(self):
self.all_pipeline_ids = {}
def calculate_hash(self, spec):
cache_hash = None... | import hashlib
from datapackage_pipelines.utilities.extended_json import json
from ..errors import SpecError
from .dependency_resolver import resolve_dependencies
class HashCalculator(object):
def __init__(self):
self.all_pipeline_ids = {}
def calculate_hash(self, spec):
cache_hash = None... | <commit_before>import hashlib
from datapackage_pipelines.utilities.extended_json import json
from ..errors import SpecError
from .dependency_resolver import resolve_dependencies
class HashCalculator(object):
def __init__(self):
self.all_pipeline_ids = {}
def calculate_hash(self, spec):
ca... |
e201f59f25b3f7822531bfbdc6300178e2d2e285 | angr/engines/soot/static_dispatcher.py | angr/engines/soot/static_dispatcher.py |
from archinfo.arch_soot import SootMethodDescriptor
# TODO implement properly
# this will need the expression, the class hierarchy, and the position of the instruction (for invoke-super)
# this will also need the current state to try to figure out the dynamic type
def resolve_method(state, expr):
return SootMe... |
from archinfo.arch_soot import SootMethodDescriptor
from cle.errors import CLEError
import logging
l = logging.getLogger('angr.engines.soot.static_dispatcher')
# TODO implement properly
# this will need the expression, the class hierarchy, and the position of the instruction (for invoke-super)
# this will also need... | Add more attributes to resolved method | Add more attributes to resolved method
| Python | bsd-2-clause | iamahuman/angr,angr/angr,iamahuman/angr,schieb/angr,angr/angr,angr/angr,schieb/angr,schieb/angr,iamahuman/angr |
from archinfo.arch_soot import SootMethodDescriptor
# TODO implement properly
# this will need the expression, the class hierarchy, and the position of the instruction (for invoke-super)
# this will also need the current state to try to figure out the dynamic type
def resolve_method(state, expr):
return SootMe... |
from archinfo.arch_soot import SootMethodDescriptor
from cle.errors import CLEError
import logging
l = logging.getLogger('angr.engines.soot.static_dispatcher')
# TODO implement properly
# this will need the expression, the class hierarchy, and the position of the instruction (for invoke-super)
# this will also need... | <commit_before>
from archinfo.arch_soot import SootMethodDescriptor
# TODO implement properly
# this will need the expression, the class hierarchy, and the position of the instruction (for invoke-super)
# this will also need the current state to try to figure out the dynamic type
def resolve_method(state, expr):
... |
from archinfo.arch_soot import SootMethodDescriptor
from cle.errors import CLEError
import logging
l = logging.getLogger('angr.engines.soot.static_dispatcher')
# TODO implement properly
# this will need the expression, the class hierarchy, and the position of the instruction (for invoke-super)
# this will also need... |
from archinfo.arch_soot import SootMethodDescriptor
# TODO implement properly
# this will need the expression, the class hierarchy, and the position of the instruction (for invoke-super)
# this will also need the current state to try to figure out the dynamic type
def resolve_method(state, expr):
return SootMe... | <commit_before>
from archinfo.arch_soot import SootMethodDescriptor
# TODO implement properly
# this will need the expression, the class hierarchy, and the position of the instruction (for invoke-super)
# this will also need the current state to try to figure out the dynamic type
def resolve_method(state, expr):
... |
979d84f965b0118f86a8df7aa0311f65f8e36170 | indra/tools/reading/readers/trips/__init__.py | indra/tools/reading/readers/trips/__init__.py | from indra.tools.reading.readers.core import EmptyReader
from indra.sources import trips
class TripsReader(EmptyReader):
"""A stand-in for TRIPS reading.
Currently, we do not run TRIPS (more specifically DRUM) regularly at large
scales, however on occasion we have outputs from TRIPS that were generated
... | import os
import subprocess as sp
from indra.tools.reading.readers.core import Reader
from indra.sources.trips import client, process_xml
from indra_db import formats
class TripsReader(Reader):
"""A stand-in for TRIPS reading.
Currently, we do not run TRIPS (more specifically DRUM) regularly at large
s... | Implement the basics of the TRIPS reader. | Implement the basics of the TRIPS reader.
| Python | bsd-2-clause | sorgerlab/indra,johnbachman/belpy,sorgerlab/belpy,sorgerlab/belpy,sorgerlab/indra,johnbachman/belpy,johnbachman/indra,johnbachman/belpy,bgyori/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/belpy,johnbachman/indra,bgyori/indra,bgyori/indra | from indra.tools.reading.readers.core import EmptyReader
from indra.sources import trips
class TripsReader(EmptyReader):
"""A stand-in for TRIPS reading.
Currently, we do not run TRIPS (more specifically DRUM) regularly at large
scales, however on occasion we have outputs from TRIPS that were generated
... | import os
import subprocess as sp
from indra.tools.reading.readers.core import Reader
from indra.sources.trips import client, process_xml
from indra_db import formats
class TripsReader(Reader):
"""A stand-in for TRIPS reading.
Currently, we do not run TRIPS (more specifically DRUM) regularly at large
s... | <commit_before>from indra.tools.reading.readers.core import EmptyReader
from indra.sources import trips
class TripsReader(EmptyReader):
"""A stand-in for TRIPS reading.
Currently, we do not run TRIPS (more specifically DRUM) regularly at large
scales, however on occasion we have outputs from TRIPS that ... | import os
import subprocess as sp
from indra.tools.reading.readers.core import Reader
from indra.sources.trips import client, process_xml
from indra_db import formats
class TripsReader(Reader):
"""A stand-in for TRIPS reading.
Currently, we do not run TRIPS (more specifically DRUM) regularly at large
s... | from indra.tools.reading.readers.core import EmptyReader
from indra.sources import trips
class TripsReader(EmptyReader):
"""A stand-in for TRIPS reading.
Currently, we do not run TRIPS (more specifically DRUM) regularly at large
scales, however on occasion we have outputs from TRIPS that were generated
... | <commit_before>from indra.tools.reading.readers.core import EmptyReader
from indra.sources import trips
class TripsReader(EmptyReader):
"""A stand-in for TRIPS reading.
Currently, we do not run TRIPS (more specifically DRUM) regularly at large
scales, however on occasion we have outputs from TRIPS that ... |
493ce497e5d84d8db9c37816aefea9099df42e90 | pywatson/answer/synonym.py | pywatson/answer/synonym.py | class Synonym(object):
def __init__(self):
pass
| from pywatson.util.map_initializable import MapInitializable
class SynSetSynonym(MapInitializable):
def __init__(self, is_chosen, value, weight):
self.is_chosen = is_chosen
self.value = value
self.weight = weight
@classmethod
def from_mapping(cls, syn_mapping):
return cls(... | Add Synonym and related classes | Add Synonym and related classes
| Python | mit | sherlocke/pywatson | class Synonym(object):
def __init__(self):
pass
Add Synonym and related classes | from pywatson.util.map_initializable import MapInitializable
class SynSetSynonym(MapInitializable):
def __init__(self, is_chosen, value, weight):
self.is_chosen = is_chosen
self.value = value
self.weight = weight
@classmethod
def from_mapping(cls, syn_mapping):
return cls(... | <commit_before>class Synonym(object):
def __init__(self):
pass
<commit_msg>Add Synonym and related classes<commit_after> | from pywatson.util.map_initializable import MapInitializable
class SynSetSynonym(MapInitializable):
def __init__(self, is_chosen, value, weight):
self.is_chosen = is_chosen
self.value = value
self.weight = weight
@classmethod
def from_mapping(cls, syn_mapping):
return cls(... | class Synonym(object):
def __init__(self):
pass
Add Synonym and related classesfrom pywatson.util.map_initializable import MapInitializable
class SynSetSynonym(MapInitializable):
def __init__(self, is_chosen, value, weight):
self.is_chosen = is_chosen
self.value = value
self.we... | <commit_before>class Synonym(object):
def __init__(self):
pass
<commit_msg>Add Synonym and related classes<commit_after>from pywatson.util.map_initializable import MapInitializable
class SynSetSynonym(MapInitializable):
def __init__(self, is_chosen, value, weight):
self.is_chosen = is_chosen
... |
10426b049baeceb8dda1390650503e1d75ff8b64 | us_ignite/common/management/commands/common_load_fixtures.py | us_ignite/common/management/commands/common_load_fixtures.py | import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
from us_ignite.profiles.models import Interest
INTEREST_LIST = (
('SDN', 'sdn'),
('OpenFlow', 'openflow'),
('Ultra fast', 'ultra-fast'),
('Advanced wirele... | import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
from us_ignite.profiles.models import Category, Interest
INTEREST_LIST = (
('SDN', 'sdn'),
('OpenFlow', 'openflow'),
('Ultra fast', 'ultra-fast'),
('Advan... | Add initial fixtures for the categories. | Add initial fixtures for the categories.
| Python | bsd-3-clause | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
from us_ignite.profiles.models import Interest
INTEREST_LIST = (
('SDN', 'sdn'),
('OpenFlow', 'openflow'),
('Ultra fast', 'ultra-fast'),
('Advanced wirele... | import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
from us_ignite.profiles.models import Category, Interest
INTEREST_LIST = (
('SDN', 'sdn'),
('OpenFlow', 'openflow'),
('Ultra fast', 'ultra-fast'),
('Advan... | <commit_before>import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
from us_ignite.profiles.models import Interest
INTEREST_LIST = (
('SDN', 'sdn'),
('OpenFlow', 'openflow'),
('Ultra fast', 'ultra-fast'),
('... | import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
from us_ignite.profiles.models import Category, Interest
INTEREST_LIST = (
('SDN', 'sdn'),
('OpenFlow', 'openflow'),
('Ultra fast', 'ultra-fast'),
('Advan... | import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
from us_ignite.profiles.models import Interest
INTEREST_LIST = (
('SDN', 'sdn'),
('OpenFlow', 'openflow'),
('Ultra fast', 'ultra-fast'),
('Advanced wirele... | <commit_before>import urlparse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site
from us_ignite.profiles.models import Interest
INTEREST_LIST = (
('SDN', 'sdn'),
('OpenFlow', 'openflow'),
('Ultra fast', 'ultra-fast'),
('... |
fb53f2ed0e6337d6f5766f47cb67c204c89c0568 | src/oauth2client/__init__.py | src/oauth2client/__init__.py | # Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | # Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | Fix oauth2 revoke URI, new URL doesn't seem to work | Fix oauth2 revoke URI, new URL doesn't seem to work
| Python | apache-2.0 | GAM-team/GAM,GAM-team/GAM | # Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | # Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | <commit_before># Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | # Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | # Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | <commit_before># Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
83e820209f9980e6c9103908b14ff07fee23dc41 | getCheckedOut.py | getCheckedOut.py | import requests
from bs4 import BeautifulSoup
import json
from dotenv import load_dotenv
import os
load_dotenv(".env")
s = requests.Session()
r = s.get("https://kcls.bibliocommons.com/user/login", verify=False)
payload = {
"name": os.environ.get("USER"),
"user_pin": os.environ.get("PIN")
}
s.post("https://... | import requests
from bs4 import BeautifulSoup
import json
from dotenv import load_dotenv
import os
load_dotenv(".env")
s = requests.Session()
r = s.get("https://kcls.bibliocommons.com/user/login", verify=False)
payload = {
"name": os.environ.get("KCLS_USER"),
"user_pin": os.environ.get("PIN")
}
p = s.post(... | Change .env variable to KCLS_USER | Change .env variable to KCLS_USER
| Python | apache-2.0 | mphuie/kcls-myaccount | import requests
from bs4 import BeautifulSoup
import json
from dotenv import load_dotenv
import os
load_dotenv(".env")
s = requests.Session()
r = s.get("https://kcls.bibliocommons.com/user/login", verify=False)
payload = {
"name": os.environ.get("USER"),
"user_pin": os.environ.get("PIN")
}
s.post("https://... | import requests
from bs4 import BeautifulSoup
import json
from dotenv import load_dotenv
import os
load_dotenv(".env")
s = requests.Session()
r = s.get("https://kcls.bibliocommons.com/user/login", verify=False)
payload = {
"name": os.environ.get("KCLS_USER"),
"user_pin": os.environ.get("PIN")
}
p = s.post(... | <commit_before>import requests
from bs4 import BeautifulSoup
import json
from dotenv import load_dotenv
import os
load_dotenv(".env")
s = requests.Session()
r = s.get("https://kcls.bibliocommons.com/user/login", verify=False)
payload = {
"name": os.environ.get("USER"),
"user_pin": os.environ.get("PIN")
}
s... | import requests
from bs4 import BeautifulSoup
import json
from dotenv import load_dotenv
import os
load_dotenv(".env")
s = requests.Session()
r = s.get("https://kcls.bibliocommons.com/user/login", verify=False)
payload = {
"name": os.environ.get("KCLS_USER"),
"user_pin": os.environ.get("PIN")
}
p = s.post(... | import requests
from bs4 import BeautifulSoup
import json
from dotenv import load_dotenv
import os
load_dotenv(".env")
s = requests.Session()
r = s.get("https://kcls.bibliocommons.com/user/login", verify=False)
payload = {
"name": os.environ.get("USER"),
"user_pin": os.environ.get("PIN")
}
s.post("https://... | <commit_before>import requests
from bs4 import BeautifulSoup
import json
from dotenv import load_dotenv
import os
load_dotenv(".env")
s = requests.Session()
r = s.get("https://kcls.bibliocommons.com/user/login", verify=False)
payload = {
"name": os.environ.get("USER"),
"user_pin": os.environ.get("PIN")
}
s... |
f0246b9897d89c1ec6f2361bbb488c4e162e5c5e | reddit_liveupdate/utils.py | reddit_liveupdate/utils.py | import itertools
import pytz
from babel.dates import format_time
from pylons import c
def pairwise(iterable):
a, b = itertools.tee(iterable)
next(b, None)
return itertools.izip(a, b)
def pretty_time(dt):
display_tz = pytz.timezone(c.liveupdate_event.timezone)
return format_time(
time=... | import datetime
import itertools
import pytz
from babel.dates import format_time, format_datetime
from pylons import c
def pairwise(iterable):
a, b = itertools.tee(iterable)
next(b, None)
return itertools.izip(a, b)
def pretty_time(dt):
display_tz = pytz.timezone(c.liveupdate_event.timezone)
t... | Make timestamps more specific as temporal context fades. | Make timestamps more specific as temporal context fades.
Fixes #6.
| Python | bsd-3-clause | madbook/reddit-plugin-liveupdate,sim642/reddit-plugin-liveupdate,florenceyeun/reddit-plugin-liveupdate,sim642/reddit-plugin-liveupdate,florenceyeun/reddit-plugin-liveupdate,madbook/reddit-plugin-liveupdate,sim642/reddit-plugin-liveupdate,madbook/reddit-plugin-liveupdate,florenceyeun/reddit-plugin-liveupdate | import itertools
import pytz
from babel.dates import format_time
from pylons import c
def pairwise(iterable):
a, b = itertools.tee(iterable)
next(b, None)
return itertools.izip(a, b)
def pretty_time(dt):
display_tz = pytz.timezone(c.liveupdate_event.timezone)
return format_time(
time=... | import datetime
import itertools
import pytz
from babel.dates import format_time, format_datetime
from pylons import c
def pairwise(iterable):
a, b = itertools.tee(iterable)
next(b, None)
return itertools.izip(a, b)
def pretty_time(dt):
display_tz = pytz.timezone(c.liveupdate_event.timezone)
t... | <commit_before>import itertools
import pytz
from babel.dates import format_time
from pylons import c
def pairwise(iterable):
a, b = itertools.tee(iterable)
next(b, None)
return itertools.izip(a, b)
def pretty_time(dt):
display_tz = pytz.timezone(c.liveupdate_event.timezone)
return format_time... | import datetime
import itertools
import pytz
from babel.dates import format_time, format_datetime
from pylons import c
def pairwise(iterable):
a, b = itertools.tee(iterable)
next(b, None)
return itertools.izip(a, b)
def pretty_time(dt):
display_tz = pytz.timezone(c.liveupdate_event.timezone)
t... | import itertools
import pytz
from babel.dates import format_time
from pylons import c
def pairwise(iterable):
a, b = itertools.tee(iterable)
next(b, None)
return itertools.izip(a, b)
def pretty_time(dt):
display_tz = pytz.timezone(c.liveupdate_event.timezone)
return format_time(
time=... | <commit_before>import itertools
import pytz
from babel.dates import format_time
from pylons import c
def pairwise(iterable):
a, b = itertools.tee(iterable)
next(b, None)
return itertools.izip(a, b)
def pretty_time(dt):
display_tz = pytz.timezone(c.liveupdate_event.timezone)
return format_time... |
540c5f2969e75a0f461e9d46090cfe8d92c53b00 | Simulator/plot.py | Simulator/plot.py | from Simulator import *
import XMLParser
import textToXML
def getHistoryFileName(xmlFileName):
y = xmlFileName[:-3]
return 'history_' + y + 'txt'
def plotFromXML(fileName,simulationTime,chemicalList):
historyFile = getHistoryFileName(fileName)
sim = XMLParser.getSimulator(fileName)
sim.simulate(int(simulationTi... | from Simulator import *
import XMLParser
import textToXML
def getHistoryFileName(xmlFileName):
y = xmlFileName[:-3]
y = y + 'txt'
i = len(y) - 1
while i>=0 :
if y[i]=='\\' or y[i]=='/' :
break
i-=1
if i>=0 :
return y[:i+1] + 'history_' + y[i+1:]
else:
return 'history_' + y
def plotFromXML(fileNa... | Remove history name error for absolute paths | Remove history name error for absolute paths
| Python | mit | aayushkapadia/chemical_reaction_simulator | from Simulator import *
import XMLParser
import textToXML
def getHistoryFileName(xmlFileName):
y = xmlFileName[:-3]
return 'history_' + y + 'txt'
def plotFromXML(fileName,simulationTime,chemicalList):
historyFile = getHistoryFileName(fileName)
sim = XMLParser.getSimulator(fileName)
sim.simulate(int(simulationTi... | from Simulator import *
import XMLParser
import textToXML
def getHistoryFileName(xmlFileName):
y = xmlFileName[:-3]
y = y + 'txt'
i = len(y) - 1
while i>=0 :
if y[i]=='\\' or y[i]=='/' :
break
i-=1
if i>=0 :
return y[:i+1] + 'history_' + y[i+1:]
else:
return 'history_' + y
def plotFromXML(fileNa... | <commit_before>from Simulator import *
import XMLParser
import textToXML
def getHistoryFileName(xmlFileName):
y = xmlFileName[:-3]
return 'history_' + y + 'txt'
def plotFromXML(fileName,simulationTime,chemicalList):
historyFile = getHistoryFileName(fileName)
sim = XMLParser.getSimulator(fileName)
sim.simulate(i... | from Simulator import *
import XMLParser
import textToXML
def getHistoryFileName(xmlFileName):
y = xmlFileName[:-3]
y = y + 'txt'
i = len(y) - 1
while i>=0 :
if y[i]=='\\' or y[i]=='/' :
break
i-=1
if i>=0 :
return y[:i+1] + 'history_' + y[i+1:]
else:
return 'history_' + y
def plotFromXML(fileNa... | from Simulator import *
import XMLParser
import textToXML
def getHistoryFileName(xmlFileName):
y = xmlFileName[:-3]
return 'history_' + y + 'txt'
def plotFromXML(fileName,simulationTime,chemicalList):
historyFile = getHistoryFileName(fileName)
sim = XMLParser.getSimulator(fileName)
sim.simulate(int(simulationTi... | <commit_before>from Simulator import *
import XMLParser
import textToXML
def getHistoryFileName(xmlFileName):
y = xmlFileName[:-3]
return 'history_' + y + 'txt'
def plotFromXML(fileName,simulationTime,chemicalList):
historyFile = getHistoryFileName(fileName)
sim = XMLParser.getSimulator(fileName)
sim.simulate(i... |
3e5f277e72fe60921f2424f0587b99b21155b452 | scrapi/settings/defaults.py | scrapi/settings/defaults.py | BROKER_URL = 'amqp://guest@localhost'
CELERY_RESULT_BACKEND = 'amqp://guest@localhost'
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
STORAGE_METHOD = 'disk'
ARCHIVE_DIRECTORY = 'archive/'
RECORD_DIRECTORY = 'records'
STORE_HTTP_TRANSACTIONS = False
NORMALIZED_PROCESSING = ['storage']
RAW_PROCESSING = ['storage']
SENTRY... | DEBUG = False
BROKER_URL = 'amqp://guest@localhost'
CELERY_RESULT_BACKEND = 'amqp://guest@localhost'
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
STORAGE_METHOD = 'disk'
ARCHIVE_DIRECTORY = 'archive/'
RECORD_DIRECTORY = 'records'
STORE_HTTP_TRANSACTIONS = False
NORMALIZED_PROCESSING = ['storage']
RAW_PROCESSING = ['st... | Add a setting for debugging | Add a setting for debugging
| Python | apache-2.0 | icereval/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,felliott/scrapi,fabianvf/scrapi,alexgarciac/scrapi,erinspace/scrapi,mehanig/scrapi,CenterForOpenScience/scrapi,ostwald/scrapi,jeffreyliu3230/scrapi,fabianvf/scrapi,erinspace/scrapi | BROKER_URL = 'amqp://guest@localhost'
CELERY_RESULT_BACKEND = 'amqp://guest@localhost'
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
STORAGE_METHOD = 'disk'
ARCHIVE_DIRECTORY = 'archive/'
RECORD_DIRECTORY = 'records'
STORE_HTTP_TRANSACTIONS = False
NORMALIZED_PROCESSING = ['storage']
RAW_PROCESSING = ['storage']
SENTRY... | DEBUG = False
BROKER_URL = 'amqp://guest@localhost'
CELERY_RESULT_BACKEND = 'amqp://guest@localhost'
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
STORAGE_METHOD = 'disk'
ARCHIVE_DIRECTORY = 'archive/'
RECORD_DIRECTORY = 'records'
STORE_HTTP_TRANSACTIONS = False
NORMALIZED_PROCESSING = ['storage']
RAW_PROCESSING = ['st... | <commit_before>BROKER_URL = 'amqp://guest@localhost'
CELERY_RESULT_BACKEND = 'amqp://guest@localhost'
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
STORAGE_METHOD = 'disk'
ARCHIVE_DIRECTORY = 'archive/'
RECORD_DIRECTORY = 'records'
STORE_HTTP_TRANSACTIONS = False
NORMALIZED_PROCESSING = ['storage']
RAW_PROCESSING = ['st... | DEBUG = False
BROKER_URL = 'amqp://guest@localhost'
CELERY_RESULT_BACKEND = 'amqp://guest@localhost'
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
STORAGE_METHOD = 'disk'
ARCHIVE_DIRECTORY = 'archive/'
RECORD_DIRECTORY = 'records'
STORE_HTTP_TRANSACTIONS = False
NORMALIZED_PROCESSING = ['storage']
RAW_PROCESSING = ['st... | BROKER_URL = 'amqp://guest@localhost'
CELERY_RESULT_BACKEND = 'amqp://guest@localhost'
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
STORAGE_METHOD = 'disk'
ARCHIVE_DIRECTORY = 'archive/'
RECORD_DIRECTORY = 'records'
STORE_HTTP_TRANSACTIONS = False
NORMALIZED_PROCESSING = ['storage']
RAW_PROCESSING = ['storage']
SENTRY... | <commit_before>BROKER_URL = 'amqp://guest@localhost'
CELERY_RESULT_BACKEND = 'amqp://guest@localhost'
CELERY_EAGER_PROPAGATES_EXCEPTIONS = True
STORAGE_METHOD = 'disk'
ARCHIVE_DIRECTORY = 'archive/'
RECORD_DIRECTORY = 'records'
STORE_HTTP_TRANSACTIONS = False
NORMALIZED_PROCESSING = ['storage']
RAW_PROCESSING = ['st... |
ffab98b03588cef69ab11a10a440d02952661edf | cyder/cydns/soa/forms.py | cyder/cydns/soa/forms.py | from django.forms import ModelForm
from cyder.base.mixins import UsabilityFormMixin
from cyder.base.eav.forms import get_eav_form
from cyder.cydns.soa.models import SOA, SOAAV
class SOAForm(ModelForm, UsabilityFormMixin):
class Meta:
model = SOA
fields = ('root_domain', 'primary', 'contact', 'expi... | from django.forms import ModelForm
from cyder.base.mixins import UsabilityFormMixin
from cyder.base.eav.forms import get_eav_form
from cyder.cydns.soa.models import SOA, SOAAV
class SOAForm(ModelForm, UsabilityFormMixin):
class Meta:
model = SOA
fields = ('root_domain', 'primary', 'contact', 'expi... | Replace @ with . in soa form clean | Replace @ with . in soa form clean
| Python | bsd-3-clause | OSU-Net/cyder,OSU-Net/cyder,akeym/cyder,drkitty/cyder,murrown/cyder,OSU-Net/cyder,drkitty/cyder,akeym/cyder,murrown/cyder,drkitty/cyder,akeym/cyder,murrown/cyder,akeym/cyder,drkitty/cyder,murrown/cyder,OSU-Net/cyder | from django.forms import ModelForm
from cyder.base.mixins import UsabilityFormMixin
from cyder.base.eav.forms import get_eav_form
from cyder.cydns.soa.models import SOA, SOAAV
class SOAForm(ModelForm, UsabilityFormMixin):
class Meta:
model = SOA
fields = ('root_domain', 'primary', 'contact', 'expi... | from django.forms import ModelForm
from cyder.base.mixins import UsabilityFormMixin
from cyder.base.eav.forms import get_eav_form
from cyder.cydns.soa.models import SOA, SOAAV
class SOAForm(ModelForm, UsabilityFormMixin):
class Meta:
model = SOA
fields = ('root_domain', 'primary', 'contact', 'expi... | <commit_before>from django.forms import ModelForm
from cyder.base.mixins import UsabilityFormMixin
from cyder.base.eav.forms import get_eav_form
from cyder.cydns.soa.models import SOA, SOAAV
class SOAForm(ModelForm, UsabilityFormMixin):
class Meta:
model = SOA
fields = ('root_domain', 'primary', '... | from django.forms import ModelForm
from cyder.base.mixins import UsabilityFormMixin
from cyder.base.eav.forms import get_eav_form
from cyder.cydns.soa.models import SOA, SOAAV
class SOAForm(ModelForm, UsabilityFormMixin):
class Meta:
model = SOA
fields = ('root_domain', 'primary', 'contact', 'expi... | from django.forms import ModelForm
from cyder.base.mixins import UsabilityFormMixin
from cyder.base.eav.forms import get_eav_form
from cyder.cydns.soa.models import SOA, SOAAV
class SOAForm(ModelForm, UsabilityFormMixin):
class Meta:
model = SOA
fields = ('root_domain', 'primary', 'contact', 'expi... | <commit_before>from django.forms import ModelForm
from cyder.base.mixins import UsabilityFormMixin
from cyder.base.eav.forms import get_eav_form
from cyder.cydns.soa.models import SOA, SOAAV
class SOAForm(ModelForm, UsabilityFormMixin):
class Meta:
model = SOA
fields = ('root_domain', 'primary', '... |
2ebe4b4c281c6b604330b0ea250da41f0802717f | citrination_client/views/descriptors/alloy_composition_descriptor.py | citrination_client/views/descriptors/alloy_composition_descriptor.py | from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class AlloyCompositionDescriptor(MaterialDescriptor):
def __init__(self, key, balance_element, basis=100, threshold=None):
self.options = dict(balance_element=balance_element, basis=basis, units=threshold)
super(AlloyCo... | from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class AlloyCompositionDescriptor(MaterialDescriptor):
def __init__(self, key, balance_element, basis=100, threshold=None):
self.options = dict(balance_element=balance_element, basis=basis, threshold=threshold)
super(All... | Fix for mismamed threshold parameter in allow desc | Fix for mismamed threshold parameter in allow desc
| Python | apache-2.0 | CitrineInformatics/python-citrination-client | from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class AlloyCompositionDescriptor(MaterialDescriptor):
def __init__(self, key, balance_element, basis=100, threshold=None):
self.options = dict(balance_element=balance_element, basis=basis, units=threshold)
super(AlloyCo... | from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class AlloyCompositionDescriptor(MaterialDescriptor):
def __init__(self, key, balance_element, basis=100, threshold=None):
self.options = dict(balance_element=balance_element, basis=basis, threshold=threshold)
super(All... | <commit_before>from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class AlloyCompositionDescriptor(MaterialDescriptor):
def __init__(self, key, balance_element, basis=100, threshold=None):
self.options = dict(balance_element=balance_element, basis=basis, units=threshold)
... | from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class AlloyCompositionDescriptor(MaterialDescriptor):
def __init__(self, key, balance_element, basis=100, threshold=None):
self.options = dict(balance_element=balance_element, basis=basis, threshold=threshold)
super(All... | from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class AlloyCompositionDescriptor(MaterialDescriptor):
def __init__(self, key, balance_element, basis=100, threshold=None):
self.options = dict(balance_element=balance_element, basis=basis, units=threshold)
super(AlloyCo... | <commit_before>from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class AlloyCompositionDescriptor(MaterialDescriptor):
def __init__(self, key, balance_element, basis=100, threshold=None):
self.options = dict(balance_element=balance_element, basis=basis, units=threshold)
... |
26f984a7732491e87e4eb756caf0056a7ac71484 | contract_invoice_merge_by_partner/models/account_analytic_analysis.py | contract_invoice_merge_by_partner/models/account_analytic_analysis.py | # -*- coding: utf-8 -*-
# © 2016 Carlos Dauden <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import api, models
class PurchaseOrderLine(models.Model):
_inherit = 'account.analytic.account'
@api.multi
def _recurring_create_invoice(self, automat... | # -*- coding: utf-8 -*-
# © 2016 Carlos Dauden <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import api, models
class PurchaseOrderLine(models.Model):
_inherit = 'account.analytic.account'
@api.multi
def _recurring_create_invoice(self, automat... | Fix unlink, >1 filter and lines too long | Fix unlink, >1 filter and lines too long | Python | agpl-3.0 | bullet92/contract,open-synergy/contract | # -*- coding: utf-8 -*-
# © 2016 Carlos Dauden <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import api, models
class PurchaseOrderLine(models.Model):
_inherit = 'account.analytic.account'
@api.multi
def _recurring_create_invoice(self, automat... | # -*- coding: utf-8 -*-
# © 2016 Carlos Dauden <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import api, models
class PurchaseOrderLine(models.Model):
_inherit = 'account.analytic.account'
@api.multi
def _recurring_create_invoice(self, automat... | <commit_before># -*- coding: utf-8 -*-
# © 2016 Carlos Dauden <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import api, models
class PurchaseOrderLine(models.Model):
_inherit = 'account.analytic.account'
@api.multi
def _recurring_create_invoic... | # -*- coding: utf-8 -*-
# © 2016 Carlos Dauden <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import api, models
class PurchaseOrderLine(models.Model):
_inherit = 'account.analytic.account'
@api.multi
def _recurring_create_invoice(self, automat... | # -*- coding: utf-8 -*-
# © 2016 Carlos Dauden <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import api, models
class PurchaseOrderLine(models.Model):
_inherit = 'account.analytic.account'
@api.multi
def _recurring_create_invoice(self, automat... | <commit_before># -*- coding: utf-8 -*-
# © 2016 Carlos Dauden <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import api, models
class PurchaseOrderLine(models.Model):
_inherit = 'account.analytic.account'
@api.multi
def _recurring_create_invoic... |
cb9b1a2163f960e34721f74bad30622fda71e43b | packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py | packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py | """Test that the clang modules cache directory can be controlled."""
from __future__ import print_function
import unittest2
import os
import time
import platform
import shutil
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class ObjCMo... | """Test that the clang modules cache directory can be controlled."""
from __future__ import print_function
import unittest2
import os
import time
import platform
import shutil
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class ObjCMo... | Mark ObjC testcase as skipUnlessDarwin and fix a typo in test function. | Mark ObjC testcase as skipUnlessDarwin and fix a typo in test function.
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@326640 91177308-0d34-0410-b5e6-96231b3b80d8
| Python | apache-2.0 | apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb | """Test that the clang modules cache directory can be controlled."""
from __future__ import print_function
import unittest2
import os
import time
import platform
import shutil
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class ObjCMo... | """Test that the clang modules cache directory can be controlled."""
from __future__ import print_function
import unittest2
import os
import time
import platform
import shutil
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class ObjCMo... | <commit_before>"""Test that the clang modules cache directory can be controlled."""
from __future__ import print_function
import unittest2
import os
import time
import platform
import shutil
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil... | """Test that the clang modules cache directory can be controlled."""
from __future__ import print_function
import unittest2
import os
import time
import platform
import shutil
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class ObjCMo... | """Test that the clang modules cache directory can be controlled."""
from __future__ import print_function
import unittest2
import os
import time
import platform
import shutil
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class ObjCMo... | <commit_before>"""Test that the clang modules cache directory can be controlled."""
from __future__ import print_function
import unittest2
import os
import time
import platform
import shutil
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil... |
7ad47fad53be18a07aede85c02e41176a96c5de2 | learnwithpeople/__init__.py | learnwithpeople/__init__.py | # This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
__version__ = "dev"
GIT_REVISION = "dev"
| # This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
__all__ = ('celery_app',)
__version__ = "dev"
GIT_REVISION = "dev"
| Update celery setup according to docs | Update celery setup according to docs
| Python | mit | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | # This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
__version__ = "dev"
GIT_REVISION = "dev"
Update celery setup according to docs | # This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
__all__ = ('celery_app',)
__version__ = "dev"
GIT_REVISION = "dev"
| <commit_before># This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
__version__ = "dev"
GIT_REVISION = "dev"
<commit_msg>Update celery setup according to docs<commit_after> | # This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
__all__ = ('celery_app',)
__version__ = "dev"
GIT_REVISION = "dev"
| # This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
__version__ = "dev"
GIT_REVISION = "dev"
Update celery setup according to docs# This will make sure the app is always imported when
# Django starts so that shared_task will... | <commit_before># This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
__version__ = "dev"
GIT_REVISION = "dev"
<commit_msg>Update celery setup according to docs<commit_after># This will make sure the app is always imported when... |
e67c57128f88b61eac08e488e54343d48f1454c7 | ddcz/forms/authentication.py | ddcz/forms/authentication.py | import logging
from django import forms
from django.contrib.auth import forms as authforms
from ..models import UserProfile
logger = logging.getLogger(__name__)
class LoginForm(forms.Form):
nick = forms.CharField(label="Nick", max_length=20)
password = forms.CharField(label="Heslo", max_length=50, widget=f... | import logging
from django import forms
from django.contrib.auth import forms as authforms
from ..models import UserProfile
logger = logging.getLogger(__name__)
class LoginForm(forms.Form):
nick = forms.CharField(label="Nick", max_length=25)
password = forms.CharField(
label="Heslo", max_length=100... | Update LoginForm to match reality | Update LoginForm to match reality
| Python | mit | dracidoupe/graveyard,dracidoupe/graveyard,dracidoupe/graveyard,dracidoupe/graveyard | import logging
from django import forms
from django.contrib.auth import forms as authforms
from ..models import UserProfile
logger = logging.getLogger(__name__)
class LoginForm(forms.Form):
nick = forms.CharField(label="Nick", max_length=20)
password = forms.CharField(label="Heslo", max_length=50, widget=f... | import logging
from django import forms
from django.contrib.auth import forms as authforms
from ..models import UserProfile
logger = logging.getLogger(__name__)
class LoginForm(forms.Form):
nick = forms.CharField(label="Nick", max_length=25)
password = forms.CharField(
label="Heslo", max_length=100... | <commit_before>import logging
from django import forms
from django.contrib.auth import forms as authforms
from ..models import UserProfile
logger = logging.getLogger(__name__)
class LoginForm(forms.Form):
nick = forms.CharField(label="Nick", max_length=20)
password = forms.CharField(label="Heslo", max_leng... | import logging
from django import forms
from django.contrib.auth import forms as authforms
from ..models import UserProfile
logger = logging.getLogger(__name__)
class LoginForm(forms.Form):
nick = forms.CharField(label="Nick", max_length=25)
password = forms.CharField(
label="Heslo", max_length=100... | import logging
from django import forms
from django.contrib.auth import forms as authforms
from ..models import UserProfile
logger = logging.getLogger(__name__)
class LoginForm(forms.Form):
nick = forms.CharField(label="Nick", max_length=20)
password = forms.CharField(label="Heslo", max_length=50, widget=f... | <commit_before>import logging
from django import forms
from django.contrib.auth import forms as authforms
from ..models import UserProfile
logger = logging.getLogger(__name__)
class LoginForm(forms.Form):
nick = forms.CharField(label="Nick", max_length=20)
password = forms.CharField(label="Heslo", max_leng... |
14d6955118893c532c1d9f8f6037d1da1b18dbbb | analysis/plot-skeleton.py | analysis/plot-skeleton.py | #!/usr/bin/env python
import climate
import database
import plots
@climate.annotate(
root='plot data rooted at this path',
pattern=('plot data from files matching this pattern', 'option'),
)
def main(root, pattern='*/*block02/*trial00*.csv.gz'):
for trial in database.Experiment(root).trials_matching(pat... | #!/usr/bin/env python
import climate
import pandas as pd
import database
import plots
@climate.annotate(
root='plot data rooted at this path',
pattern=('plot data from files matching this pattern', 'option'),
)
def main(root, pattern='*/*block03/*trial00*.csv.gz'):
for trial in database.Experiment(root)... | Add multiple skeletons for the moment. | Add multiple skeletons for the moment.
| Python | mit | lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment | #!/usr/bin/env python
import climate
import database
import plots
@climate.annotate(
root='plot data rooted at this path',
pattern=('plot data from files matching this pattern', 'option'),
)
def main(root, pattern='*/*block02/*trial00*.csv.gz'):
for trial in database.Experiment(root).trials_matching(pat... | #!/usr/bin/env python
import climate
import pandas as pd
import database
import plots
@climate.annotate(
root='plot data rooted at this path',
pattern=('plot data from files matching this pattern', 'option'),
)
def main(root, pattern='*/*block03/*trial00*.csv.gz'):
for trial in database.Experiment(root)... | <commit_before>#!/usr/bin/env python
import climate
import database
import plots
@climate.annotate(
root='plot data rooted at this path',
pattern=('plot data from files matching this pattern', 'option'),
)
def main(root, pattern='*/*block02/*trial00*.csv.gz'):
for trial in database.Experiment(root).tria... | #!/usr/bin/env python
import climate
import pandas as pd
import database
import plots
@climate.annotate(
root='plot data rooted at this path',
pattern=('plot data from files matching this pattern', 'option'),
)
def main(root, pattern='*/*block03/*trial00*.csv.gz'):
for trial in database.Experiment(root)... | #!/usr/bin/env python
import climate
import database
import plots
@climate.annotate(
root='plot data rooted at this path',
pattern=('plot data from files matching this pattern', 'option'),
)
def main(root, pattern='*/*block02/*trial00*.csv.gz'):
for trial in database.Experiment(root).trials_matching(pat... | <commit_before>#!/usr/bin/env python
import climate
import database
import plots
@climate.annotate(
root='plot data rooted at this path',
pattern=('plot data from files matching this pattern', 'option'),
)
def main(root, pattern='*/*block02/*trial00*.csv.gz'):
for trial in database.Experiment(root).tria... |
bfd75a927da2b46cb8630fab0cd3828ba71bf4ee | dependencies.py | dependencies.py | #! /usr/bin/env python3
from setuptools.command import easy_install
requires = ["dnslib", "dkimpy>=0.7.1", "pyyaml", "ddt", "authheaders"]
for module in requires:
easy_install.main( ["-U",module] )
| #! /usr/bin/env python3
import subprocess
import sys
requires = ["dnslib", "dkimpy>=0.7.1", "pyyaml", "ddt", "authheaders"]
def install(package):
subprocess.call([sys.executable, "-m", "pip", "install", package])
for module in requires:
install(module)
| Use pip instead of easy_install | Use pip instead of easy_install
| Python | mit | ValiMail/arc_test_suite | #! /usr/bin/env python3
from setuptools.command import easy_install
requires = ["dnslib", "dkimpy>=0.7.1", "pyyaml", "ddt", "authheaders"]
for module in requires:
easy_install.main( ["-U",module] )
Use pip instead of easy_install | #! /usr/bin/env python3
import subprocess
import sys
requires = ["dnslib", "dkimpy>=0.7.1", "pyyaml", "ddt", "authheaders"]
def install(package):
subprocess.call([sys.executable, "-m", "pip", "install", package])
for module in requires:
install(module)
| <commit_before>#! /usr/bin/env python3
from setuptools.command import easy_install
requires = ["dnslib", "dkimpy>=0.7.1", "pyyaml", "ddt", "authheaders"]
for module in requires:
easy_install.main( ["-U",module] )
<commit_msg>Use pip instead of easy_install<commit_after> | #! /usr/bin/env python3
import subprocess
import sys
requires = ["dnslib", "dkimpy>=0.7.1", "pyyaml", "ddt", "authheaders"]
def install(package):
subprocess.call([sys.executable, "-m", "pip", "install", package])
for module in requires:
install(module)
| #! /usr/bin/env python3
from setuptools.command import easy_install
requires = ["dnslib", "dkimpy>=0.7.1", "pyyaml", "ddt", "authheaders"]
for module in requires:
easy_install.main( ["-U",module] )
Use pip instead of easy_install#! /usr/bin/env python3
import subprocess
import sys
requires = ["dnslib", "dkimpy... | <commit_before>#! /usr/bin/env python3
from setuptools.command import easy_install
requires = ["dnslib", "dkimpy>=0.7.1", "pyyaml", "ddt", "authheaders"]
for module in requires:
easy_install.main( ["-U",module] )
<commit_msg>Use pip instead of easy_install<commit_after>#! /usr/bin/env python3
import subprocess
... |
3171e7e355536f41a6c517ca7128a152c2577829 | anndata/tests/test_uns.py | anndata/tests/test_uns.py | import numpy as np
import pandas as pd
from anndata import AnnData
def test_uns_color_subset():
# Tests for https://github.com/theislab/anndata/issues/257
obs = pd.DataFrame(index=[f"cell{i}" for i in range(5)])
obs["cat1"] = pd.Series(list("aabcd"), index=obs.index, dtype="category")
obs["cat2"] = p... | import numpy as np
import pandas as pd
from anndata import AnnData
def test_uns_color_subset():
# Tests for https://github.com/theislab/anndata/issues/257
obs = pd.DataFrame(index=[f"cell{i}" for i in range(5)])
obs["cat1"] = pd.Series(list("aabcd"), index=obs.index, dtype="category")
obs["cat2"] = p... | Add test for categorical colors staying around after subsetting | Add test for categorical colors staying around after subsetting
| Python | bsd-3-clause | theislab/anndata | import numpy as np
import pandas as pd
from anndata import AnnData
def test_uns_color_subset():
# Tests for https://github.com/theislab/anndata/issues/257
obs = pd.DataFrame(index=[f"cell{i}" for i in range(5)])
obs["cat1"] = pd.Series(list("aabcd"), index=obs.index, dtype="category")
obs["cat2"] = p... | import numpy as np
import pandas as pd
from anndata import AnnData
def test_uns_color_subset():
# Tests for https://github.com/theislab/anndata/issues/257
obs = pd.DataFrame(index=[f"cell{i}" for i in range(5)])
obs["cat1"] = pd.Series(list("aabcd"), index=obs.index, dtype="category")
obs["cat2"] = p... | <commit_before>import numpy as np
import pandas as pd
from anndata import AnnData
def test_uns_color_subset():
# Tests for https://github.com/theislab/anndata/issues/257
obs = pd.DataFrame(index=[f"cell{i}" for i in range(5)])
obs["cat1"] = pd.Series(list("aabcd"), index=obs.index, dtype="category")
... | import numpy as np
import pandas as pd
from anndata import AnnData
def test_uns_color_subset():
# Tests for https://github.com/theislab/anndata/issues/257
obs = pd.DataFrame(index=[f"cell{i}" for i in range(5)])
obs["cat1"] = pd.Series(list("aabcd"), index=obs.index, dtype="category")
obs["cat2"] = p... | import numpy as np
import pandas as pd
from anndata import AnnData
def test_uns_color_subset():
# Tests for https://github.com/theislab/anndata/issues/257
obs = pd.DataFrame(index=[f"cell{i}" for i in range(5)])
obs["cat1"] = pd.Series(list("aabcd"), index=obs.index, dtype="category")
obs["cat2"] = p... | <commit_before>import numpy as np
import pandas as pd
from anndata import AnnData
def test_uns_color_subset():
# Tests for https://github.com/theislab/anndata/issues/257
obs = pd.DataFrame(index=[f"cell{i}" for i in range(5)])
obs["cat1"] = pd.Series(list("aabcd"), index=obs.index, dtype="category")
... |
2dece45476170e24e14903f19f9bf400c10ebf42 | djangocms_wow/cms_plugins.py | djangocms_wow/cms_plugins.py | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from . import models
class AnimationPlugin(CMSPluginBase):
model = models.Animation
name = _('Animation')
render_template = 'djangocms_wow/ani... | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from . import models
class AnimationPlugin(CMSPluginBase):
model = models.Animation
name = _('Animation')
render_template = 'djangocms_wow/ani... | Allow WOW animations to be used in text plugin. | Allow WOW animations to be used in text plugin.
| Python | bsd-3-clause | narayanaditya95/djangocms-wow,narayanaditya95/djangocms-wow,narayanaditya95/djangocms-wow | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from . import models
class AnimationPlugin(CMSPluginBase):
model = models.Animation
name = _('Animation')
render_template = 'djangocms_wow/ani... | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from . import models
class AnimationPlugin(CMSPluginBase):
model = models.Animation
name = _('Animation')
render_template = 'djangocms_wow/ani... | <commit_before># -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from . import models
class AnimationPlugin(CMSPluginBase):
model = models.Animation
name = _('Animation')
render_template = 'dj... | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from . import models
class AnimationPlugin(CMSPluginBase):
model = models.Animation
name = _('Animation')
render_template = 'djangocms_wow/ani... | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from . import models
class AnimationPlugin(CMSPluginBase):
model = models.Animation
name = _('Animation')
render_template = 'djangocms_wow/ani... | <commit_before># -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from . import models
class AnimationPlugin(CMSPluginBase):
model = models.Animation
name = _('Animation')
render_template = 'dj... |
50eba1720cd34684eaf0a931e28474ad987ea699 | asana/resources/events.py | asana/resources/events.py |
from ._events import _Events
from ..error import InvalidTokenError
import time
class Events(_Events):
POLL_INTERVAL = 1000
def get_next(self, params):
params = params.copy()
if 'sync' not in params:
try:
self.get(params)
except InvalidTokenError as e:
... |
from ._events import _Events
from ..error import InvalidTokenError
import time
class Events(_Events):
POLL_INTERVAL = 5000
def get_next(self, params):
params = params.copy()
if 'sync' not in params:
try:
self.get(params)
except InvalidTokenError as e:
... | Change polling interval to 5 seconds | Change polling interval to 5 seconds
| Python | mit | asana/python-asana,asana/python-asana,Asana/python-asana |
from ._events import _Events
from ..error import InvalidTokenError
import time
class Events(_Events):
POLL_INTERVAL = 1000
def get_next(self, params):
params = params.copy()
if 'sync' not in params:
try:
self.get(params)
except InvalidTokenError as e:
... |
from ._events import _Events
from ..error import InvalidTokenError
import time
class Events(_Events):
POLL_INTERVAL = 5000
def get_next(self, params):
params = params.copy()
if 'sync' not in params:
try:
self.get(params)
except InvalidTokenError as e:
... | <commit_before>
from ._events import _Events
from ..error import InvalidTokenError
import time
class Events(_Events):
POLL_INTERVAL = 1000
def get_next(self, params):
params = params.copy()
if 'sync' not in params:
try:
self.get(params)
except InvalidTo... |
from ._events import _Events
from ..error import InvalidTokenError
import time
class Events(_Events):
POLL_INTERVAL = 5000
def get_next(self, params):
params = params.copy()
if 'sync' not in params:
try:
self.get(params)
except InvalidTokenError as e:
... |
from ._events import _Events
from ..error import InvalidTokenError
import time
class Events(_Events):
POLL_INTERVAL = 1000
def get_next(self, params):
params = params.copy()
if 'sync' not in params:
try:
self.get(params)
except InvalidTokenError as e:
... | <commit_before>
from ._events import _Events
from ..error import InvalidTokenError
import time
class Events(_Events):
POLL_INTERVAL = 1000
def get_next(self, params):
params = params.copy()
if 'sync' not in params:
try:
self.get(params)
except InvalidTo... |
c81b07f93253acc49cbc5028ec83e5334fb47ed9 | flask_admin/model/typefmt.py | flask_admin/model/typefmt.py | from jinja2 import Markup
from flask_admin._compat import text_type
def null_formatter(view, value):
"""
Return `NULL` as the string for `None` value
:param value:
Value to check
"""
return Markup('<i>NULL</i>')
def empty_formatter(view, value):
"""
Return empty ... | from jinja2 import Markup
from flask_admin._compat import text_type
try:
from enum import Enum
except ImportError:
Enum = None
def null_formatter(view, value):
"""
Return `NULL` as the string for `None` value
:param value:
Value to check
"""
return Markup('<i>NULL</i>'... | Add default type formatters for Enum | Add default type formatters for Enum
| Python | bsd-3-clause | jschneier/flask-admin,jschneier/flask-admin,jschneier/flask-admin,jmagnusson/flask-admin,likaiguo/flask-admin,quokkaproject/flask-admin,flask-admin/flask-admin,lifei/flask-admin,likaiguo/flask-admin,ArtemSerga/flask-admin,iurisilvio/flask-admin,flask-admin/flask-admin,flask-admin/flask-admin,jschneier/flask-admin,jmagn... | from jinja2 import Markup
from flask_admin._compat import text_type
def null_formatter(view, value):
"""
Return `NULL` as the string for `None` value
:param value:
Value to check
"""
return Markup('<i>NULL</i>')
def empty_formatter(view, value):
"""
Return empty ... | from jinja2 import Markup
from flask_admin._compat import text_type
try:
from enum import Enum
except ImportError:
Enum = None
def null_formatter(view, value):
"""
Return `NULL` as the string for `None` value
:param value:
Value to check
"""
return Markup('<i>NULL</i>'... | <commit_before>from jinja2 import Markup
from flask_admin._compat import text_type
def null_formatter(view, value):
"""
Return `NULL` as the string for `None` value
:param value:
Value to check
"""
return Markup('<i>NULL</i>')
def empty_formatter(view, value):
"""
... | from jinja2 import Markup
from flask_admin._compat import text_type
try:
from enum import Enum
except ImportError:
Enum = None
def null_formatter(view, value):
"""
Return `NULL` as the string for `None` value
:param value:
Value to check
"""
return Markup('<i>NULL</i>'... | from jinja2 import Markup
from flask_admin._compat import text_type
def null_formatter(view, value):
"""
Return `NULL` as the string for `None` value
:param value:
Value to check
"""
return Markup('<i>NULL</i>')
def empty_formatter(view, value):
"""
Return empty ... | <commit_before>from jinja2 import Markup
from flask_admin._compat import text_type
def null_formatter(view, value):
"""
Return `NULL` as the string for `None` value
:param value:
Value to check
"""
return Markup('<i>NULL</i>')
def empty_formatter(view, value):
"""
... |
a2fd2436cb1c0285dfdd18fad43e505d7c246535 | modules/module_spotify.py | modules/module_spotify.py |
import re
import urllib
def handle_url(bot, user, channel, url, msg):
"""Handle IMDB urls"""
m = re.match("(http:\/\/open.spotify.com\/|spotify:)(album|artist|track)([:\/])([a-zA-Z0-9]+)\/?", url)
if not m: return
dataurl = "http://spotify.url.fi/%s/%s?txt" % (m.group(2), m.group(4))
f = ur... | import re
import urllib
def do_spotify(bot, user, channel, dataurl):
f = urllib.urlopen(dataurl)
songinfo = f.read()
f.close()
artist, album, song = songinfo.split("/", 2)
bot.say(channel, "[Spotify] %s - %s (%s)" % (artist.strip(), song.strip(), album.strip()))
def handle_privmsg(bot, user,... | Handle spotify: -type urls Cleanup | Handle spotify: -type urls
Cleanup
git-svn-id: 056f9092885898c4775d98c479d2d33d00273e45@144 dda364a1-ef19-0410-af65-756c83048fb2
| Python | bsd-3-clause | rnyberg/pyfibot,huqa/pyfibot,lepinkainen/pyfibot,EArmour/pyfibot,nigeljonez/newpyfibot,EArmour/pyfibot,huqa/pyfibot,lepinkainen/pyfibot,rnyberg/pyfibot,aapa/pyfibot,aapa/pyfibot |
import re
import urllib
def handle_url(bot, user, channel, url, msg):
"""Handle IMDB urls"""
m = re.match("(http:\/\/open.spotify.com\/|spotify:)(album|artist|track)([:\/])([a-zA-Z0-9]+)\/?", url)
if not m: return
dataurl = "http://spotify.url.fi/%s/%s?txt" % (m.group(2), m.group(4))
f = ur... | import re
import urllib
def do_spotify(bot, user, channel, dataurl):
f = urllib.urlopen(dataurl)
songinfo = f.read()
f.close()
artist, album, song = songinfo.split("/", 2)
bot.say(channel, "[Spotify] %s - %s (%s)" % (artist.strip(), song.strip(), album.strip()))
def handle_privmsg(bot, user,... | <commit_before>
import re
import urllib
def handle_url(bot, user, channel, url, msg):
"""Handle IMDB urls"""
m = re.match("(http:\/\/open.spotify.com\/|spotify:)(album|artist|track)([:\/])([a-zA-Z0-9]+)\/?", url)
if not m: return
dataurl = "http://spotify.url.fi/%s/%s?txt" % (m.group(2), m.group(... | import re
import urllib
def do_spotify(bot, user, channel, dataurl):
f = urllib.urlopen(dataurl)
songinfo = f.read()
f.close()
artist, album, song = songinfo.split("/", 2)
bot.say(channel, "[Spotify] %s - %s (%s)" % (artist.strip(), song.strip(), album.strip()))
def handle_privmsg(bot, user,... |
import re
import urllib
def handle_url(bot, user, channel, url, msg):
"""Handle IMDB urls"""
m = re.match("(http:\/\/open.spotify.com\/|spotify:)(album|artist|track)([:\/])([a-zA-Z0-9]+)\/?", url)
if not m: return
dataurl = "http://spotify.url.fi/%s/%s?txt" % (m.group(2), m.group(4))
f = ur... | <commit_before>
import re
import urllib
def handle_url(bot, user, channel, url, msg):
"""Handle IMDB urls"""
m = re.match("(http:\/\/open.spotify.com\/|spotify:)(album|artist|track)([:\/])([a-zA-Z0-9]+)\/?", url)
if not m: return
dataurl = "http://spotify.url.fi/%s/%s?txt" % (m.group(2), m.group(... |
99fba41b7392b1e5e4216145f1e8913698b60914 | mopidy_gmusic/commands.py | mopidy_gmusic/commands.py | import gmusicapi
from mopidy import commands
from oauth2client.client import OAuth2WebServerFlow
class GMusicCommand(commands.Command):
def __init__(self):
super().__init__()
self.add_child("login", LoginCommand())
class LoginCommand(commands.Command):
def run(self, args, config):
oa... | import gmusicapi
from mopidy import commands
from oauth2client.client import OAuth2WebServerFlow
class GMusicCommand(commands.Command):
def __init__(self):
super().__init__()
self.add_child("login", LoginCommand())
class LoginCommand(commands.Command):
def run(self, args, config):
oa... | Remove Python 2 compatibility code | py3: Remove Python 2 compatibility code
| Python | apache-2.0 | hechtus/mopidy-gmusic,mopidy/mopidy-gmusic | import gmusicapi
from mopidy import commands
from oauth2client.client import OAuth2WebServerFlow
class GMusicCommand(commands.Command):
def __init__(self):
super().__init__()
self.add_child("login", LoginCommand())
class LoginCommand(commands.Command):
def run(self, args, config):
oa... | import gmusicapi
from mopidy import commands
from oauth2client.client import OAuth2WebServerFlow
class GMusicCommand(commands.Command):
def __init__(self):
super().__init__()
self.add_child("login", LoginCommand())
class LoginCommand(commands.Command):
def run(self, args, config):
oa... | <commit_before>import gmusicapi
from mopidy import commands
from oauth2client.client import OAuth2WebServerFlow
class GMusicCommand(commands.Command):
def __init__(self):
super().__init__()
self.add_child("login", LoginCommand())
class LoginCommand(commands.Command):
def run(self, args, conf... | import gmusicapi
from mopidy import commands
from oauth2client.client import OAuth2WebServerFlow
class GMusicCommand(commands.Command):
def __init__(self):
super().__init__()
self.add_child("login", LoginCommand())
class LoginCommand(commands.Command):
def run(self, args, config):
oa... | import gmusicapi
from mopidy import commands
from oauth2client.client import OAuth2WebServerFlow
class GMusicCommand(commands.Command):
def __init__(self):
super().__init__()
self.add_child("login", LoginCommand())
class LoginCommand(commands.Command):
def run(self, args, config):
oa... | <commit_before>import gmusicapi
from mopidy import commands
from oauth2client.client import OAuth2WebServerFlow
class GMusicCommand(commands.Command):
def __init__(self):
super().__init__()
self.add_child("login", LoginCommand())
class LoginCommand(commands.Command):
def run(self, args, conf... |
8521837cc3f57e11278fc41bfd0e5d106fc140fe | deflect/views.py | deflect/views.py | from __future__ import unicode_literals
import base32_crockford
import logging
from django.db.models import F
from django.http import Http404
from django.http import HttpResponsePermanentRedirect
from django.shortcuts import get_object_or_404
from django.utils.timezone import now
from .models import ShortURL
from .m... | from __future__ import unicode_literals
import base32_crockford
import logging
from django.db.models import F
from django.http import Http404
from django.http import HttpResponsePermanentRedirect
from django.shortcuts import get_object_or_404
from django.utils.timezone import now
from .models import ShortURL
from .m... | Simplify database query when looking up an alias | Simplify database query when looking up an alias
| Python | bsd-3-clause | jbittel/django-deflect | from __future__ import unicode_literals
import base32_crockford
import logging
from django.db.models import F
from django.http import Http404
from django.http import HttpResponsePermanentRedirect
from django.shortcuts import get_object_or_404
from django.utils.timezone import now
from .models import ShortURL
from .m... | from __future__ import unicode_literals
import base32_crockford
import logging
from django.db.models import F
from django.http import Http404
from django.http import HttpResponsePermanentRedirect
from django.shortcuts import get_object_or_404
from django.utils.timezone import now
from .models import ShortURL
from .m... | <commit_before>from __future__ import unicode_literals
import base32_crockford
import logging
from django.db.models import F
from django.http import Http404
from django.http import HttpResponsePermanentRedirect
from django.shortcuts import get_object_or_404
from django.utils.timezone import now
from .models import S... | from __future__ import unicode_literals
import base32_crockford
import logging
from django.db.models import F
from django.http import Http404
from django.http import HttpResponsePermanentRedirect
from django.shortcuts import get_object_or_404
from django.utils.timezone import now
from .models import ShortURL
from .m... | from __future__ import unicode_literals
import base32_crockford
import logging
from django.db.models import F
from django.http import Http404
from django.http import HttpResponsePermanentRedirect
from django.shortcuts import get_object_or_404
from django.utils.timezone import now
from .models import ShortURL
from .m... | <commit_before>from __future__ import unicode_literals
import base32_crockford
import logging
from django.db.models import F
from django.http import Http404
from django.http import HttpResponsePermanentRedirect
from django.shortcuts import get_object_or_404
from django.utils.timezone import now
from .models import S... |
c322e4f2202f3b004a4f41bd4c2786f88292cf37 | deconstrst/deconstrst.py | deconstrst/deconstrst.py | # -*- coding: utf-8 -*-
import argparse
import sys
from os import path
from builder import DeconstJSONBuilder
from sphinx.application import Sphinx
from sphinx.builders import BUILTIN_BUILDERS
def build(argv):
"""
Invoke Sphinx with locked arguments to generate JSON content.
"""
parser = argparse.A... | # -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import sys
import os
from builder import DeconstJSONBuilder
from sphinx.application import Sphinx
from sphinx.builders import BUILTIN_BUILDERS
def build(argv):
"""
Invoke Sphinx with locked arguments to generate JSON content.
... | Validate the presence of CONTENT_STORE. | Validate the presence of CONTENT_STORE.
| Python | apache-2.0 | ktbartholomew/preparer-sphinx,ktbartholomew/preparer-sphinx,deconst/preparer-sphinx,deconst/preparer-sphinx | # -*- coding: utf-8 -*-
import argparse
import sys
from os import path
from builder import DeconstJSONBuilder
from sphinx.application import Sphinx
from sphinx.builders import BUILTIN_BUILDERS
def build(argv):
"""
Invoke Sphinx with locked arguments to generate JSON content.
"""
parser = argparse.A... | # -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import sys
import os
from builder import DeconstJSONBuilder
from sphinx.application import Sphinx
from sphinx.builders import BUILTIN_BUILDERS
def build(argv):
"""
Invoke Sphinx with locked arguments to generate JSON content.
... | <commit_before># -*- coding: utf-8 -*-
import argparse
import sys
from os import path
from builder import DeconstJSONBuilder
from sphinx.application import Sphinx
from sphinx.builders import BUILTIN_BUILDERS
def build(argv):
"""
Invoke Sphinx with locked arguments to generate JSON content.
"""
pars... | # -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import sys
import os
from builder import DeconstJSONBuilder
from sphinx.application import Sphinx
from sphinx.builders import BUILTIN_BUILDERS
def build(argv):
"""
Invoke Sphinx with locked arguments to generate JSON content.
... | # -*- coding: utf-8 -*-
import argparse
import sys
from os import path
from builder import DeconstJSONBuilder
from sphinx.application import Sphinx
from sphinx.builders import BUILTIN_BUILDERS
def build(argv):
"""
Invoke Sphinx with locked arguments to generate JSON content.
"""
parser = argparse.A... | <commit_before># -*- coding: utf-8 -*-
import argparse
import sys
from os import path
from builder import DeconstJSONBuilder
from sphinx.application import Sphinx
from sphinx.builders import BUILTIN_BUILDERS
def build(argv):
"""
Invoke Sphinx with locked arguments to generate JSON content.
"""
pars... |
88de184c1d9daa79e47873b0bd8912ea67b32ec1 | app/__init__.py | app/__init__.py | from flask import Flask
import base64
import json
from config import config as configs
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsearch()
def create_app(config_name):
... | from flask import Flask
import base64
import json
from config import config as configs
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsearch()
def create_app(config_name):
... | Change the VCAP_SERVICE key for elasticsearch | Change the VCAP_SERVICE key for elasticsearch
GOV.UK PaaS have recently changed the name of their elasticsearch service in preparation for migration.
This quick fix will work until elasticsearch-compose is withdrawn; a future solution should use a more robust way of determining the elasticsearch URI.
| Python | mit | alphagov/digitalmarketplace-search-api,alphagov/digitalmarketplace-search-api | from flask import Flask
import base64
import json
from config import config as configs
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsearch()
def create_app(config_name):
... | from flask import Flask
import base64
import json
from config import config as configs
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsearch()
def create_app(config_name):
... | <commit_before>from flask import Flask
import base64
import json
from config import config as configs
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsearch()
def create_app(con... | from flask import Flask
import base64
import json
from config import config as configs
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsearch()
def create_app(config_name):
... | from flask import Flask
import base64
import json
from config import config as configs
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsearch()
def create_app(config_name):
... | <commit_before>from flask import Flask
import base64
import json
from config import config as configs
from flask.ext.elasticsearch import FlaskElasticsearch
from dmutils import init_app, flask_featureflags
feature_flags = flask_featureflags.FeatureFlag()
elasticsearch_client = FlaskElasticsearch()
def create_app(con... |
15f1abef288411539b512f6bdb572c4a54aa5447 | airflow/migrations/versions/127d2bf2dfa7_add_dag_id_state_index_on_dag_run_table.py | airflow/migrations/versions/127d2bf2dfa7_add_dag_id_state_index_on_dag_run_table.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 the ... | #
# 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 the ... | Correct down_revision dag_id/state index creation | [AIRFLOW-810] Correct down_revision dag_id/state index creation
Due to revert the revision were not correct anymore and an unclean
build environment would still consider it for alembic migrations.
| Python | apache-2.0 | lyft/incubator-airflow,artwr/airflow,mrkm4ntr/incubator-airflow,stverhae/incubator-airflow,hamedhsn/incubator-airflow,OpringaoDoTurno/airflow,dgies/incubator-airflow,preete-dixit-ck/incubator-airflow,AllisonWang/incubator-airflow,gilt/incubator-airflow,mtagle/airflow,malmiron/incubator-airflow,sekikn/incubator-airflow,... | #
# 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 the ... | #
# 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 the ... | <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
# distrib... | #
# 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 the ... | #
# 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 the ... | <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
# distrib... |
c037f405de773a3c9e9a7affedf2ee154a3c1766 | django_q/migrations/0003_auto_20150708_1326.py | django_q/migrations/0003_auto_20150708_1326.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('django_q', '0002_auto_20150630_1624'),
]
operations = [
migrations.AlterModelOptions(
name='failure',
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('django_q', '0002_auto_20150630_1624'),
]
operations = [
migrations.AlterModelOptions(
name='failure',
... | Remove and replace task.id field, instead of Alter | Remove and replace task.id field, instead of Alter | Python | mit | Koed00/django-q | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('django_q', '0002_auto_20150630_1624'),
]
operations = [
migrations.AlterModelOptions(
name='failure',
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('django_q', '0002_auto_20150630_1624'),
]
operations = [
migrations.AlterModelOptions(
name='failure',
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('django_q', '0002_auto_20150630_1624'),
]
operations = [
migrations.AlterModelOptions(
name='failu... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('django_q', '0002_auto_20150630_1624'),
]
operations = [
migrations.AlterModelOptions(
name='failure',
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('django_q', '0002_auto_20150630_1624'),
]
operations = [
migrations.AlterModelOptions(
name='failure',
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('django_q', '0002_auto_20150630_1624'),
]
operations = [
migrations.AlterModelOptions(
name='failu... |
d577545431c1e41a8987497ee116472f20404252 | molly/installer/__init__.py | molly/installer/__init__.py | # Packages which Molly needs, but Pip can't handle
PIP_PACKAGES = [
('PyZ3950', 'git+http://github.com/oucs/PyZ3950.git'), # Custom PyZ3950, contains some bug fixes
('django-compress', 'git+git://github.com/mollyproject/django-compress.git#egg=django-compress'), # Fork of django-compress contains some extra fea... | # Packages which Molly needs, but Pip can't handle
PIP_PACKAGES = [
('PyZ3950', 'git+git://github.com/oucs/PyZ3950.git'), # Custom PyZ3950, contains some bug fixes
('django-compress', 'git+git://github.com/mollyproject/django-compress.git#egg=django-compress'), # Fork of django-compress contains some extra feat... | Change PyZ3950 to use git+git | MOLLY-188: Change PyZ3950 to use git+git
| Python | apache-2.0 | mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject | # Packages which Molly needs, but Pip can't handle
PIP_PACKAGES = [
('PyZ3950', 'git+http://github.com/oucs/PyZ3950.git'), # Custom PyZ3950, contains some bug fixes
('django-compress', 'git+git://github.com/mollyproject/django-compress.git#egg=django-compress'), # Fork of django-compress contains some extra fea... | # Packages which Molly needs, but Pip can't handle
PIP_PACKAGES = [
('PyZ3950', 'git+git://github.com/oucs/PyZ3950.git'), # Custom PyZ3950, contains some bug fixes
('django-compress', 'git+git://github.com/mollyproject/django-compress.git#egg=django-compress'), # Fork of django-compress contains some extra feat... | <commit_before># Packages which Molly needs, but Pip can't handle
PIP_PACKAGES = [
('PyZ3950', 'git+http://github.com/oucs/PyZ3950.git'), # Custom PyZ3950, contains some bug fixes
('django-compress', 'git+git://github.com/mollyproject/django-compress.git#egg=django-compress'), # Fork of django-compress contains... | # Packages which Molly needs, but Pip can't handle
PIP_PACKAGES = [
('PyZ3950', 'git+git://github.com/oucs/PyZ3950.git'), # Custom PyZ3950, contains some bug fixes
('django-compress', 'git+git://github.com/mollyproject/django-compress.git#egg=django-compress'), # Fork of django-compress contains some extra feat... | # Packages which Molly needs, but Pip can't handle
PIP_PACKAGES = [
('PyZ3950', 'git+http://github.com/oucs/PyZ3950.git'), # Custom PyZ3950, contains some bug fixes
('django-compress', 'git+git://github.com/mollyproject/django-compress.git#egg=django-compress'), # Fork of django-compress contains some extra fea... | <commit_before># Packages which Molly needs, but Pip can't handle
PIP_PACKAGES = [
('PyZ3950', 'git+http://github.com/oucs/PyZ3950.git'), # Custom PyZ3950, contains some bug fixes
('django-compress', 'git+git://github.com/mollyproject/django-compress.git#egg=django-compress'), # Fork of django-compress contains... |
423d9b9e294ef20fafbb1cb67a6c54c38112cddb | bot/multithreading/worker.py | bot/multithreading/worker.py | import queue
import threading
class Worker:
def __init__(self, name: str, work_queue: queue.Queue, error_handler: callable):
self.name = name
self.queue = work_queue
# using an event instead of a boolean flag to avoid race conditions between threads
self.end = threading.Event()
... | import queue
import threading
class Worker:
def __init__(self, name: str, work_queue: queue.Queue, error_handler: callable):
self.name = name
self.queue = work_queue
# using an event instead of a boolean flag to avoid race conditions between threads
self.end = threading.Event()
... | Improve Worker resistance against external code exceptions | Improve Worker resistance against external code exceptions
| Python | agpl-3.0 | alvarogzp/telegram-bot,alvarogzp/telegram-bot | import queue
import threading
class Worker:
def __init__(self, name: str, work_queue: queue.Queue, error_handler: callable):
self.name = name
self.queue = work_queue
# using an event instead of a boolean flag to avoid race conditions between threads
self.end = threading.Event()
... | import queue
import threading
class Worker:
def __init__(self, name: str, work_queue: queue.Queue, error_handler: callable):
self.name = name
self.queue = work_queue
# using an event instead of a boolean flag to avoid race conditions between threads
self.end = threading.Event()
... | <commit_before>import queue
import threading
class Worker:
def __init__(self, name: str, work_queue: queue.Queue, error_handler: callable):
self.name = name
self.queue = work_queue
# using an event instead of a boolean flag to avoid race conditions between threads
self.end = thread... | import queue
import threading
class Worker:
def __init__(self, name: str, work_queue: queue.Queue, error_handler: callable):
self.name = name
self.queue = work_queue
# using an event instead of a boolean flag to avoid race conditions between threads
self.end = threading.Event()
... | import queue
import threading
class Worker:
def __init__(self, name: str, work_queue: queue.Queue, error_handler: callable):
self.name = name
self.queue = work_queue
# using an event instead of a boolean flag to avoid race conditions between threads
self.end = threading.Event()
... | <commit_before>import queue
import threading
class Worker:
def __init__(self, name: str, work_queue: queue.Queue, error_handler: callable):
self.name = name
self.queue = work_queue
# using an event instead of a boolean flag to avoid race conditions between threads
self.end = thread... |
46c63fea860217fecf4ca334149970e8df7fd149 | webserver/webTermSuggester.py | webserver/webTermSuggester.py | #!/usr/bin/env python
################################################################################
# Created by Oscar Martinez #
# [email protected] #
#######################################################... | #!/usr/bin/env python
################################################################################
# Created by Oscar Martinez #
# [email protected] #
#######################################################... | Change init param of wordnet | Change init param of wordnet | Python | apache-2.0 | nlesc-sherlock/concept-search,nlesc-sherlock/concept-search,nlesc-sherlock/concept-search,nlesc-sherlock/concept-search | #!/usr/bin/env python
################################################################################
# Created by Oscar Martinez #
# [email protected] #
#######################################################... | #!/usr/bin/env python
################################################################################
# Created by Oscar Martinez #
# [email protected] #
#######################################################... | <commit_before>#!/usr/bin/env python
################################################################################
# Created by Oscar Martinez #
# [email protected] #
########################################... | #!/usr/bin/env python
################################################################################
# Created by Oscar Martinez #
# [email protected] #
#######################################################... | #!/usr/bin/env python
################################################################################
# Created by Oscar Martinez #
# [email protected] #
#######################################################... | <commit_before>#!/usr/bin/env python
################################################################################
# Created by Oscar Martinez #
# [email protected] #
########################################... |
66e2e3bee9996a0cb55c7b802a638e42bc72ccbe | zazu/plugins/astyle_styler.py | zazu/plugins/astyle_styler.py | # -*- coding: utf-8 -*-
"""astyle plugin for zazu"""
import zazu.styler
import zazu.util
__author__ = "Nicholas Wiles"
__copyright__ = "Copyright 2017"
class AstyleStyler(zazu.styler.Styler):
"""Astyle plugin for code styling"""
def style_file(self, file, verbose, dry_run):
"""Run astyle on a file""... | # -*- coding: utf-8 -*-
"""astyle plugin for zazu"""
import zazu.styler
import zazu.util
__author__ = "Nicholas Wiles"
__copyright__ = "Copyright 2017"
class AstyleStyler(zazu.styler.Styler):
"""Astyle plugin for code styling"""
def style_file(self, file, verbose, dry_run):
"""Run astyle on a file""... | Use formatted flag on astyle to simplify code | Use formatted flag on astyle to simplify code
| Python | mit | stopthatcow/zazu,stopthatcow/zazu | # -*- coding: utf-8 -*-
"""astyle plugin for zazu"""
import zazu.styler
import zazu.util
__author__ = "Nicholas Wiles"
__copyright__ = "Copyright 2017"
class AstyleStyler(zazu.styler.Styler):
"""Astyle plugin for code styling"""
def style_file(self, file, verbose, dry_run):
"""Run astyle on a file""... | # -*- coding: utf-8 -*-
"""astyle plugin for zazu"""
import zazu.styler
import zazu.util
__author__ = "Nicholas Wiles"
__copyright__ = "Copyright 2017"
class AstyleStyler(zazu.styler.Styler):
"""Astyle plugin for code styling"""
def style_file(self, file, verbose, dry_run):
"""Run astyle on a file""... | <commit_before># -*- coding: utf-8 -*-
"""astyle plugin for zazu"""
import zazu.styler
import zazu.util
__author__ = "Nicholas Wiles"
__copyright__ = "Copyright 2017"
class AstyleStyler(zazu.styler.Styler):
"""Astyle plugin for code styling"""
def style_file(self, file, verbose, dry_run):
"""Run ast... | # -*- coding: utf-8 -*-
"""astyle plugin for zazu"""
import zazu.styler
import zazu.util
__author__ = "Nicholas Wiles"
__copyright__ = "Copyright 2017"
class AstyleStyler(zazu.styler.Styler):
"""Astyle plugin for code styling"""
def style_file(self, file, verbose, dry_run):
"""Run astyle on a file""... | # -*- coding: utf-8 -*-
"""astyle plugin for zazu"""
import zazu.styler
import zazu.util
__author__ = "Nicholas Wiles"
__copyright__ = "Copyright 2017"
class AstyleStyler(zazu.styler.Styler):
"""Astyle plugin for code styling"""
def style_file(self, file, verbose, dry_run):
"""Run astyle on a file""... | <commit_before># -*- coding: utf-8 -*-
"""astyle plugin for zazu"""
import zazu.styler
import zazu.util
__author__ = "Nicholas Wiles"
__copyright__ = "Copyright 2017"
class AstyleStyler(zazu.styler.Styler):
"""Astyle plugin for code styling"""
def style_file(self, file, verbose, dry_run):
"""Run ast... |
887cb1b1a021b6d4a1952fdeb178e602d8cabfdc | clifford/test/__init__.py | clifford/test/__init__.py | from .test_algebra_initialisation import *
from .test_clifford import *
from .test_io import *
from .test_g3c_tools import *
from .test_tools import *
from .test_g3c_CUDA import *
import unittest
def run_all_tests():
unittest.main()
| import os
import pytest
def run_all_tests(*args):
""" Invoke pytest, forwarding options to pytest.main """
pytest.main([os.path.dirname(__file__)] + list(args))
| Fix `clifford.test.run_all_tests` to use pytest | Fix `clifford.test.run_all_tests` to use pytest
Closes gh-91. Tests can be run with
```python
import clifford.test
clifford.test.run_all_tests()
```
| Python | bsd-3-clause | arsenovic/clifford,arsenovic/clifford | from .test_algebra_initialisation import *
from .test_clifford import *
from .test_io import *
from .test_g3c_tools import *
from .test_tools import *
from .test_g3c_CUDA import *
import unittest
def run_all_tests():
unittest.main()
Fix `clifford.test.run_all_tests` to use pytest
Closes gh-91. Tests can be run ... | import os
import pytest
def run_all_tests(*args):
""" Invoke pytest, forwarding options to pytest.main """
pytest.main([os.path.dirname(__file__)] + list(args))
| <commit_before>from .test_algebra_initialisation import *
from .test_clifford import *
from .test_io import *
from .test_g3c_tools import *
from .test_tools import *
from .test_g3c_CUDA import *
import unittest
def run_all_tests():
unittest.main()
<commit_msg>Fix `clifford.test.run_all_tests` to use pytest
Clos... | import os
import pytest
def run_all_tests(*args):
""" Invoke pytest, forwarding options to pytest.main """
pytest.main([os.path.dirname(__file__)] + list(args))
| from .test_algebra_initialisation import *
from .test_clifford import *
from .test_io import *
from .test_g3c_tools import *
from .test_tools import *
from .test_g3c_CUDA import *
import unittest
def run_all_tests():
unittest.main()
Fix `clifford.test.run_all_tests` to use pytest
Closes gh-91. Tests can be run ... | <commit_before>from .test_algebra_initialisation import *
from .test_clifford import *
from .test_io import *
from .test_g3c_tools import *
from .test_tools import *
from .test_g3c_CUDA import *
import unittest
def run_all_tests():
unittest.main()
<commit_msg>Fix `clifford.test.run_all_tests` to use pytest
Clos... |
c9ef00ff3225aa545cbb1a3da592c9af1bb0791e | django_git/management/commands/git_pull_utils/git_folder_enum.py | django_git/management/commands/git_pull_utils/git_folder_enum.py | from django_git.models import RepoInfo
from tagging.models import Tag, TaggedItem
def enum_git_repo(tag_name="git"):
tag_filter = Tag.objects.filter(name=tag_name)
if tag_filter.exists():
tag = tag_filter[0]
tagged_item_list = TaggedItem.objects.filter(tag__exact=tag.pk)
for tagged_ite... | from django_git.models import RepoInfo
from tagging.models import Tag, TaggedItem
def enum_git_repo(tag_name="git"):
tag_filter = Tag.objects.filter(name=tag_name)
if tag_filter.exists():
tag = tag_filter[0]
tagged_item_list = TaggedItem.objects.filter(tag__exact=tag.pk)
for tagged_ite... | Fix issue when GIT is not tagged. | Fix issue when GIT is not tagged.
| Python | bsd-3-clause | weijia/django-git,weijia/django-git | from django_git.models import RepoInfo
from tagging.models import Tag, TaggedItem
def enum_git_repo(tag_name="git"):
tag_filter = Tag.objects.filter(name=tag_name)
if tag_filter.exists():
tag = tag_filter[0]
tagged_item_list = TaggedItem.objects.filter(tag__exact=tag.pk)
for tagged_ite... | from django_git.models import RepoInfo
from tagging.models import Tag, TaggedItem
def enum_git_repo(tag_name="git"):
tag_filter = Tag.objects.filter(name=tag_name)
if tag_filter.exists():
tag = tag_filter[0]
tagged_item_list = TaggedItem.objects.filter(tag__exact=tag.pk)
for tagged_ite... | <commit_before>from django_git.models import RepoInfo
from tagging.models import Tag, TaggedItem
def enum_git_repo(tag_name="git"):
tag_filter = Tag.objects.filter(name=tag_name)
if tag_filter.exists():
tag = tag_filter[0]
tagged_item_list = TaggedItem.objects.filter(tag__exact=tag.pk)
... | from django_git.models import RepoInfo
from tagging.models import Tag, TaggedItem
def enum_git_repo(tag_name="git"):
tag_filter = Tag.objects.filter(name=tag_name)
if tag_filter.exists():
tag = tag_filter[0]
tagged_item_list = TaggedItem.objects.filter(tag__exact=tag.pk)
for tagged_ite... | from django_git.models import RepoInfo
from tagging.models import Tag, TaggedItem
def enum_git_repo(tag_name="git"):
tag_filter = Tag.objects.filter(name=tag_name)
if tag_filter.exists():
tag = tag_filter[0]
tagged_item_list = TaggedItem.objects.filter(tag__exact=tag.pk)
for tagged_ite... | <commit_before>from django_git.models import RepoInfo
from tagging.models import Tag, TaggedItem
def enum_git_repo(tag_name="git"):
tag_filter = Tag.objects.filter(name=tag_name)
if tag_filter.exists():
tag = tag_filter[0]
tagged_item_list = TaggedItem.objects.filter(tag__exact=tag.pk)
... |
7258923a3fc6467c2aac2c81f108c71e790a9e6b | wtl/wtparser/parsers/regex.py | wtl/wtparser/parsers/regex.py | import re
from itertools import repeat
class RegexParserMixin(object):
quoted_re = r'''(?P<q>"|')(?P<x>.+)(?P=q)'''
version_re = r'''(?P<s>[<>=~]*)\s*(?P<n>.*)'''
def _get_value(self, lines, prefix, regex):
filtered = self._lines_startwith(lines, '{0} '.format(prefix))
return self._match(... | import re
from itertools import repeat
class RegexParserMixin(object):
quoted_re = r'''(?P<q>"|')(?P<x>.+)(?P=q)'''
version_re = r'''(?P<s>[<>=~]*)\s*(?P<n>.*)'''
def _get_value(self, lines, prefix, regex):
filtered = self._lines_startwith(lines, '{0} '.format(prefix))
return self._match(... | Fix bug in RegEx parser mixin | Fix bug in RegEx parser mixin
| Python | mit | elegion/djangodash2013,elegion/djangodash2013 | import re
from itertools import repeat
class RegexParserMixin(object):
quoted_re = r'''(?P<q>"|')(?P<x>.+)(?P=q)'''
version_re = r'''(?P<s>[<>=~]*)\s*(?P<n>.*)'''
def _get_value(self, lines, prefix, regex):
filtered = self._lines_startwith(lines, '{0} '.format(prefix))
return self._match(... | import re
from itertools import repeat
class RegexParserMixin(object):
quoted_re = r'''(?P<q>"|')(?P<x>.+)(?P=q)'''
version_re = r'''(?P<s>[<>=~]*)\s*(?P<n>.*)'''
def _get_value(self, lines, prefix, regex):
filtered = self._lines_startwith(lines, '{0} '.format(prefix))
return self._match(... | <commit_before>import re
from itertools import repeat
class RegexParserMixin(object):
quoted_re = r'''(?P<q>"|')(?P<x>.+)(?P=q)'''
version_re = r'''(?P<s>[<>=~]*)\s*(?P<n>.*)'''
def _get_value(self, lines, prefix, regex):
filtered = self._lines_startwith(lines, '{0} '.format(prefix))
retu... | import re
from itertools import repeat
class RegexParserMixin(object):
quoted_re = r'''(?P<q>"|')(?P<x>.+)(?P=q)'''
version_re = r'''(?P<s>[<>=~]*)\s*(?P<n>.*)'''
def _get_value(self, lines, prefix, regex):
filtered = self._lines_startwith(lines, '{0} '.format(prefix))
return self._match(... | import re
from itertools import repeat
class RegexParserMixin(object):
quoted_re = r'''(?P<q>"|')(?P<x>.+)(?P=q)'''
version_re = r'''(?P<s>[<>=~]*)\s*(?P<n>.*)'''
def _get_value(self, lines, prefix, regex):
filtered = self._lines_startwith(lines, '{0} '.format(prefix))
return self._match(... | <commit_before>import re
from itertools import repeat
class RegexParserMixin(object):
quoted_re = r'''(?P<q>"|')(?P<x>.+)(?P=q)'''
version_re = r'''(?P<s>[<>=~]*)\s*(?P<n>.*)'''
def _get_value(self, lines, prefix, regex):
filtered = self._lines_startwith(lines, '{0} '.format(prefix))
retu... |
9633f3ee1a3431cb373a4652afbfc2cd8b3b4c23 | test_utils/anki/__init__.py | test_utils/anki/__init__.py | import sys
from unittest.mock import MagicMock
class MockAnkiModules:
"""
I'd like to get rid of the situation when this is required, but for now this helps with the situation that
anki modules are not available during test runtime.
"""
modules_list = ['anki', 'anki.hooks', 'anki.exporting', 'anki... | from typing import List
from typing import Optional
import sys
from unittest.mock import MagicMock
class MockAnkiModules:
"""
I'd like to get rid of the situation when this is required, but for now this helps with the situation that
anki modules are not available during test runtime.
"""
module_na... | Allow specifying modules to be mocked | Allow specifying modules to be mocked
| Python | mit | Stvad/CrowdAnki,Stvad/CrowdAnki,Stvad/CrowdAnki | import sys
from unittest.mock import MagicMock
class MockAnkiModules:
"""
I'd like to get rid of the situation when this is required, but for now this helps with the situation that
anki modules are not available during test runtime.
"""
modules_list = ['anki', 'anki.hooks', 'anki.exporting', 'anki... | from typing import List
from typing import Optional
import sys
from unittest.mock import MagicMock
class MockAnkiModules:
"""
I'd like to get rid of the situation when this is required, but for now this helps with the situation that
anki modules are not available during test runtime.
"""
module_na... | <commit_before>import sys
from unittest.mock import MagicMock
class MockAnkiModules:
"""
I'd like to get rid of the situation when this is required, but for now this helps with the situation that
anki modules are not available during test runtime.
"""
modules_list = ['anki', 'anki.hooks', 'anki.ex... | from typing import List
from typing import Optional
import sys
from unittest.mock import MagicMock
class MockAnkiModules:
"""
I'd like to get rid of the situation when this is required, but for now this helps with the situation that
anki modules are not available during test runtime.
"""
module_na... | import sys
from unittest.mock import MagicMock
class MockAnkiModules:
"""
I'd like to get rid of the situation when this is required, but for now this helps with the situation that
anki modules are not available during test runtime.
"""
modules_list = ['anki', 'anki.hooks', 'anki.exporting', 'anki... | <commit_before>import sys
from unittest.mock import MagicMock
class MockAnkiModules:
"""
I'd like to get rid of the situation when this is required, but for now this helps with the situation that
anki modules are not available during test runtime.
"""
modules_list = ['anki', 'anki.hooks', 'anki.ex... |
deb87fefcc7fa76de3ae29ae58e816e49184d100 | openfisca_core/model_api.py | openfisca_core/model_api.py | # -*- coding: utf-8 -*-
from datetime import date # noqa analysis:ignore
from numpy import maximum as max_, minimum as min_, logical_not as not_, where, select # noqa analysis:ignore
from .columns import ( # noqa analysis:ignore
AgeCol,
BoolCol,
DateCol,
EnumCol,
FixedStrCol,
FloatCol,
... | # -*- coding: utf-8 -*-
from datetime import date # noqa analysis:ignore
from numpy import ( # noqa analysis:ignore
logical_not as not_,
maximum as max_,
minimum as min_,
round as round_,
select,
where,
)
from .columns import ( # noqa analysis:ignore
AgeCol,
BoolCol,
DateCol,
... | Add numpy.round to model api | Add numpy.round to model api
| Python | agpl-3.0 | openfisca/openfisca-core,openfisca/openfisca-core | # -*- coding: utf-8 -*-
from datetime import date # noqa analysis:ignore
from numpy import maximum as max_, minimum as min_, logical_not as not_, where, select # noqa analysis:ignore
from .columns import ( # noqa analysis:ignore
AgeCol,
BoolCol,
DateCol,
EnumCol,
FixedStrCol,
FloatCol,
... | # -*- coding: utf-8 -*-
from datetime import date # noqa analysis:ignore
from numpy import ( # noqa analysis:ignore
logical_not as not_,
maximum as max_,
minimum as min_,
round as round_,
select,
where,
)
from .columns import ( # noqa analysis:ignore
AgeCol,
BoolCol,
DateCol,
... | <commit_before># -*- coding: utf-8 -*-
from datetime import date # noqa analysis:ignore
from numpy import maximum as max_, minimum as min_, logical_not as not_, where, select # noqa analysis:ignore
from .columns import ( # noqa analysis:ignore
AgeCol,
BoolCol,
DateCol,
EnumCol,
FixedStrCol,
... | # -*- coding: utf-8 -*-
from datetime import date # noqa analysis:ignore
from numpy import ( # noqa analysis:ignore
logical_not as not_,
maximum as max_,
minimum as min_,
round as round_,
select,
where,
)
from .columns import ( # noqa analysis:ignore
AgeCol,
BoolCol,
DateCol,
... | # -*- coding: utf-8 -*-
from datetime import date # noqa analysis:ignore
from numpy import maximum as max_, minimum as min_, logical_not as not_, where, select # noqa analysis:ignore
from .columns import ( # noqa analysis:ignore
AgeCol,
BoolCol,
DateCol,
EnumCol,
FixedStrCol,
FloatCol,
... | <commit_before># -*- coding: utf-8 -*-
from datetime import date # noqa analysis:ignore
from numpy import maximum as max_, minimum as min_, logical_not as not_, where, select # noqa analysis:ignore
from .columns import ( # noqa analysis:ignore
AgeCol,
BoolCol,
DateCol,
EnumCol,
FixedStrCol,
... |
b6c7338666c89843d734517e7efc8a0336bedd3b | opentreemap/treemap/urls.py | opentreemap/treemap/urls.py | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf.urls import patterns, include, url
from treemap.views import index, settings
urlpatterns = patterns(
'',
url(r'^/$', index),
url(r'^config/settings.js$', settings)
)
| from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf.urls import patterns, include, url
from treemap.views import index, settings
urlpatterns = patterns(
'',
url(r'^$', index),
url(r'^config/settings.js$', settings)
)
| Fix url pattern to stop requiring two trailing slashes. | Fix url pattern to stop requiring two trailing slashes.
In order to match this urlpattern, I had to make a request
to localhost:6060/1// with two trailing slashes required.
| Python | agpl-3.0 | RickMohr/otm-core,RickMohr/otm-core,clever-crow-consulting/otm-core,maurizi/otm-core,recklessromeo/otm-core,maurizi/otm-core,clever-crow-consulting/otm-core,RickMohr/otm-core,recklessromeo/otm-core,maurizi/otm-core,recklessromeo/otm-core,clever-crow-consulting/otm-core,RickMohr/otm-core,recklessromeo/otm-core,maurizi/o... | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf.urls import patterns, include, url
from treemap.views import index, settings
urlpatterns = patterns(
'',
url(r'^/$', index),
url(r'^config/settings.js$', settings)
)
Fix url patt... | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf.urls import patterns, include, url
from treemap.views import index, settings
urlpatterns = patterns(
'',
url(r'^$', index),
url(r'^config/settings.js$', settings)
)
| <commit_before>from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf.urls import patterns, include, url
from treemap.views import index, settings
urlpatterns = patterns(
'',
url(r'^/$', index),
url(r'^config/settings.js$', settings)... | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf.urls import patterns, include, url
from treemap.views import index, settings
urlpatterns = patterns(
'',
url(r'^$', index),
url(r'^config/settings.js$', settings)
)
| from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf.urls import patterns, include, url
from treemap.views import index, settings
urlpatterns = patterns(
'',
url(r'^/$', index),
url(r'^config/settings.js$', settings)
)
Fix url patt... | <commit_before>from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf.urls import patterns, include, url
from treemap.views import index, settings
urlpatterns = patterns(
'',
url(r'^/$', index),
url(r'^config/settings.js$', settings)... |
ccd2afdc687c3d6b7d01bed130e1b0097a4fdc2d | src/damis/run_experiment.py | src/damis/run_experiment.py | import sys
from damis.models import Experiment
exp_pk = sys.argv[1]
exp = Experiment.objects.get(pk=exp_pk)
exp.status = 'FINISHED'
exp.save()
| import sys
from damis.models import Experiment, Connection
from damis.settings import BUILDOUT_DIR
from os.path import splitext
from algorithms.preprocess import transpose
def transpose_data_callable(X, c, *args, **kwargs):
X_absolute = BUILDOUT_DIR + '/var/www' + X
Y = '%s_transposed%s' % splitext(X)
Y_ab... | Implement experiment workflow execution with transpose method. | Implement experiment workflow execution with transpose method.
| Python | agpl-3.0 | InScience/DAMIS-old,InScience/DAMIS-old | import sys
from damis.models import Experiment
exp_pk = sys.argv[1]
exp = Experiment.objects.get(pk=exp_pk)
exp.status = 'FINISHED'
exp.save()
Implement experiment workflow execution with transpose method. | import sys
from damis.models import Experiment, Connection
from damis.settings import BUILDOUT_DIR
from os.path import splitext
from algorithms.preprocess import transpose
def transpose_data_callable(X, c, *args, **kwargs):
X_absolute = BUILDOUT_DIR + '/var/www' + X
Y = '%s_transposed%s' % splitext(X)
Y_ab... | <commit_before>import sys
from damis.models import Experiment
exp_pk = sys.argv[1]
exp = Experiment.objects.get(pk=exp_pk)
exp.status = 'FINISHED'
exp.save()
<commit_msg>Implement experiment workflow execution with transpose method.<commit_after> | import sys
from damis.models import Experiment, Connection
from damis.settings import BUILDOUT_DIR
from os.path import splitext
from algorithms.preprocess import transpose
def transpose_data_callable(X, c, *args, **kwargs):
X_absolute = BUILDOUT_DIR + '/var/www' + X
Y = '%s_transposed%s' % splitext(X)
Y_ab... | import sys
from damis.models import Experiment
exp_pk = sys.argv[1]
exp = Experiment.objects.get(pk=exp_pk)
exp.status = 'FINISHED'
exp.save()
Implement experiment workflow execution with transpose method.import sys
from damis.models import Experiment, Connection
from damis.settings import BUILDOUT_DIR
from os.path im... | <commit_before>import sys
from damis.models import Experiment
exp_pk = sys.argv[1]
exp = Experiment.objects.get(pk=exp_pk)
exp.status = 'FINISHED'
exp.save()
<commit_msg>Implement experiment workflow execution with transpose method.<commit_after>import sys
from damis.models import Experiment, Connection
from damis.set... |
a7b95dada6098dc2837c4072a7820818c6efc538 | molly/apps/feeds/events/urls.py | molly/apps/feeds/events/urls.py | from django.conf.urls.defaults import *
from .views import IndexView, ItemListView, ItemDetailView
urlpatterns = patterns('',
(r'^$',
IndexView, {},
'index'),
(r'^(?P<slug>[a-z\-]+)/$',
ItemListView, {},
'item_list'),
(r'^(?P<slug>[a-z\-]+)/(?P<id>\d+)/$',
ItemDetailView, {... | from django.conf.urls.defaults import *
from .views import IndexView, ItemListView, ItemDetailView
urlpatterns = patterns('',
(r'^$',
IndexView, {},
'index'),
(r'^(?P<slug>[a-z\-]+)/$',
ItemListView, {},
'item-list'),
(r'^(?P<slug>[a-z\-]+)/(?P<id>\d+)/$',
ItemDetailView, {... | Change URLs to format used in templates (consistent with news app) | Change URLs to format used in templates (consistent with news app)
| Python | apache-2.0 | mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject | from django.conf.urls.defaults import *
from .views import IndexView, ItemListView, ItemDetailView
urlpatterns = patterns('',
(r'^$',
IndexView, {},
'index'),
(r'^(?P<slug>[a-z\-]+)/$',
ItemListView, {},
'item_list'),
(r'^(?P<slug>[a-z\-]+)/(?P<id>\d+)/$',
ItemDetailView, {... | from django.conf.urls.defaults import *
from .views import IndexView, ItemListView, ItemDetailView
urlpatterns = patterns('',
(r'^$',
IndexView, {},
'index'),
(r'^(?P<slug>[a-z\-]+)/$',
ItemListView, {},
'item-list'),
(r'^(?P<slug>[a-z\-]+)/(?P<id>\d+)/$',
ItemDetailView, {... | <commit_before>from django.conf.urls.defaults import *
from .views import IndexView, ItemListView, ItemDetailView
urlpatterns = patterns('',
(r'^$',
IndexView, {},
'index'),
(r'^(?P<slug>[a-z\-]+)/$',
ItemListView, {},
'item_list'),
(r'^(?P<slug>[a-z\-]+)/(?P<id>\d+)/$',
It... | from django.conf.urls.defaults import *
from .views import IndexView, ItemListView, ItemDetailView
urlpatterns = patterns('',
(r'^$',
IndexView, {},
'index'),
(r'^(?P<slug>[a-z\-]+)/$',
ItemListView, {},
'item-list'),
(r'^(?P<slug>[a-z\-]+)/(?P<id>\d+)/$',
ItemDetailView, {... | from django.conf.urls.defaults import *
from .views import IndexView, ItemListView, ItemDetailView
urlpatterns = patterns('',
(r'^$',
IndexView, {},
'index'),
(r'^(?P<slug>[a-z\-]+)/$',
ItemListView, {},
'item_list'),
(r'^(?P<slug>[a-z\-]+)/(?P<id>\d+)/$',
ItemDetailView, {... | <commit_before>from django.conf.urls.defaults import *
from .views import IndexView, ItemListView, ItemDetailView
urlpatterns = patterns('',
(r'^$',
IndexView, {},
'index'),
(r'^(?P<slug>[a-z\-]+)/$',
ItemListView, {},
'item_list'),
(r'^(?P<slug>[a-z\-]+)/(?P<id>\d+)/$',
It... |
536716d095b152355dfb00cff713552a96b95857 | calc_weights.py | calc_weights.py | import sys
import megatableau, data_prob
import scipy, scipy.optimize
# Argument parsing
assert len(sys.argv)==2
tableau_file_name = sys.argv[1]
# Read in data
mt = megatableau.MegaTableau(tableau_file_name)
w_0 = -scipy.rand(len(mt.weights))
nonpos_reals = [(-25,0) for wt in mt.weights]
def one_minus_probability(we... | import sys
import megatableau, data_prob
import scipy, scipy.optimize
# Argument parsing
assert len(sys.argv)==2
tableau_file_name = sys.argv[1]
# Read in data
mt = megatableau.MegaTableau(tableau_file_name)
w_0 = -scipy.rand(len(mt.weights))
nonpos_reals = [(-25,0) for wt in mt.weights]
def one_minus_probability(we... | Comment out lines accidentally left in the last commit. Oops. | Comment out lines accidentally left in the last commit. Oops.
| Python | bsd-3-clause | rdaland/PhoMEnt | import sys
import megatableau, data_prob
import scipy, scipy.optimize
# Argument parsing
assert len(sys.argv)==2
tableau_file_name = sys.argv[1]
# Read in data
mt = megatableau.MegaTableau(tableau_file_name)
w_0 = -scipy.rand(len(mt.weights))
nonpos_reals = [(-25,0) for wt in mt.weights]
def one_minus_probability(we... | import sys
import megatableau, data_prob
import scipy, scipy.optimize
# Argument parsing
assert len(sys.argv)==2
tableau_file_name = sys.argv[1]
# Read in data
mt = megatableau.MegaTableau(tableau_file_name)
w_0 = -scipy.rand(len(mt.weights))
nonpos_reals = [(-25,0) for wt in mt.weights]
def one_minus_probability(we... | <commit_before>import sys
import megatableau, data_prob
import scipy, scipy.optimize
# Argument parsing
assert len(sys.argv)==2
tableau_file_name = sys.argv[1]
# Read in data
mt = megatableau.MegaTableau(tableau_file_name)
w_0 = -scipy.rand(len(mt.weights))
nonpos_reals = [(-25,0) for wt in mt.weights]
def one_minus... | import sys
import megatableau, data_prob
import scipy, scipy.optimize
# Argument parsing
assert len(sys.argv)==2
tableau_file_name = sys.argv[1]
# Read in data
mt = megatableau.MegaTableau(tableau_file_name)
w_0 = -scipy.rand(len(mt.weights))
nonpos_reals = [(-25,0) for wt in mt.weights]
def one_minus_probability(we... | import sys
import megatableau, data_prob
import scipy, scipy.optimize
# Argument parsing
assert len(sys.argv)==2
tableau_file_name = sys.argv[1]
# Read in data
mt = megatableau.MegaTableau(tableau_file_name)
w_0 = -scipy.rand(len(mt.weights))
nonpos_reals = [(-25,0) for wt in mt.weights]
def one_minus_probability(we... | <commit_before>import sys
import megatableau, data_prob
import scipy, scipy.optimize
# Argument parsing
assert len(sys.argv)==2
tableau_file_name = sys.argv[1]
# Read in data
mt = megatableau.MegaTableau(tableau_file_name)
w_0 = -scipy.rand(len(mt.weights))
nonpos_reals = [(-25,0) for wt in mt.weights]
def one_minus... |
00cea9f8e51f53f338e19adf0165031d2f9cad77 | c2corg_ui/templates/utils/format.py | c2corg_ui/templates/utils/format.py | import bbcode
import markdown
import html
from c2corg_ui.format.wikilinks import C2CWikiLinkExtension
_markdown_parser = None
_bbcode_parser = None
def _get_markdown_parser():
global _markdown_parser
if not _markdown_parser:
extensions = [
C2CWikiLinkExtension(),
]
_mark... | import bbcode
import markdown
import html
from c2corg_ui.format.wikilinks import C2CWikiLinkExtension
from markdown.extensions.nl2br import Nl2BrExtension
from markdown.extensions.toc import TocExtension
_markdown_parser = None
_bbcode_parser = None
def _get_markdown_parser():
global _markdown_parser
if no... | Enable markdown extensions for TOC and linebreaks | Enable markdown extensions for TOC and linebreaks
| Python | agpl-3.0 | Courgetteandratatouille/v6_ui,Courgetteandratatouille/v6_ui,olaurendeau/v6_ui,c2corg/v6_ui,c2corg/v6_ui,c2corg/v6_ui,Courgetteandratatouille/v6_ui,olaurendeau/v6_ui,olaurendeau/v6_ui,c2corg/v6_ui,Courgetteandratatouille/v6_ui,olaurendeau/v6_ui | import bbcode
import markdown
import html
from c2corg_ui.format.wikilinks import C2CWikiLinkExtension
_markdown_parser = None
_bbcode_parser = None
def _get_markdown_parser():
global _markdown_parser
if not _markdown_parser:
extensions = [
C2CWikiLinkExtension(),
]
_mark... | import bbcode
import markdown
import html
from c2corg_ui.format.wikilinks import C2CWikiLinkExtension
from markdown.extensions.nl2br import Nl2BrExtension
from markdown.extensions.toc import TocExtension
_markdown_parser = None
_bbcode_parser = None
def _get_markdown_parser():
global _markdown_parser
if no... | <commit_before>import bbcode
import markdown
import html
from c2corg_ui.format.wikilinks import C2CWikiLinkExtension
_markdown_parser = None
_bbcode_parser = None
def _get_markdown_parser():
global _markdown_parser
if not _markdown_parser:
extensions = [
C2CWikiLinkExtension(),
... | import bbcode
import markdown
import html
from c2corg_ui.format.wikilinks import C2CWikiLinkExtension
from markdown.extensions.nl2br import Nl2BrExtension
from markdown.extensions.toc import TocExtension
_markdown_parser = None
_bbcode_parser = None
def _get_markdown_parser():
global _markdown_parser
if no... | import bbcode
import markdown
import html
from c2corg_ui.format.wikilinks import C2CWikiLinkExtension
_markdown_parser = None
_bbcode_parser = None
def _get_markdown_parser():
global _markdown_parser
if not _markdown_parser:
extensions = [
C2CWikiLinkExtension(),
]
_mark... | <commit_before>import bbcode
import markdown
import html
from c2corg_ui.format.wikilinks import C2CWikiLinkExtension
_markdown_parser = None
_bbcode_parser = None
def _get_markdown_parser():
global _markdown_parser
if not _markdown_parser:
extensions = [
C2CWikiLinkExtension(),
... |
fee245628d492f64f3fe02563d3059317d456ed6 | trimesh/interfaces/vhacd.py | trimesh/interfaces/vhacd.py | import os
import platform
from .generic import MeshScript
from ..constants import log
from distutils.spawn import find_executable
_search_path = os.environ['PATH']
if platform.system() == 'Windows':
# split existing path by delimiter
_search_path = [i for i in _search_path.split(';') if len(i) > 0]
_sear... | import os
import platform
from .generic import MeshScript
from ..constants import log
from distutils.spawn import find_executable
_search_path = os.environ['PATH']
if platform.system() == 'Windows':
# split existing path by delimiter
_search_path = [i for i in _search_path.split(';') if len(i) > 0]
_sear... | Use raw string for Windows paths | Use raw string for Windows paths
This avoids:
DeprecationWarning: invalid escape sequence \P
_search_path.append('C:\Program Files') | Python | mit | mikedh/trimesh,mikedh/trimesh,mikedh/trimesh,dajusc/trimesh,dajusc/trimesh,mikedh/trimesh | import os
import platform
from .generic import MeshScript
from ..constants import log
from distutils.spawn import find_executable
_search_path = os.environ['PATH']
if platform.system() == 'Windows':
# split existing path by delimiter
_search_path = [i for i in _search_path.split(';') if len(i) > 0]
_sear... | import os
import platform
from .generic import MeshScript
from ..constants import log
from distutils.spawn import find_executable
_search_path = os.environ['PATH']
if platform.system() == 'Windows':
# split existing path by delimiter
_search_path = [i for i in _search_path.split(';') if len(i) > 0]
_sear... | <commit_before>import os
import platform
from .generic import MeshScript
from ..constants import log
from distutils.spawn import find_executable
_search_path = os.environ['PATH']
if platform.system() == 'Windows':
# split existing path by delimiter
_search_path = [i for i in _search_path.split(';') if len(i)... | import os
import platform
from .generic import MeshScript
from ..constants import log
from distutils.spawn import find_executable
_search_path = os.environ['PATH']
if platform.system() == 'Windows':
# split existing path by delimiter
_search_path = [i for i in _search_path.split(';') if len(i) > 0]
_sear... | import os
import platform
from .generic import MeshScript
from ..constants import log
from distutils.spawn import find_executable
_search_path = os.environ['PATH']
if platform.system() == 'Windows':
# split existing path by delimiter
_search_path = [i for i in _search_path.split(';') if len(i) > 0]
_sear... | <commit_before>import os
import platform
from .generic import MeshScript
from ..constants import log
from distutils.spawn import find_executable
_search_path = os.environ['PATH']
if platform.system() == 'Windows':
# split existing path by delimiter
_search_path = [i for i in _search_path.split(';') if len(i)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.