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
77340cfe9580ec8510f4af9333cf1aba2d09e70b
wagtail/wagtailadmin/tests/test_password_reset.py
wagtail/wagtailadmin/tests/test_password_reset.py
from django.test import TestCase, override_settings from django.core import mail from wagtail.tests.utils import WagtailTestUtils from wagtail.wagtailcore.models import Site class TestUserPasswordReset(TestCase, WagtailTestUtils): fixtures = ['test.json'] # need to clear urlresolver caches before/after test...
Add tests for the password reset emails
Add tests for the password reset emails
Python
bsd-3-clause
quru/wagtail,mixxorz/wagtail,timorieber/wagtail,nilnvoid/wagtail,gasman/wagtail,timorieber/wagtail,Klaudit/wagtail,nutztherookie/wagtail,wagtail/wagtail,marctc/wagtail,zerolab/wagtail,jorge-marques/wagtail,nrsimha/wagtail,mayapurmedia/wagtail,rjsproxy/wagtail,takeshineshiro/wagtail,bjesus/wagtail,kurtw/wagtail,ianspric...
Add tests for the password reset emails
from django.test import TestCase, override_settings from django.core import mail from wagtail.tests.utils import WagtailTestUtils from wagtail.wagtailcore.models import Site class TestUserPasswordReset(TestCase, WagtailTestUtils): fixtures = ['test.json'] # need to clear urlresolver caches before/after test...
<commit_before><commit_msg>Add tests for the password reset emails<commit_after>
from django.test import TestCase, override_settings from django.core import mail from wagtail.tests.utils import WagtailTestUtils from wagtail.wagtailcore.models import Site class TestUserPasswordReset(TestCase, WagtailTestUtils): fixtures = ['test.json'] # need to clear urlresolver caches before/after test...
Add tests for the password reset emailsfrom django.test import TestCase, override_settings from django.core import mail from wagtail.tests.utils import WagtailTestUtils from wagtail.wagtailcore.models import Site class TestUserPasswordReset(TestCase, WagtailTestUtils): fixtures = ['test.json'] # need to cle...
<commit_before><commit_msg>Add tests for the password reset emails<commit_after>from django.test import TestCase, override_settings from django.core import mail from wagtail.tests.utils import WagtailTestUtils from wagtail.wagtailcore.models import Site class TestUserPasswordReset(TestCase, WagtailTestUtils): fi...
5cfb870134d40ecc2330ac2ff0b98cea62232c8d
neurodsp/sim/decorators.py
neurodsp/sim/decorators.py
"""Decorators for neurodsp.sim.""" from functools import wraps from neurodsp.sim.utils import demean, normalize_variance ################################################################################################### ################################################################################################...
Add decorator to apply normalization
Add decorator to apply normalization
Python
apache-2.0
voytekresearch/neurodsp,srcole/neurodsp,srcole/neurodsp
Add decorator to apply normalization
"""Decorators for neurodsp.sim.""" from functools import wraps from neurodsp.sim.utils import demean, normalize_variance ################################################################################################### ################################################################################################...
<commit_before><commit_msg>Add decorator to apply normalization<commit_after>
"""Decorators for neurodsp.sim.""" from functools import wraps from neurodsp.sim.utils import demean, normalize_variance ################################################################################################### ################################################################################################...
Add decorator to apply normalization"""Decorators for neurodsp.sim.""" from functools import wraps from neurodsp.sim.utils import demean, normalize_variance ################################################################################################### ############################################################...
<commit_before><commit_msg>Add decorator to apply normalization<commit_after>"""Decorators for neurodsp.sim.""" from functools import wraps from neurodsp.sim.utils import demean, normalize_variance ################################################################################################### ###################...
a4e4a67b631083535a413d56aaa1afff3b88a67f
pymt/framework/bmi_plot.py
pymt/framework/bmi_plot.py
#! /usr/bin/env python import matplotlib.pyplot as plt def quick_plot(bmi, name, **kwds): gid = bmi.get_var_grid(name) gtype = bmi.get_grid_type(gid) grid = bmi.grid[gid] x, y = grid.node_x.values, grid.node_y.values z = bmi.get_value(name) x_label = '{name} ({units})'.format(name=grid.node_...
Add module for quick plotting of bmi values.
Add module for quick plotting of bmi values.
Python
mit
csdms/coupling,csdms/coupling,csdms/pymt
Add module for quick plotting of bmi values.
#! /usr/bin/env python import matplotlib.pyplot as plt def quick_plot(bmi, name, **kwds): gid = bmi.get_var_grid(name) gtype = bmi.get_grid_type(gid) grid = bmi.grid[gid] x, y = grid.node_x.values, grid.node_y.values z = bmi.get_value(name) x_label = '{name} ({units})'.format(name=grid.node_...
<commit_before><commit_msg>Add module for quick plotting of bmi values.<commit_after>
#! /usr/bin/env python import matplotlib.pyplot as plt def quick_plot(bmi, name, **kwds): gid = bmi.get_var_grid(name) gtype = bmi.get_grid_type(gid) grid = bmi.grid[gid] x, y = grid.node_x.values, grid.node_y.values z = bmi.get_value(name) x_label = '{name} ({units})'.format(name=grid.node_...
Add module for quick plotting of bmi values.#! /usr/bin/env python import matplotlib.pyplot as plt def quick_plot(bmi, name, **kwds): gid = bmi.get_var_grid(name) gtype = bmi.get_grid_type(gid) grid = bmi.grid[gid] x, y = grid.node_x.values, grid.node_y.values z = bmi.get_value(name) x_label...
<commit_before><commit_msg>Add module for quick plotting of bmi values.<commit_after>#! /usr/bin/env python import matplotlib.pyplot as plt def quick_plot(bmi, name, **kwds): gid = bmi.get_var_grid(name) gtype = bmi.get_grid_type(gid) grid = bmi.grid[gid] x, y = grid.node_x.values, grid.node_y.values...
5e8d869c63154820f67308b4293a156b185fab1f
pyface/tests/test_python_editor.py
pyface/tests/test_python_editor.py
from __future__ import absolute_import import os import sys from traits.testing.unittest_tools import unittest, UnittestTools from ..gui import GUI from ..python_editor import PythonEditor from ..window import Window PYTHON_SCRIPT = os.path.join(os.path.dirname(__file__), 'python_shell_script.py') class TestPyth...
Add test for python editor.
Add test for python editor.
Python
bsd-3-clause
geggo/pyface,brett-patterson/pyface,geggo/pyface
Add test for python editor.
from __future__ import absolute_import import os import sys from traits.testing.unittest_tools import unittest, UnittestTools from ..gui import GUI from ..python_editor import PythonEditor from ..window import Window PYTHON_SCRIPT = os.path.join(os.path.dirname(__file__), 'python_shell_script.py') class TestPyth...
<commit_before><commit_msg>Add test for python editor.<commit_after>
from __future__ import absolute_import import os import sys from traits.testing.unittest_tools import unittest, UnittestTools from ..gui import GUI from ..python_editor import PythonEditor from ..window import Window PYTHON_SCRIPT = os.path.join(os.path.dirname(__file__), 'python_shell_script.py') class TestPyth...
Add test for python editor.from __future__ import absolute_import import os import sys from traits.testing.unittest_tools import unittest, UnittestTools from ..gui import GUI from ..python_editor import PythonEditor from ..window import Window PYTHON_SCRIPT = os.path.join(os.path.dirname(__file__), 'python_shell_s...
<commit_before><commit_msg>Add test for python editor.<commit_after>from __future__ import absolute_import import os import sys from traits.testing.unittest_tools import unittest, UnittestTools from ..gui import GUI from ..python_editor import PythonEditor from ..window import Window PYTHON_SCRIPT = os.path.join(o...
50aacf395fef416781b86bb0c09035f2d7cf129e
tests/test_crypto.py
tests/test_crypto.py
#!/usr/bin/env python """Tests for `tiingo` package.""" from unittest import TestCase from tiingo import TiingoClient # CRYPTO ENDPOINTS class TestCryptoEndpoints(TestCase): def setUp(self): self._client = TiingoClient() def test_crypto_metadata(self): metadata = self._client.get_crypto_me...
Add tests for crypto endpoints
Add tests for crypto endpoints
Python
mit
hydrosquall/tiingo-python,hydrosquall/tiingo-python
Add tests for crypto endpoints
#!/usr/bin/env python """Tests for `tiingo` package.""" from unittest import TestCase from tiingo import TiingoClient # CRYPTO ENDPOINTS class TestCryptoEndpoints(TestCase): def setUp(self): self._client = TiingoClient() def test_crypto_metadata(self): metadata = self._client.get_crypto_me...
<commit_before><commit_msg>Add tests for crypto endpoints<commit_after>
#!/usr/bin/env python """Tests for `tiingo` package.""" from unittest import TestCase from tiingo import TiingoClient # CRYPTO ENDPOINTS class TestCryptoEndpoints(TestCase): def setUp(self): self._client = TiingoClient() def test_crypto_metadata(self): metadata = self._client.get_crypto_me...
Add tests for crypto endpoints#!/usr/bin/env python """Tests for `tiingo` package.""" from unittest import TestCase from tiingo import TiingoClient # CRYPTO ENDPOINTS class TestCryptoEndpoints(TestCase): def setUp(self): self._client = TiingoClient() def test_crypto_metadata(self): metadat...
<commit_before><commit_msg>Add tests for crypto endpoints<commit_after>#!/usr/bin/env python """Tests for `tiingo` package.""" from unittest import TestCase from tiingo import TiingoClient # CRYPTO ENDPOINTS class TestCryptoEndpoints(TestCase): def setUp(self): self._client = TiingoClient() def te...
d2d3b27822d5773302f2e1cd28de8b231becb5ea
ports/raspberrypi/boards/solderparty_rp2040_stamp/stamp_round_carrier_board.py
ports/raspberrypi/boards/solderparty_rp2040_stamp/stamp_round_carrier_board.py
from board import * import busio _SPI = None _UART = None _I2C = None D0 = GP0 SDA = D0 D1 = GP1 SCL = D1 D8 = GP8 CIPO = D8 MISO = D8 D9 = GP9 CS = D9 D10 = GP10 SCK = D10 D11 = GP11 COPI = D11 MOSI = D11 D14 = GP14 D15 = GP15 D16 = GP16 TX = D16 D17 = GP17 RX = D17 D26 = GP26 A0 = D26 D27 = GP27 A1 = D27 D28 = GP...
Add a Round Carrier board file to the RP2040 Stamp build
Add a Round Carrier board file to the RP2040 Stamp build
Python
mit
adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython
Add a Round Carrier board file to the RP2040 Stamp build
from board import * import busio _SPI = None _UART = None _I2C = None D0 = GP0 SDA = D0 D1 = GP1 SCL = D1 D8 = GP8 CIPO = D8 MISO = D8 D9 = GP9 CS = D9 D10 = GP10 SCK = D10 D11 = GP11 COPI = D11 MOSI = D11 D14 = GP14 D15 = GP15 D16 = GP16 TX = D16 D17 = GP17 RX = D17 D26 = GP26 A0 = D26 D27 = GP27 A1 = D27 D28 = GP...
<commit_before><commit_msg>Add a Round Carrier board file to the RP2040 Stamp build<commit_after>
from board import * import busio _SPI = None _UART = None _I2C = None D0 = GP0 SDA = D0 D1 = GP1 SCL = D1 D8 = GP8 CIPO = D8 MISO = D8 D9 = GP9 CS = D9 D10 = GP10 SCK = D10 D11 = GP11 COPI = D11 MOSI = D11 D14 = GP14 D15 = GP15 D16 = GP16 TX = D16 D17 = GP17 RX = D17 D26 = GP26 A0 = D26 D27 = GP27 A1 = D27 D28 = GP...
Add a Round Carrier board file to the RP2040 Stamp buildfrom board import * import busio _SPI = None _UART = None _I2C = None D0 = GP0 SDA = D0 D1 = GP1 SCL = D1 D8 = GP8 CIPO = D8 MISO = D8 D9 = GP9 CS = D9 D10 = GP10 SCK = D10 D11 = GP11 COPI = D11 MOSI = D11 D14 = GP14 D15 = GP15 D16 = GP16 TX = D16 D17 = GP17 R...
<commit_before><commit_msg>Add a Round Carrier board file to the RP2040 Stamp build<commit_after>from board import * import busio _SPI = None _UART = None _I2C = None D0 = GP0 SDA = D0 D1 = GP1 SCL = D1 D8 = GP8 CIPO = D8 MISO = D8 D9 = GP9 CS = D9 D10 = GP10 SCK = D10 D11 = GP11 COPI = D11 MOSI = D11 D14 = GP14 D1...
f94d5b3c4eb3fff94c98e9efcdffdafa89f4841b
test/vis_data.py
test/vis_data.py
''' Generate image and ground truth from the scene, for development purpose ''' from unrealcv import client import numpy as np import matplotlib.pyplot as plt def read_png(res): import StringIO, PIL.Image img = PIL.Image.open(StringIO.StringIO(res)) return np.asarray(img) def read_npy(res): import St...
Add a script to generate data for helping development.
Add a script to generate data for helping development.
Python
mit
unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv
Add a script to generate data for helping development.
''' Generate image and ground truth from the scene, for development purpose ''' from unrealcv import client import numpy as np import matplotlib.pyplot as plt def read_png(res): import StringIO, PIL.Image img = PIL.Image.open(StringIO.StringIO(res)) return np.asarray(img) def read_npy(res): import St...
<commit_before><commit_msg>Add a script to generate data for helping development.<commit_after>
''' Generate image and ground truth from the scene, for development purpose ''' from unrealcv import client import numpy as np import matplotlib.pyplot as plt def read_png(res): import StringIO, PIL.Image img = PIL.Image.open(StringIO.StringIO(res)) return np.asarray(img) def read_npy(res): import St...
Add a script to generate data for helping development.''' Generate image and ground truth from the scene, for development purpose ''' from unrealcv import client import numpy as np import matplotlib.pyplot as plt def read_png(res): import StringIO, PIL.Image img = PIL.Image.open(StringIO.StringIO(res)) re...
<commit_before><commit_msg>Add a script to generate data for helping development.<commit_after>''' Generate image and ground truth from the scene, for development purpose ''' from unrealcv import client import numpy as np import matplotlib.pyplot as plt def read_png(res): import StringIO, PIL.Image img = PIL....
af712fedf4963d66f56f5ab9054318c493572ab1
src/oscar/apps/dashboard/shipping/forms.py
src/oscar/apps/dashboard/shipping/forms.py
from django import forms from oscar.core.loading import get_model class WeightBasedForm(forms.ModelForm): class Meta: model = get_model('shipping', 'WeightBased') fields = ['name', 'description', 'default_weight', 'countries'] class WeightBandForm(forms.ModelForm): def __init__(self, meth...
from django import forms from oscar.core.loading import get_model class WeightBasedForm(forms.ModelForm): class Meta: model = get_model('shipping', 'WeightBased') fields = ['description', 'default_weight', 'countries'] class WeightBandForm(forms.ModelForm): def __init__(self, method, *arg...
Remove non-existing field from WeightBasedForm
Remove non-existing field from WeightBasedForm Django 1.10 errors (correctly) on this
Python
bsd-3-clause
okfish/django-oscar,sonofatailor/django-oscar,solarissmoke/django-oscar,sasha0/django-oscar,anentropic/django-oscar,anentropic/django-oscar,solarissmoke/django-oscar,john-parton/django-oscar,sonofatailor/django-oscar,okfish/django-oscar,django-oscar/django-oscar,john-parton/django-oscar,solarissmoke/django-oscar,solari...
from django import forms from oscar.core.loading import get_model class WeightBasedForm(forms.ModelForm): class Meta: model = get_model('shipping', 'WeightBased') fields = ['name', 'description', 'default_weight', 'countries'] class WeightBandForm(forms.ModelForm): def __init__(self, meth...
from django import forms from oscar.core.loading import get_model class WeightBasedForm(forms.ModelForm): class Meta: model = get_model('shipping', 'WeightBased') fields = ['description', 'default_weight', 'countries'] class WeightBandForm(forms.ModelForm): def __init__(self, method, *arg...
<commit_before>from django import forms from oscar.core.loading import get_model class WeightBasedForm(forms.ModelForm): class Meta: model = get_model('shipping', 'WeightBased') fields = ['name', 'description', 'default_weight', 'countries'] class WeightBandForm(forms.ModelForm): def __in...
from django import forms from oscar.core.loading import get_model class WeightBasedForm(forms.ModelForm): class Meta: model = get_model('shipping', 'WeightBased') fields = ['description', 'default_weight', 'countries'] class WeightBandForm(forms.ModelForm): def __init__(self, method, *arg...
from django import forms from oscar.core.loading import get_model class WeightBasedForm(forms.ModelForm): class Meta: model = get_model('shipping', 'WeightBased') fields = ['name', 'description', 'default_weight', 'countries'] class WeightBandForm(forms.ModelForm): def __init__(self, meth...
<commit_before>from django import forms from oscar.core.loading import get_model class WeightBasedForm(forms.ModelForm): class Meta: model = get_model('shipping', 'WeightBased') fields = ['name', 'description', 'default_weight', 'countries'] class WeightBandForm(forms.ModelForm): def __in...
dd14093e23c651e266752267f98170b73c25dc0a
python/logging/multiple_files.py
python/logging/multiple_files.py
import logging class MyFilter(object): def __init__(self, level): self.__level = level def filter(self, logRecord): # https://docs.python.org/3/library/logging.html#logrecord-attributes return logRecord.levelno == self.__level basic_config = { "level": logging.DEBUG, "format"...
Add a more complex example
feat(logging): Add a more complex example This example shows how to use multiple loggers, multiple output destinations and filters.
Python
mit
sblancov/hello_world,sblancov/hello_world,sblancov/hello_world,sblancov/hello_world
feat(logging): Add a more complex example This example shows how to use multiple loggers, multiple output destinations and filters.
import logging class MyFilter(object): def __init__(self, level): self.__level = level def filter(self, logRecord): # https://docs.python.org/3/library/logging.html#logrecord-attributes return logRecord.levelno == self.__level basic_config = { "level": logging.DEBUG, "format"...
<commit_before><commit_msg>feat(logging): Add a more complex example This example shows how to use multiple loggers, multiple output destinations and filters.<commit_after>
import logging class MyFilter(object): def __init__(self, level): self.__level = level def filter(self, logRecord): # https://docs.python.org/3/library/logging.html#logrecord-attributes return logRecord.levelno == self.__level basic_config = { "level": logging.DEBUG, "format"...
feat(logging): Add a more complex example This example shows how to use multiple loggers, multiple output destinations and filters.import logging class MyFilter(object): def __init__(self, level): self.__level = level def filter(self, logRecord): # https://docs.python.org/3/library/logging.h...
<commit_before><commit_msg>feat(logging): Add a more complex example This example shows how to use multiple loggers, multiple output destinations and filters.<commit_after>import logging class MyFilter(object): def __init__(self, level): self.__level = level def filter(self, logRecord): # ht...
661cbfec0f78e37bf6b322b9a59e1b2b1a10c665
tests/test_list_indexes.py
tests/test_list_indexes.py
# Copyright 2015 MongoDB, Inc. # # 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, so...
Test Collection.list_indexes with multiple batches.
Test Collection.list_indexes with multiple batches.
Python
apache-2.0
ajdavis/pymongo-mockup-tests
Test Collection.list_indexes with multiple batches.
# Copyright 2015 MongoDB, Inc. # # 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, so...
<commit_before><commit_msg>Test Collection.list_indexes with multiple batches.<commit_after>
# Copyright 2015 MongoDB, Inc. # # 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, so...
Test Collection.list_indexes with multiple batches.# Copyright 2015 MongoDB, Inc. # # 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 req...
<commit_before><commit_msg>Test Collection.list_indexes with multiple batches.<commit_after># Copyright 2015 MongoDB, Inc. # # 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.apach...
f4082455ebfed1ca878534f13bd2019609131f20
tests/test_modelbackend.py
tests/test_modelbackend.py
from django.test import TestCase from django_backend.backend.base.backends import ModelBackend from django_backend.sitebackend import SiteBackend from .models import OneFieldModel class ModelBackendTest(TestCase): def setUp(self): self.site = SiteBackend(id='test') def get_basic_backend(self, **kwa...
Add basic tests for ModelBackend
Add basic tests for ModelBackend
Python
bsd-3-clause
team23/django_backend,team23/django_backend,team23/django_backend,team23/django_backend,team23/django_backend
Add basic tests for ModelBackend
from django.test import TestCase from django_backend.backend.base.backends import ModelBackend from django_backend.sitebackend import SiteBackend from .models import OneFieldModel class ModelBackendTest(TestCase): def setUp(self): self.site = SiteBackend(id='test') def get_basic_backend(self, **kwa...
<commit_before><commit_msg>Add basic tests for ModelBackend<commit_after>
from django.test import TestCase from django_backend.backend.base.backends import ModelBackend from django_backend.sitebackend import SiteBackend from .models import OneFieldModel class ModelBackendTest(TestCase): def setUp(self): self.site = SiteBackend(id='test') def get_basic_backend(self, **kwa...
Add basic tests for ModelBackendfrom django.test import TestCase from django_backend.backend.base.backends import ModelBackend from django_backend.sitebackend import SiteBackend from .models import OneFieldModel class ModelBackendTest(TestCase): def setUp(self): self.site = SiteBackend(id='test') d...
<commit_before><commit_msg>Add basic tests for ModelBackend<commit_after>from django.test import TestCase from django_backend.backend.base.backends import ModelBackend from django_backend.sitebackend import SiteBackend from .models import OneFieldModel class ModelBackendTest(TestCase): def setUp(self): ...
0cdb99856a929dc6c832f55dbdc013b5eac95a78
labonneboite/alembic/versions/99473cb51564_add_index_on_etablissements_email.py
labonneboite/alembic/versions/99473cb51564_add_index_on_etablissements_email.py
""" add index on etablissements email Revision ID: 99473cb51564 Revises: 200d176f96b6 Create Date: 2018-11-30 15:38:57.294679 """ from alembic import op # Revision identifiers, used by Alembic. revision = '99473cb51564' down_revision = '200d176f96b6' branch_labels = None depends_on = None def upgrade(): op.cre...
Add index on etablissements email for quick scam cleanup performance
Add index on etablissements email for quick scam cleanup performance
Python
agpl-3.0
StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite
Add index on etablissements email for quick scam cleanup performance
""" add index on etablissements email Revision ID: 99473cb51564 Revises: 200d176f96b6 Create Date: 2018-11-30 15:38:57.294679 """ from alembic import op # Revision identifiers, used by Alembic. revision = '99473cb51564' down_revision = '200d176f96b6' branch_labels = None depends_on = None def upgrade(): op.cre...
<commit_before><commit_msg>Add index on etablissements email for quick scam cleanup performance<commit_after>
""" add index on etablissements email Revision ID: 99473cb51564 Revises: 200d176f96b6 Create Date: 2018-11-30 15:38:57.294679 """ from alembic import op # Revision identifiers, used by Alembic. revision = '99473cb51564' down_revision = '200d176f96b6' branch_labels = None depends_on = None def upgrade(): op.cre...
Add index on etablissements email for quick scam cleanup performance""" add index on etablissements email Revision ID: 99473cb51564 Revises: 200d176f96b6 Create Date: 2018-11-30 15:38:57.294679 """ from alembic import op # Revision identifiers, used by Alembic. revision = '99473cb51564' down_revision = '200d176f96b6...
<commit_before><commit_msg>Add index on etablissements email for quick scam cleanup performance<commit_after>""" add index on etablissements email Revision ID: 99473cb51564 Revises: 200d176f96b6 Create Date: 2018-11-30 15:38:57.294679 """ from alembic import op # Revision identifiers, used by Alembic. revision = '99...
97b1e034b8028aff4566d0dcf24d3e1d41c803e9
migrations/versions/0259_remove_service_postage.py
migrations/versions/0259_remove_service_postage.py
""" Revision ID: 0259_remove_service_postage Revises: 0258_service_postage_nullable Create Date: 2019-02-11 17:12:22.341599 """ from alembic import op import sqlalchemy as sa revision = '0259_remove_service_postage' down_revision = '0258_service_postage_nullable' def upgrade(): # ### commands auto generated b...
Remove service.postage and choose_postage permission from database
Remove service.postage and choose_postage permission from database Also change constraint on template postage so it cannot be null for letters Also add postage to all letters in template_history to respect new constraint
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Remove service.postage and choose_postage permission from database Also change constraint on template postage so it cannot be null for letters Also add postage to all letters in template_history to respect new constraint
""" Revision ID: 0259_remove_service_postage Revises: 0258_service_postage_nullable Create Date: 2019-02-11 17:12:22.341599 """ from alembic import op import sqlalchemy as sa revision = '0259_remove_service_postage' down_revision = '0258_service_postage_nullable' def upgrade(): # ### commands auto generated b...
<commit_before><commit_msg>Remove service.postage and choose_postage permission from database Also change constraint on template postage so it cannot be null for letters Also add postage to all letters in template_history to respect new constraint<commit_after>
""" Revision ID: 0259_remove_service_postage Revises: 0258_service_postage_nullable Create Date: 2019-02-11 17:12:22.341599 """ from alembic import op import sqlalchemy as sa revision = '0259_remove_service_postage' down_revision = '0258_service_postage_nullable' def upgrade(): # ### commands auto generated b...
Remove service.postage and choose_postage permission from database Also change constraint on template postage so it cannot be null for letters Also add postage to all letters in template_history to respect new constraint""" Revision ID: 0259_remove_service_postage Revises: 0258_service_postage_nullable Create Date: ...
<commit_before><commit_msg>Remove service.postage and choose_postage permission from database Also change constraint on template postage so it cannot be null for letters Also add postage to all letters in template_history to respect new constraint<commit_after>""" Revision ID: 0259_remove_service_postage Revises: 02...
94d4d79614a86ddee5f03d60c272558c5acf2397
Source/Scm/make_wb_git_images.py
Source/Scm/make_wb_git_images.py
#!/usr/bin/env python3 ''' ==================================================================== Copyright (c) 2003-2016 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===============================...
Add script to make images file
Add script to make images file
Python
apache-2.0
barry-scott/git-workbench,barry-scott/scm-workbench,barry-scott/git-workbench,barry-scott/scm-workbench,barry-scott/scm-workbench
Add script to make images file
#!/usr/bin/env python3 ''' ==================================================================== Copyright (c) 2003-2016 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===============================...
<commit_before><commit_msg>Add script to make images file<commit_after>
#!/usr/bin/env python3 ''' ==================================================================== Copyright (c) 2003-2016 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===============================...
Add script to make images file#!/usr/bin/env python3 ''' ==================================================================== Copyright (c) 2003-2016 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. =...
<commit_before><commit_msg>Add script to make images file<commit_after>#!/usr/bin/env python3 ''' ==================================================================== Copyright (c) 2003-2016 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have r...
4ee7576f2c1999258cb33d07f67951aea3de917c
migrations/versions/cf6ed76ef146_.py
migrations/versions/cf6ed76ef146_.py
"""Add `AuthTokens` table. Revision ID: cf6ed76ef146 Revises: 8da7405903f6 Create Date: 2020-09-10 17:13:40.407017 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cf6ed76ef146' down_revision = '8da7405903f6' branch_labels = None depends_on = None def upgrade...
Add AuthTokens table migration file.
Add AuthTokens table migration file.
Python
mpl-2.0
mrf345/FQM,mrf345/FQM,mrf345/FQM,mrf345/FQM
Add AuthTokens table migration file.
"""Add `AuthTokens` table. Revision ID: cf6ed76ef146 Revises: 8da7405903f6 Create Date: 2020-09-10 17:13:40.407017 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cf6ed76ef146' down_revision = '8da7405903f6' branch_labels = None depends_on = None def upgrade...
<commit_before><commit_msg>Add AuthTokens table migration file.<commit_after>
"""Add `AuthTokens` table. Revision ID: cf6ed76ef146 Revises: 8da7405903f6 Create Date: 2020-09-10 17:13:40.407017 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cf6ed76ef146' down_revision = '8da7405903f6' branch_labels = None depends_on = None def upgrade...
Add AuthTokens table migration file."""Add `AuthTokens` table. Revision ID: cf6ed76ef146 Revises: 8da7405903f6 Create Date: 2020-09-10 17:13:40.407017 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cf6ed76ef146' down_revision = '8da7405903f6' branch_labels = ...
<commit_before><commit_msg>Add AuthTokens table migration file.<commit_after>"""Add `AuthTokens` table. Revision ID: cf6ed76ef146 Revises: 8da7405903f6 Create Date: 2020-09-10 17:13:40.407017 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cf6ed76ef146' down_r...
f27c01b188b1ecbb42bb5b672ef3c95bf2a271a6
run_mc_asimov_analysis.py
run_mc_asimov_analysis.py
import os import sys import copy from fermipy.gtanalysis import GTAnalysis from haloanalysis.fit_funcs import fit_halo import numpy as np import itertools import argparse import yaml if __name__ == '__main__': usage = "usage: %(prog)s [config file]" description = "Run fermipy analysis chain." parser = ar...
Add script for asimov MC analysis.
Add script for asimov MC analysis.
Python
bsd-3-clause
woodmd/haloanalysis,woodmd/haloanalysis
Add script for asimov MC analysis.
import os import sys import copy from fermipy.gtanalysis import GTAnalysis from haloanalysis.fit_funcs import fit_halo import numpy as np import itertools import argparse import yaml if __name__ == '__main__': usage = "usage: %(prog)s [config file]" description = "Run fermipy analysis chain." parser = ar...
<commit_before><commit_msg>Add script for asimov MC analysis.<commit_after>
import os import sys import copy from fermipy.gtanalysis import GTAnalysis from haloanalysis.fit_funcs import fit_halo import numpy as np import itertools import argparse import yaml if __name__ == '__main__': usage = "usage: %(prog)s [config file]" description = "Run fermipy analysis chain." parser = ar...
Add script for asimov MC analysis.import os import sys import copy from fermipy.gtanalysis import GTAnalysis from haloanalysis.fit_funcs import fit_halo import numpy as np import itertools import argparse import yaml if __name__ == '__main__': usage = "usage: %(prog)s [config file]" description = "Run fermip...
<commit_before><commit_msg>Add script for asimov MC analysis.<commit_after>import os import sys import copy from fermipy.gtanalysis import GTAnalysis from haloanalysis.fit_funcs import fit_halo import numpy as np import itertools import argparse import yaml if __name__ == '__main__': usage = "usage: %(prog)s [co...
cbe5617222047bc174e470051b5724f84f70609e
benchmarks/parse.py
benchmarks/parse.py
#!/usr/bin/env python import json, sys, time count = int(sys.argv[1]) for n in sys.argv[2:]: print '%s:' % n start = time.time() fp = open(n) for i in xrange(count): fp.seek(0) val = json.load(fp) end = time.time() print ' ', end - start
Add a Python json benchmark.
Add a Python json benchmark. Alas, it's about 3x faster than us, due to being written in C.
Python
bsd-3-clause
jkarni/aeson,beni55/aeson,nurpax/aeson,lykahb/aeson,roelvandijk/aeson,plaprade/aeson,abbradar/aeson,sol/aeson,dmjio/aeson,sol/aeson,sol/aeson,aelve/json-x,neobrain/aeson,bwo/aeson,timmytofu/aeson,23Skidoo/aeson,JPMoresmau/aeson,neobrain/aeson,roelvandijk/aeson,SeanRBurton/aeson
Add a Python json benchmark. Alas, it's about 3x faster than us, due to being written in C.
#!/usr/bin/env python import json, sys, time count = int(sys.argv[1]) for n in sys.argv[2:]: print '%s:' % n start = time.time() fp = open(n) for i in xrange(count): fp.seek(0) val = json.load(fp) end = time.time() print ' ', end - start
<commit_before><commit_msg>Add a Python json benchmark. Alas, it's about 3x faster than us, due to being written in C.<commit_after>
#!/usr/bin/env python import json, sys, time count = int(sys.argv[1]) for n in sys.argv[2:]: print '%s:' % n start = time.time() fp = open(n) for i in xrange(count): fp.seek(0) val = json.load(fp) end = time.time() print ' ', end - start
Add a Python json benchmark. Alas, it's about 3x faster than us, due to being written in C.#!/usr/bin/env python import json, sys, time count = int(sys.argv[1]) for n in sys.argv[2:]: print '%s:' % n start = time.time() fp = open(n) for i in xrange(count): fp.seek(0) val = json.load(...
<commit_before><commit_msg>Add a Python json benchmark. Alas, it's about 3x faster than us, due to being written in C.<commit_after>#!/usr/bin/env python import json, sys, time count = int(sys.argv[1]) for n in sys.argv[2:]: print '%s:' % n start = time.time() fp = open(n) for i in xrange(count): ...
6b2cb0bfc41a26eb5cb259a66feb937a8564c705
ws-tests/test_invalid_merge.py
ws-tests/test_invalid_merge.py
#!/usr/bin/env python from opentreetesting import test_http_json_method, config import sys DOMAIN = config('host', 'apihost') SUBMIT_URI = DOMAIN + '/merge/v1/master/master' data = { 'auth_token': 'bogus' } if test_http_json_method(SUBMIT_URI, 'PUT', data=dat...
Add a test for an invalid merge
Add a test for an invalid merge
Python
bsd-2-clause
OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api
Add a test for an invalid merge
#!/usr/bin/env python from opentreetesting import test_http_json_method, config import sys DOMAIN = config('host', 'apihost') SUBMIT_URI = DOMAIN + '/merge/v1/master/master' data = { 'auth_token': 'bogus' } if test_http_json_method(SUBMIT_URI, 'PUT', data=dat...
<commit_before><commit_msg>Add a test for an invalid merge<commit_after>
#!/usr/bin/env python from opentreetesting import test_http_json_method, config import sys DOMAIN = config('host', 'apihost') SUBMIT_URI = DOMAIN + '/merge/v1/master/master' data = { 'auth_token': 'bogus' } if test_http_json_method(SUBMIT_URI, 'PUT', data=dat...
Add a test for an invalid merge#!/usr/bin/env python from opentreetesting import test_http_json_method, config import sys DOMAIN = config('host', 'apihost') SUBMIT_URI = DOMAIN + '/merge/v1/master/master' data = { 'auth_token': 'bogus' } if test_http_json_method(SUBMIT_URI, 'PUT', ...
<commit_before><commit_msg>Add a test for an invalid merge<commit_after>#!/usr/bin/env python from opentreetesting import test_http_json_method, config import sys DOMAIN = config('host', 'apihost') SUBMIT_URI = DOMAIN + '/merge/v1/master/master' data = { 'auth_token': 'bogus' } if test_http_json_method(SUBMI...
be7226c8537809dd551ec68c690cbb6b2cca5a7c
yaml_test/ex7_yam_json_read.py
yaml_test/ex7_yam_json_read.py
import yaml import json from pprint import pprint def output_format(my_list, my_str): ''' Make the output easier to read ''' print '\n\n' print '#'*3 print '#'*3+my_str print '#'*3 pprint(my_list) def main(): ''' Read YAML and JSON files. Pretty print to standard out '''...
Add YAML & JSON Read script
Add YAML & JSON Read script
Python
apache-2.0
terblac/mypynetcourse
Add YAML & JSON Read script
import yaml import json from pprint import pprint def output_format(my_list, my_str): ''' Make the output easier to read ''' print '\n\n' print '#'*3 print '#'*3+my_str print '#'*3 pprint(my_list) def main(): ''' Read YAML and JSON files. Pretty print to standard out '''...
<commit_before><commit_msg>Add YAML & JSON Read script<commit_after>
import yaml import json from pprint import pprint def output_format(my_list, my_str): ''' Make the output easier to read ''' print '\n\n' print '#'*3 print '#'*3+my_str print '#'*3 pprint(my_list) def main(): ''' Read YAML and JSON files. Pretty print to standard out '''...
Add YAML & JSON Read script import yaml import json from pprint import pprint def output_format(my_list, my_str): ''' Make the output easier to read ''' print '\n\n' print '#'*3 print '#'*3+my_str print '#'*3 pprint(my_list) def main(): ''' Read YAML and JSON files. Pretty pr...
<commit_before><commit_msg>Add YAML & JSON Read script<commit_after> import yaml import json from pprint import pprint def output_format(my_list, my_str): ''' Make the output easier to read ''' print '\n\n' print '#'*3 print '#'*3+my_str print '#'*3 pprint(my_list) def main(): ''...
15de4bbd6ef7e64a7b824eebf9cefb14c474baaf
src/api/imgur/imgur_api.py
src/api/imgur/imgur_api.py
from models.image import Image from utils.utils import tidy_up_url class ImgurAPI: _IMGUR_PARAMS = { "client_id": "", "api_calls_limits": { "user_limit": -1, "user_remaining": -1, "user_reset_timestamp": -1, "client_limit": -1, "client_re...
Add a ImgurAPI simple interface
Add a ImgurAPI simple interface This is just an interface that performs RESTful operations to the Imgur API.
Python
apache-2.0
CharlieCorner/pymage_downloader
Add a ImgurAPI simple interface This is just an interface that performs RESTful operations to the Imgur API.
from models.image import Image from utils.utils import tidy_up_url class ImgurAPI: _IMGUR_PARAMS = { "client_id": "", "api_calls_limits": { "user_limit": -1, "user_remaining": -1, "user_reset_timestamp": -1, "client_limit": -1, "client_re...
<commit_before><commit_msg>Add a ImgurAPI simple interface This is just an interface that performs RESTful operations to the Imgur API.<commit_after>
from models.image import Image from utils.utils import tidy_up_url class ImgurAPI: _IMGUR_PARAMS = { "client_id": "", "api_calls_limits": { "user_limit": -1, "user_remaining": -1, "user_reset_timestamp": -1, "client_limit": -1, "client_re...
Add a ImgurAPI simple interface This is just an interface that performs RESTful operations to the Imgur API.from models.image import Image from utils.utils import tidy_up_url class ImgurAPI: _IMGUR_PARAMS = { "client_id": "", "api_calls_limits": { "user_limit": -1, "user_r...
<commit_before><commit_msg>Add a ImgurAPI simple interface This is just an interface that performs RESTful operations to the Imgur API.<commit_after>from models.image import Image from utils.utils import tidy_up_url class ImgurAPI: _IMGUR_PARAMS = { "client_id": "", "api_calls_limits": { ...
a72ba142d7765ee551f74629507211ed48f2c7a6
osf/migrations/0074_auto_20171207_1331.py
osf/migrations/0074_auto_20171207_1331.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-07 19:31 from __future__ import unicode_literals from django.db import migrations, models import osf.models.validators class Migration(migrations.Migration): dependencies = [ ('osf', '0073_citationstyle_has_bibliography'), ] operat...
Update comment maxlength to 1000 characters
Update comment maxlength to 1000 characters
Python
apache-2.0
CenterForOpenScience/osf.io,TomBaxter/osf.io,pattisdr/osf.io,CenterForOpenScience/osf.io,Johnetordoff/osf.io,brianjgeiger/osf.io,binoculars/osf.io,cslzchen/osf.io,Johnetordoff/osf.io,cslzchen/osf.io,chennan47/osf.io,mattclark/osf.io,sloria/osf.io,aaxelb/osf.io,HalcyonChimera/osf.io,icereval/osf.io,leb2dg/osf.io,chennan...
Update comment maxlength to 1000 characters
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-07 19:31 from __future__ import unicode_literals from django.db import migrations, models import osf.models.validators class Migration(migrations.Migration): dependencies = [ ('osf', '0073_citationstyle_has_bibliography'), ] operat...
<commit_before><commit_msg>Update comment maxlength to 1000 characters<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-07 19:31 from __future__ import unicode_literals from django.db import migrations, models import osf.models.validators class Migration(migrations.Migration): dependencies = [ ('osf', '0073_citationstyle_has_bibliography'), ] operat...
Update comment maxlength to 1000 characters# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-07 19:31 from __future__ import unicode_literals from django.db import migrations, models import osf.models.validators class Migration(migrations.Migration): dependencies = [ ('osf', '0073_citation...
<commit_before><commit_msg>Update comment maxlength to 1000 characters<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-07 19:31 from __future__ import unicode_literals from django.db import migrations, models import osf.models.validators class Migration(migrations.Migration): depend...
b5cfc9400e13caa3bb73b3e5d8e8eb8c68eff147
build/third_party_license_fmt.py
build/third_party_license_fmt.py
# # This script generates the license information of the Maven dependencies # for the about.html page. You would update this information everytime you # update some dependency in the pom.xml configuration for a release. These # are the steps: # # 1. Copy this script and the pom.xml in some folder (you do not have to # ...
Add the script for generating
Add the script for generating the legal info for the Maven dependencies
Python
mpl-2.0
GreenDelta/epd-editor,GreenDelta/epd-editor,GreenDelta/epd-editor
Add the script for generating the legal info for the Maven dependencies
# # This script generates the license information of the Maven dependencies # for the about.html page. You would update this information everytime you # update some dependency in the pom.xml configuration for a release. These # are the steps: # # 1. Copy this script and the pom.xml in some folder (you do not have to # ...
<commit_before><commit_msg>Add the script for generating the legal info for the Maven dependencies<commit_after>
# # This script generates the license information of the Maven dependencies # for the about.html page. You would update this information everytime you # update some dependency in the pom.xml configuration for a release. These # are the steps: # # 1. Copy this script and the pom.xml in some folder (you do not have to # ...
Add the script for generating the legal info for the Maven dependencies# # This script generates the license information of the Maven dependencies # for the about.html page. You would update this information everytime you # update some dependency in the pom.xml configuration for a release. These # are the steps: # # 1...
<commit_before><commit_msg>Add the script for generating the legal info for the Maven dependencies<commit_after># # This script generates the license information of the Maven dependencies # for the about.html page. You would update this information everytime you # update some dependency in the pom.xml configuration fo...
e37b6363749cc4194f63d37ce6d5b3c9499a460c
Examples/Infovis/Python/simple_selection.py
Examples/Infovis/Python/simple_selection.py
from vtk import * from vtk import * source = vtkRandomGraphSource() source.SetNumberOfVertices(25) source.SetStartWithTree(True) source.SetIncludeEdgeWeights(True) view1 = vtkGraphLayoutView() view1.AddRepresentationFromInputConnection(source.GetOutputPort()) view1.SetColorVertices(True) view1.SetEdgeColorArrayName(...
Add a simple selection example.
ENH: Add a simple selection example.
Python
bsd-3-clause
demarle/VTK,biddisco/VTK,hendradarwin/VTK,jmerkow/VTK,ashray/VTK-EVM,aashish24/VTK-old,cjh1/VTK,msmolens/VTK,sankhesh/VTK,daviddoria/PointGraphsPhase1,berendkleinhaneveld/VTK,SimVascular/VTK,demarle/VTK,Wuteyan/VTK,ashray/VTK-EVM,mspark93/VTK,spthaolt/VTK,johnkit/vtk-dev,demarle/VTK,arnaudgelas/VTK,biddisco/VTK,hendrad...
ENH: Add a simple selection example.
from vtk import * from vtk import * source = vtkRandomGraphSource() source.SetNumberOfVertices(25) source.SetStartWithTree(True) source.SetIncludeEdgeWeights(True) view1 = vtkGraphLayoutView() view1.AddRepresentationFromInputConnection(source.GetOutputPort()) view1.SetColorVertices(True) view1.SetEdgeColorArrayName(...
<commit_before><commit_msg>ENH: Add a simple selection example.<commit_after>
from vtk import * from vtk import * source = vtkRandomGraphSource() source.SetNumberOfVertices(25) source.SetStartWithTree(True) source.SetIncludeEdgeWeights(True) view1 = vtkGraphLayoutView() view1.AddRepresentationFromInputConnection(source.GetOutputPort()) view1.SetColorVertices(True) view1.SetEdgeColorArrayName(...
ENH: Add a simple selection example.from vtk import * from vtk import * source = vtkRandomGraphSource() source.SetNumberOfVertices(25) source.SetStartWithTree(True) source.SetIncludeEdgeWeights(True) view1 = vtkGraphLayoutView() view1.AddRepresentationFromInputConnection(source.GetOutputPort()) view1.SetColorVertic...
<commit_before><commit_msg>ENH: Add a simple selection example.<commit_after>from vtk import * from vtk import * source = vtkRandomGraphSource() source.SetNumberOfVertices(25) source.SetStartWithTree(True) source.SetIncludeEdgeWeights(True) view1 = vtkGraphLayoutView() view1.AddRepresentationFromInputConnection(sou...
3b8939567bc77407db0179d8e8e72551d1da3798
tests/test_cmds.py
tests/test_cmds.py
from . import TEST_DIR from . import ccmtest from ccmlib.cluster import Cluster import subprocess from six import print_ CLUSTER_PATH = TEST_DIR class TestCCMCmd(ccmtest.Tester): def __init__(self, *args, **kwargs): ccmtest.Tester.__init__(self, *args, **kwargs) class TestCCMCreate(TestCCMCmd): de...
Add initial tests for ccm cli
Add initial tests for ccm cli
Python
apache-2.0
pcmanus/ccm,AtwooTM/ccm,jeffjirsa/ccm,thobbs/ccm,tolbertam/ccm,mike-tr-adamson/ccm,spodkowinski/ccm,slivne/ccm,mike-tr-adamson/ccm,thobbs/ccm,mambocab/ccm,mikefero/ccm,mike-tr-adamson/ccm,mikefero/ccm,bcantoni/ccm,jorgebay/ccm,pombredanne/ccm,kishkaru/ccm,pcmanus/ccm,umitunal/ccm,aboudreault/ccm,tolbertam/ccm,josh-mcke...
Add initial tests for ccm cli
from . import TEST_DIR from . import ccmtest from ccmlib.cluster import Cluster import subprocess from six import print_ CLUSTER_PATH = TEST_DIR class TestCCMCmd(ccmtest.Tester): def __init__(self, *args, **kwargs): ccmtest.Tester.__init__(self, *args, **kwargs) class TestCCMCreate(TestCCMCmd): de...
<commit_before><commit_msg>Add initial tests for ccm cli<commit_after>
from . import TEST_DIR from . import ccmtest from ccmlib.cluster import Cluster import subprocess from six import print_ CLUSTER_PATH = TEST_DIR class TestCCMCmd(ccmtest.Tester): def __init__(self, *args, **kwargs): ccmtest.Tester.__init__(self, *args, **kwargs) class TestCCMCreate(TestCCMCmd): de...
Add initial tests for ccm clifrom . import TEST_DIR from . import ccmtest from ccmlib.cluster import Cluster import subprocess from six import print_ CLUSTER_PATH = TEST_DIR class TestCCMCmd(ccmtest.Tester): def __init__(self, *args, **kwargs): ccmtest.Tester.__init__(self, *args, **kwargs) class TestC...
<commit_before><commit_msg>Add initial tests for ccm cli<commit_after>from . import TEST_DIR from . import ccmtest from ccmlib.cluster import Cluster import subprocess from six import print_ CLUSTER_PATH = TEST_DIR class TestCCMCmd(ccmtest.Tester): def __init__(self, *args, **kwargs): ccmtest.Tester.__i...
6e778406266f6b44c5fe79d7e3f64aeeda29fe15
src/commons/transaction.py
src/commons/transaction.py
from django.db.transaction import is_dirty, leave_transaction_management, rollback, commit, enter_transaction_management, managed from django.db import DEFAULT_DB_ALIAS from django.http import HttpResponse def commit_on_http_success(func, using=None): """ This decorator activates db commit on HTTP success res...
Add a new decorator: commit_on_http_success.
Add a new decorator: commit_on_http_success.
Python
agpl-3.0
rockneurotiko/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud
Add a new decorator: commit_on_http_success.
from django.db.transaction import is_dirty, leave_transaction_management, rollback, commit, enter_transaction_management, managed from django.db import DEFAULT_DB_ALIAS from django.http import HttpResponse def commit_on_http_success(func, using=None): """ This decorator activates db commit on HTTP success res...
<commit_before><commit_msg>Add a new decorator: commit_on_http_success.<commit_after>
from django.db.transaction import is_dirty, leave_transaction_management, rollback, commit, enter_transaction_management, managed from django.db import DEFAULT_DB_ALIAS from django.http import HttpResponse def commit_on_http_success(func, using=None): """ This decorator activates db commit on HTTP success res...
Add a new decorator: commit_on_http_success.from django.db.transaction import is_dirty, leave_transaction_management, rollback, commit, enter_transaction_management, managed from django.db import DEFAULT_DB_ALIAS from django.http import HttpResponse def commit_on_http_success(func, using=None): """ This decor...
<commit_before><commit_msg>Add a new decorator: commit_on_http_success.<commit_after>from django.db.transaction import is_dirty, leave_transaction_management, rollback, commit, enter_transaction_management, managed from django.db import DEFAULT_DB_ALIAS from django.http import HttpResponse def commit_on_http_success(...
5e92d9b7e339e1de1f807d728e9bd4c9b7d92010
temba/contacts/migrations/0024_unblock_contacts_imported_again_after_being_blocked.py
temba/contacts/migrations/0024_unblock_contacts_imported_again_after_being_blocked.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.db.models import Count, Q def unblock_contacts_imported_again(apps, schema_editor): Contact = apps.get_model('contacts', 'Contact') blocked_contacts = Contact.objects.filter(is_blocked=True, ...
Add migrations to fix reimported blocked contacts
Add migrations to fix reimported blocked contacts
Python
agpl-3.0
reyrodrigues/EU-SMS,pulilab/rapidpro,praekelt/rapidpro,tsotetsi/textily-web,reyrodrigues/EU-SMS,praekelt/rapidpro,ewheeler/rapidpro,ewheeler/rapidpro,tsotetsi/textily-web,pulilab/rapidpro,ewheeler/rapidpro,tsotetsi/textily-web,praekelt/rapidpro,tsotetsi/textily-web,pulilab/rapidpro,ewheeler/rapidpro,pulilab/rapidpro,pu...
Add migrations to fix reimported blocked contacts
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.db.models import Count, Q def unblock_contacts_imported_again(apps, schema_editor): Contact = apps.get_model('contacts', 'Contact') blocked_contacts = Contact.objects.filter(is_blocked=True, ...
<commit_before><commit_msg>Add migrations to fix reimported blocked contacts<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.db.models import Count, Q def unblock_contacts_imported_again(apps, schema_editor): Contact = apps.get_model('contacts', 'Contact') blocked_contacts = Contact.objects.filter(is_blocked=True, ...
Add migrations to fix reimported blocked contacts# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.db.models import Count, Q def unblock_contacts_imported_again(apps, schema_editor): Contact = apps.get_model('contacts', 'Contact') blocked_co...
<commit_before><commit_msg>Add migrations to fix reimported blocked contacts<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.db.models import Count, Q def unblock_contacts_imported_again(apps, schema_editor): Contact = apps.get_mod...
280f6fa36a204aa170eff3339e2c2fd7d4943491
stepik/Programming_on_Python/part1/1.4.shape_area.py
stepik/Programming_on_Python/part1/1.4.shape_area.py
#!/usr/bin/env python3 def main(): shape = input() if shape == 'прямоугольник': a, b = int(input()), int(input()) print('{}'.format(a * b)) if shape == 'треугольник': a, b, c = int(input()), int(input()), int(input()) p = (a + b + c) / 2 print('{}'.format((p * (p - ...
Add calc area of shapes
Add calc area of shapes
Python
apache-2.0
fedusia/python
Add calc area of shapes
#!/usr/bin/env python3 def main(): shape = input() if shape == 'прямоугольник': a, b = int(input()), int(input()) print('{}'.format(a * b)) if shape == 'треугольник': a, b, c = int(input()), int(input()), int(input()) p = (a + b + c) / 2 print('{}'.format((p * (p - ...
<commit_before><commit_msg>Add calc area of shapes<commit_after>
#!/usr/bin/env python3 def main(): shape = input() if shape == 'прямоугольник': a, b = int(input()), int(input()) print('{}'.format(a * b)) if shape == 'треугольник': a, b, c = int(input()), int(input()), int(input()) p = (a + b + c) / 2 print('{}'.format((p * (p - ...
Add calc area of shapes#!/usr/bin/env python3 def main(): shape = input() if shape == 'прямоугольник': a, b = int(input()), int(input()) print('{}'.format(a * b)) if shape == 'треугольник': a, b, c = int(input()), int(input()), int(input()) p = (a + b + c) / 2 print...
<commit_before><commit_msg>Add calc area of shapes<commit_after>#!/usr/bin/env python3 def main(): shape = input() if shape == 'прямоугольник': a, b = int(input()), int(input()) print('{}'.format(a * b)) if shape == 'треугольник': a, b, c = int(input()), int(input()), int(input()) ...
8d0e213213c1f1cb295373f8f50f2215564cd8d4
build/run_tests.py
build/run_tests.py
#!/usr/bin/env python # Copyright 2014 The Crashpad Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
Add test runner script for integration with the waterfall
Add test runner script for integration with the waterfall R=mark@chromium.org Review URL: https://codereview.chromium.org/800983002
Python
apache-2.0
Chilledheart/crashpad,hankbao/Crashpad,hokein/crashpad,Chilledheart/crashpad,chromium/crashpad,hokein/crashpad,hankbao/Crashpad,chromium/crashpad,chromium/crashpad,hankbao/Crashpad,atom/crashpad,atom/crashpad,hokein/crashpad,Chilledheart/crashpad,atom/crashpad
Add test runner script for integration with the waterfall R=mark@chromium.org Review URL: https://codereview.chromium.org/800983002
#!/usr/bin/env python # Copyright 2014 The Crashpad Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
<commit_before><commit_msg>Add test runner script for integration with the waterfall R=mark@chromium.org Review URL: https://codereview.chromium.org/800983002<commit_after>
#!/usr/bin/env python # Copyright 2014 The Crashpad Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
Add test runner script for integration with the waterfall R=mark@chromium.org Review URL: https://codereview.chromium.org/800983002#!/usr/bin/env python # Copyright 2014 The Crashpad Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except i...
<commit_before><commit_msg>Add test runner script for integration with the waterfall R=mark@chromium.org Review URL: https://codereview.chromium.org/800983002<commit_after>#!/usr/bin/env python # Copyright 2014 The Crashpad Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "Licens...
172c47ae803691a36d52496f6de74b82707a77f4
tests/test_conversions.py
tests/test_conversions.py
from tomso.adipls import load_amdl from tomso.fgong import load_fgong from tomso.gyre import load_gyre from math import frexp import unittest # We should be able to make various round trips between different # format and preserve the data relevant for adiabatic oscillations. # Conversion to AMDL might modify the data ...
Add test for object-based conversions between various stellar model formats, including via other formats
Add test for object-based conversions between various stellar model formats, including via other formats
Python
mit
warrickball/tomso
Add test for object-based conversions between various stellar model formats, including via other formats
from tomso.adipls import load_amdl from tomso.fgong import load_fgong from tomso.gyre import load_gyre from math import frexp import unittest # We should be able to make various round trips between different # format and preserve the data relevant for adiabatic oscillations. # Conversion to AMDL might modify the data ...
<commit_before><commit_msg>Add test for object-based conversions between various stellar model formats, including via other formats<commit_after>
from tomso.adipls import load_amdl from tomso.fgong import load_fgong from tomso.gyre import load_gyre from math import frexp import unittest # We should be able to make various round trips between different # format and preserve the data relevant for adiabatic oscillations. # Conversion to AMDL might modify the data ...
Add test for object-based conversions between various stellar model formats, including via other formatsfrom tomso.adipls import load_amdl from tomso.fgong import load_fgong from tomso.gyre import load_gyre from math import frexp import unittest # We should be able to make various round trips between different # forma...
<commit_before><commit_msg>Add test for object-based conversions between various stellar model formats, including via other formats<commit_after>from tomso.adipls import load_amdl from tomso.fgong import load_fgong from tomso.gyre import load_gyre from math import frexp import unittest # We should be able to make vari...
6fa314f29d1036a89e43e8a1c7152911f0ffe430
tests/test_geolocation.py
tests/test_geolocation.py
from . import TheInternetTestCase from helium.api import click, get_driver, S class AbTestingTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/geolocation" def test_fake_geolocation(self): get_driver().execute_script( 'window.navigator.geolocation.getCurrentPosition = ' ...
Add test case for geolocation.
Add test case for geolocation.
Python
mit
bugfree-software/the-internet-solution-python
Add test case for geolocation.
from . import TheInternetTestCase from helium.api import click, get_driver, S class AbTestingTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/geolocation" def test_fake_geolocation(self): get_driver().execute_script( 'window.navigator.geolocation.getCurrentPosition = ' ...
<commit_before><commit_msg>Add test case for geolocation.<commit_after>
from . import TheInternetTestCase from helium.api import click, get_driver, S class AbTestingTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/geolocation" def test_fake_geolocation(self): get_driver().execute_script( 'window.navigator.geolocation.getCurrentPosition = ' ...
Add test case for geolocation.from . import TheInternetTestCase from helium.api import click, get_driver, S class AbTestingTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/geolocation" def test_fake_geolocation(self): get_driver().execute_script( 'window.navigator.geolo...
<commit_before><commit_msg>Add test case for geolocation.<commit_after>from . import TheInternetTestCase from helium.api import click, get_driver, S class AbTestingTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/geolocation" def test_fake_geolocation(self): get_driver().e...
85aaa8d8ec3bc179729d4a3d731153406560dd2c
test/automl/test_models.py
test/automl/test_models.py
# -*- encoding: utf-8 -*- from __future__ import print_function import unittest import mock from autosklearn.automl import AutoML from autosklearn.util.backend import Backend class AutoMLStub(object): def __init__(self): self.__class__ = AutoML class AutoMlModelsTest(unittest.TestCase): def setUp(...
Test AutoML usage of Backend to load models
Test AutoML usage of Backend to load models
Python
bsd-3-clause
automl/auto-sklearn,automl/auto-sklearn,hmendozap/auto-sklearn,hmendozap/auto-sklearn
Test AutoML usage of Backend to load models
# -*- encoding: utf-8 -*- from __future__ import print_function import unittest import mock from autosklearn.automl import AutoML from autosklearn.util.backend import Backend class AutoMLStub(object): def __init__(self): self.__class__ = AutoML class AutoMlModelsTest(unittest.TestCase): def setUp(...
<commit_before><commit_msg>Test AutoML usage of Backend to load models<commit_after>
# -*- encoding: utf-8 -*- from __future__ import print_function import unittest import mock from autosklearn.automl import AutoML from autosklearn.util.backend import Backend class AutoMLStub(object): def __init__(self): self.__class__ = AutoML class AutoMlModelsTest(unittest.TestCase): def setUp(...
Test AutoML usage of Backend to load models# -*- encoding: utf-8 -*- from __future__ import print_function import unittest import mock from autosklearn.automl import AutoML from autosklearn.util.backend import Backend class AutoMLStub(object): def __init__(self): self.__class__ = AutoML class AutoMlMod...
<commit_before><commit_msg>Test AutoML usage of Backend to load models<commit_after># -*- encoding: utf-8 -*- from __future__ import print_function import unittest import mock from autosklearn.automl import AutoML from autosklearn.util.backend import Backend class AutoMLStub(object): def __init__(self): ...
47afc368ab508a1b13f936e1cc8c0530dd8175ac
corehq/motech/migrations/0010_auto_20211124_1931.py
corehq/motech/migrations/0010_auto_20211124_1931.py
# Generated by Django 2.2.24 on 2021-11-24 19:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('motech', '0009_auto_20211122_2011'), ] operations = [ migrations.AlterField( model_name='connectionsettings', name=...
Add client grant to db choices
Add client grant to db choices
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Add client grant to db choices
# Generated by Django 2.2.24 on 2021-11-24 19:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('motech', '0009_auto_20211122_2011'), ] operations = [ migrations.AlterField( model_name='connectionsettings', name=...
<commit_before><commit_msg>Add client grant to db choices<commit_after>
# Generated by Django 2.2.24 on 2021-11-24 19:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('motech', '0009_auto_20211122_2011'), ] operations = [ migrations.AlterField( model_name='connectionsettings', name=...
Add client grant to db choices# Generated by Django 2.2.24 on 2021-11-24 19:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('motech', '0009_auto_20211122_2011'), ] operations = [ migrations.AlterField( model_name='connecti...
<commit_before><commit_msg>Add client grant to db choices<commit_after># Generated by Django 2.2.24 on 2021-11-24 19:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('motech', '0009_auto_20211122_2011'), ] operations = [ migrations.Alt...
75393b7ff34009aa5cb2993011107882941c949d
drudge/utils.py
drudge/utils.py
"""Small utilities.""" from collections.abc import Sequence from sympy import sympify, Symbol, Expr, SympifyError # # SymPy utilities # --------------- # def ensure_sympify(obj, role='', expected_type=None): """Sympify the given object with checking and error reporting. This is a shallow wrapper over SymP...
Add utilities for checking inputs
Add utilities for checking inputs These functions all uses a consistent style of error reporting, which will be used throughout drudge.
Python
mit
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
Add utilities for checking inputs These functions all uses a consistent style of error reporting, which will be used throughout drudge.
"""Small utilities.""" from collections.abc import Sequence from sympy import sympify, Symbol, Expr, SympifyError # # SymPy utilities # --------------- # def ensure_sympify(obj, role='', expected_type=None): """Sympify the given object with checking and error reporting. This is a shallow wrapper over SymP...
<commit_before><commit_msg>Add utilities for checking inputs These functions all uses a consistent style of error reporting, which will be used throughout drudge.<commit_after>
"""Small utilities.""" from collections.abc import Sequence from sympy import sympify, Symbol, Expr, SympifyError # # SymPy utilities # --------------- # def ensure_sympify(obj, role='', expected_type=None): """Sympify the given object with checking and error reporting. This is a shallow wrapper over SymP...
Add utilities for checking inputs These functions all uses a consistent style of error reporting, which will be used throughout drudge."""Small utilities.""" from collections.abc import Sequence from sympy import sympify, Symbol, Expr, SympifyError # # SymPy utilities # --------------- # def ensure_sympify(obj, r...
<commit_before><commit_msg>Add utilities for checking inputs These functions all uses a consistent style of error reporting, which will be used throughout drudge.<commit_after>"""Small utilities.""" from collections.abc import Sequence from sympy import sympify, Symbol, Expr, SympifyError # # SymPy utilities # ---...
444168c4e53283e99c5fb8e0c63585cda97138dd
analysis/plot-trial-durations.py
analysis/plot-trial-durations.py
import climate import collections import lmj.plot import numpy as np import database import plots @climate.annotate( root='load experiment data from this directory', pattern=('plot data from files matching this pattern', 'option'), ) def main(root, pattern='*.csv.gz'): data = collections.defaultdict(lamb...
Add plot for trial durations, needs more work!
Add plot for trial durations, needs more work!
Python
mit
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
Add plot for trial durations, needs more work!
import climate import collections import lmj.plot import numpy as np import database import plots @climate.annotate( root='load experiment data from this directory', pattern=('plot data from files matching this pattern', 'option'), ) def main(root, pattern='*.csv.gz'): data = collections.defaultdict(lamb...
<commit_before><commit_msg>Add plot for trial durations, needs more work!<commit_after>
import climate import collections import lmj.plot import numpy as np import database import plots @climate.annotate( root='load experiment data from this directory', pattern=('plot data from files matching this pattern', 'option'), ) def main(root, pattern='*.csv.gz'): data = collections.defaultdict(lamb...
Add plot for trial durations, needs more work!import climate import collections import lmj.plot import numpy as np import database import plots @climate.annotate( root='load experiment data from this directory', pattern=('plot data from files matching this pattern', 'option'), ) def main(root, pattern='*.csv...
<commit_before><commit_msg>Add plot for trial durations, needs more work!<commit_after>import climate import collections import lmj.plot import numpy as np import database import plots @climate.annotate( root='load experiment data from this directory', pattern=('plot data from files matching this pattern', '...
cb7a1654a3bf606a74c8f2cdbdceb4cd4a27d24c
tests/test_status_codes.py
tests/test_status_codes.py
from . import TheInternetTestCase from helium.api import Link, find_all from httplib import HTTPConnection from urlparse import urlparse class StatusCodesTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/status_codes" def test_status_code_200(self): self._test_status_code(2...
Add test case for status codes.
Add test case for status codes.
Python
mit
bugfree-software/the-internet-solution-python
Add test case for status codes.
from . import TheInternetTestCase from helium.api import Link, find_all from httplib import HTTPConnection from urlparse import urlparse class StatusCodesTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/status_codes" def test_status_code_200(self): self._test_status_code(2...
<commit_before><commit_msg>Add test case for status codes.<commit_after>
from . import TheInternetTestCase from helium.api import Link, find_all from httplib import HTTPConnection from urlparse import urlparse class StatusCodesTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/status_codes" def test_status_code_200(self): self._test_status_code(2...
Add test case for status codes.from . import TheInternetTestCase from helium.api import Link, find_all from httplib import HTTPConnection from urlparse import urlparse class StatusCodesTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/status_codes" def test_status_code_200(se...
<commit_before><commit_msg>Add test case for status codes.<commit_after>from . import TheInternetTestCase from helium.api import Link, find_all from httplib import HTTPConnection from urlparse import urlparse class StatusCodesTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/s...
e519090181f330f218a155d3e96447c4330913a6
wrench/script/gen-many-images.py
wrench/script/gen-many-images.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. SIZE = 8 with open("../benchmarks/many-images.yaml", "w") as text_file: text_file.write("root:\n") text_file.wr...
Add a python script to generate the many-images.yaml benchmark.
Add a python script to generate the many-images.yaml benchmark.
Python
mpl-2.0
servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender
Add a python script to generate the many-images.yaml benchmark.
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. SIZE = 8 with open("../benchmarks/many-images.yaml", "w") as text_file: text_file.write("root:\n") text_file.wr...
<commit_before><commit_msg>Add a python script to generate the many-images.yaml benchmark.<commit_after>
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. SIZE = 8 with open("../benchmarks/many-images.yaml", "w") as text_file: text_file.write("root:\n") text_file.wr...
Add a python script to generate the many-images.yaml benchmark.# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. SIZE = 8 with open("../benchmarks/many-images.yaml", "w"...
<commit_before><commit_msg>Add a python script to generate the many-images.yaml benchmark.<commit_after># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. SIZE = 8 with o...
34113a2042bdd4bbb6480a7cc7c0d8ff9b6e7586
data/load_data.py
data/load_data.py
import csv from chemtools.mol_name import get_exact_name from models import DataPoint with open("data/data.csv", "r") as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') points = [] for row in reader: if row == []: continue try: band_gap = row[10...
Add script to load log parse data into the database
Add script to load log parse data into the database
Python
mit
crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp
Add script to load log parse data into the database
import csv from chemtools.mol_name import get_exact_name from models import DataPoint with open("data/data.csv", "r") as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') points = [] for row in reader: if row == []: continue try: band_gap = row[10...
<commit_before><commit_msg>Add script to load log parse data into the database<commit_after>
import csv from chemtools.mol_name import get_exact_name from models import DataPoint with open("data/data.csv", "r") as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') points = [] for row in reader: if row == []: continue try: band_gap = row[10...
Add script to load log parse data into the databaseimport csv from chemtools.mol_name import get_exact_name from models import DataPoint with open("data/data.csv", "r") as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') points = [] for row in reader: if row == []: ...
<commit_before><commit_msg>Add script to load log parse data into the database<commit_after>import csv from chemtools.mol_name import get_exact_name from models import DataPoint with open("data/data.csv", "r") as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') points = [] for row in r...
0f7ae57f269fdce2691358a9a51a3f9e0bcaace0
config/trace_pox_l2_learning.py
config/trace_pox_l2_learning.py
from config.experiment_config_lib import ControllerConfig from sts.topology import StarTopology, BufferedPatchPanel, MeshTopology, GridTopology, BinaryLeafTreeTopology from sts.controller_manager import UserSpaceControllerPatchPanel from sts.control_flow.fuzzer import Fuzzer from sts.control_flow.interactive import Int...
Add trace config for pox l2_learning switch
Add trace config for pox l2_learning switch
Python
apache-2.0
jmiserez/sts,jmiserez/sts
Add trace config for pox l2_learning switch
from config.experiment_config_lib import ControllerConfig from sts.topology import StarTopology, BufferedPatchPanel, MeshTopology, GridTopology, BinaryLeafTreeTopology from sts.controller_manager import UserSpaceControllerPatchPanel from sts.control_flow.fuzzer import Fuzzer from sts.control_flow.interactive import Int...
<commit_before><commit_msg>Add trace config for pox l2_learning switch<commit_after>
from config.experiment_config_lib import ControllerConfig from sts.topology import StarTopology, BufferedPatchPanel, MeshTopology, GridTopology, BinaryLeafTreeTopology from sts.controller_manager import UserSpaceControllerPatchPanel from sts.control_flow.fuzzer import Fuzzer from sts.control_flow.interactive import Int...
Add trace config for pox l2_learning switchfrom config.experiment_config_lib import ControllerConfig from sts.topology import StarTopology, BufferedPatchPanel, MeshTopology, GridTopology, BinaryLeafTreeTopology from sts.controller_manager import UserSpaceControllerPatchPanel from sts.control_flow.fuzzer import Fuzzer f...
<commit_before><commit_msg>Add trace config for pox l2_learning switch<commit_after>from config.experiment_config_lib import ControllerConfig from sts.topology import StarTopology, BufferedPatchPanel, MeshTopology, GridTopology, BinaryLeafTreeTopology from sts.controller_manager import UserSpaceControllerPatchPanel fro...
c59ccacfa46efd6dde167c5460c4d862e4658061
encmass.py
encmass.py
#!/usr/bin/env python # ----------------------------------------------------------------------------- # GENHERNQUIST.ENCMASS # Laura L Watkins [lauralwatkins@gmail.com] # ----------------------------------------------------------------------------- from numpy import * from astropy import units as u from scipy import s...
Add routine to calculate enclosed mass.
Add routine to calculate enclosed mass.
Python
bsd-2-clause
lauralwatkins/genhernquist
Add routine to calculate enclosed mass.
#!/usr/bin/env python # ----------------------------------------------------------------------------- # GENHERNQUIST.ENCMASS # Laura L Watkins [lauralwatkins@gmail.com] # ----------------------------------------------------------------------------- from numpy import * from astropy import units as u from scipy import s...
<commit_before><commit_msg>Add routine to calculate enclosed mass.<commit_after>
#!/usr/bin/env python # ----------------------------------------------------------------------------- # GENHERNQUIST.ENCMASS # Laura L Watkins [lauralwatkins@gmail.com] # ----------------------------------------------------------------------------- from numpy import * from astropy import units as u from scipy import s...
Add routine to calculate enclosed mass.#!/usr/bin/env python # ----------------------------------------------------------------------------- # GENHERNQUIST.ENCMASS # Laura L Watkins [lauralwatkins@gmail.com] # ----------------------------------------------------------------------------- from numpy import * from astrop...
<commit_before><commit_msg>Add routine to calculate enclosed mass.<commit_after>#!/usr/bin/env python # ----------------------------------------------------------------------------- # GENHERNQUIST.ENCMASS # Laura L Watkins [lauralwatkins@gmail.com] # ---------------------------------------------------------------------...
cbd8521891c97c1655a3b89863e1a2170d9edc6b
examples/missing_constants.py
examples/missing_constants.py
import numpy as np from molml.features import Connectivity from molml.constants import BOND_LENGTHS # Currently, there are two recommended ways to work with elements that are not # included in molml/constants.py. In this example, we will look at an iron # complex (iron is not in the constants). # Maybe at some point,...
Add an example script with missing constants
Add an example script with missing constants
Python
mit
crcollins/molml
Add an example script with missing constants
import numpy as np from molml.features import Connectivity from molml.constants import BOND_LENGTHS # Currently, there are two recommended ways to work with elements that are not # included in molml/constants.py. In this example, we will look at an iron # complex (iron is not in the constants). # Maybe at some point,...
<commit_before><commit_msg>Add an example script with missing constants<commit_after>
import numpy as np from molml.features import Connectivity from molml.constants import BOND_LENGTHS # Currently, there are two recommended ways to work with elements that are not # included in molml/constants.py. In this example, we will look at an iron # complex (iron is not in the constants). # Maybe at some point,...
Add an example script with missing constantsimport numpy as np from molml.features import Connectivity from molml.constants import BOND_LENGTHS # Currently, there are two recommended ways to work with elements that are not # included in molml/constants.py. In this example, we will look at an iron # complex (iron is n...
<commit_before><commit_msg>Add an example script with missing constants<commit_after>import numpy as np from molml.features import Connectivity from molml.constants import BOND_LENGTHS # Currently, there are two recommended ways to work with elements that are not # included in molml/constants.py. In this example, we ...
ce0aee46e26f10d247ffcfb15b62df77f507257f
software/control/src/qp_controller_input_snooper.py
software/control/src/qp_controller_input_snooper.py
#!/usr/bin/python ''' Listens to QP Controller Inputs and draws, in different but order-consistent colors, the cubic splines being followed by each body motion block. ''' import lcm import drc from drake import lcmt_qp_controller_input, lcmt_body_motion_data import sys import time from bot_lcmgl import lcmgl, GL_LINE...
Add qp controller input snooper
Add qp controller input snooper
Python
bsd-3-clause
openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro
Add qp controller input snooper
#!/usr/bin/python ''' Listens to QP Controller Inputs and draws, in different but order-consistent colors, the cubic splines being followed by each body motion block. ''' import lcm import drc from drake import lcmt_qp_controller_input, lcmt_body_motion_data import sys import time from bot_lcmgl import lcmgl, GL_LINE...
<commit_before><commit_msg>Add qp controller input snooper<commit_after>
#!/usr/bin/python ''' Listens to QP Controller Inputs and draws, in different but order-consistent colors, the cubic splines being followed by each body motion block. ''' import lcm import drc from drake import lcmt_qp_controller_input, lcmt_body_motion_data import sys import time from bot_lcmgl import lcmgl, GL_LINE...
Add qp controller input snooper#!/usr/bin/python ''' Listens to QP Controller Inputs and draws, in different but order-consistent colors, the cubic splines being followed by each body motion block. ''' import lcm import drc from drake import lcmt_qp_controller_input, lcmt_body_motion_data import sys import time from ...
<commit_before><commit_msg>Add qp controller input snooper<commit_after>#!/usr/bin/python ''' Listens to QP Controller Inputs and draws, in different but order-consistent colors, the cubic splines being followed by each body motion block. ''' import lcm import drc from drake import lcmt_qp_controller_input, lcmt_body...
0ebfe4a0777850aa851c7d7bc0f642d692a1515a
2016/qualification_round/revenge_of_the_pancakes.py
2016/qualification_round/revenge_of_the_pancakes.py
#!/usr/bin/env python # Google Code Jam # Google Code Jam 2016 # Qualification Round 2016 # Problem B. Revenge of the Pancakes # Solved all test sets from __future__ import print_function def calc_min_flip_step(s): grouped_height = 1 + s.count('-+') + s.count('+-') if s.endswith('-'): return grouped...
Add revenge of the pancakes
Add revenge of the pancakes
Python
apache-2.0
laichunpongben/CodeJam
Add revenge of the pancakes
#!/usr/bin/env python # Google Code Jam # Google Code Jam 2016 # Qualification Round 2016 # Problem B. Revenge of the Pancakes # Solved all test sets from __future__ import print_function def calc_min_flip_step(s): grouped_height = 1 + s.count('-+') + s.count('+-') if s.endswith('-'): return grouped...
<commit_before><commit_msg>Add revenge of the pancakes<commit_after>
#!/usr/bin/env python # Google Code Jam # Google Code Jam 2016 # Qualification Round 2016 # Problem B. Revenge of the Pancakes # Solved all test sets from __future__ import print_function def calc_min_flip_step(s): grouped_height = 1 + s.count('-+') + s.count('+-') if s.endswith('-'): return grouped...
Add revenge of the pancakes#!/usr/bin/env python # Google Code Jam # Google Code Jam 2016 # Qualification Round 2016 # Problem B. Revenge of the Pancakes # Solved all test sets from __future__ import print_function def calc_min_flip_step(s): grouped_height = 1 + s.count('-+') + s.count('+-') if s.endswith('...
<commit_before><commit_msg>Add revenge of the pancakes<commit_after>#!/usr/bin/env python # Google Code Jam # Google Code Jam 2016 # Qualification Round 2016 # Problem B. Revenge of the Pancakes # Solved all test sets from __future__ import print_function def calc_min_flip_step(s): grouped_height = 1 + s.count(...
04d795a6f51a701e522bfbad86b948f1efcb3b68
globaleaks/tests/test_jobs.py
globaleaks/tests/test_jobs.py
from twisted.internet.defer import inlineCallbacks from twisted.trial import unittest from globaleaks.settings import transact from globaleaks.jobs import delivery_sched from globaleaks.tests import helpers from globaleaks.handlers.receiver import get_receiver_tip_list from globaleaks.handlers.submission import final...
Add unittest for creation of tips
Add unittest for creation of tips
Python
agpl-3.0
vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks
Add unittest for creation of tips
from twisted.internet.defer import inlineCallbacks from twisted.trial import unittest from globaleaks.settings import transact from globaleaks.jobs import delivery_sched from globaleaks.tests import helpers from globaleaks.handlers.receiver import get_receiver_tip_list from globaleaks.handlers.submission import final...
<commit_before><commit_msg>Add unittest for creation of tips<commit_after>
from twisted.internet.defer import inlineCallbacks from twisted.trial import unittest from globaleaks.settings import transact from globaleaks.jobs import delivery_sched from globaleaks.tests import helpers from globaleaks.handlers.receiver import get_receiver_tip_list from globaleaks.handlers.submission import final...
Add unittest for creation of tipsfrom twisted.internet.defer import inlineCallbacks from twisted.trial import unittest from globaleaks.settings import transact from globaleaks.jobs import delivery_sched from globaleaks.tests import helpers from globaleaks.handlers.receiver import get_receiver_tip_list from globaleaks...
<commit_before><commit_msg>Add unittest for creation of tips<commit_after>from twisted.internet.defer import inlineCallbacks from twisted.trial import unittest from globaleaks.settings import transact from globaleaks.jobs import delivery_sched from globaleaks.tests import helpers from globaleaks.handlers.receiver imp...
c526a5745fccddc5df8179969c52dceacf8c1db3
scripts/update_ora2_truncated_course_ids.py
scripts/update_ora2_truncated_course_ids.py
#!/usr/bin/env python """ Script to fix workflows with truncated course_ids from https://github.com/Stanford-Online/edx-ora2/pull/25. AIClassifierSet, AIGradingWorkflow and AITrainingWorkflow excluded as they are not used by Stanford. """ from itertools import chain import os import django from django.db.models.functio...
Add script to update ora2 workflows with truncated course_ids
Add script to update ora2 workflows with truncated course_ids Stanford-Online/edx-ora2#25 expands course_id length. Note this script does not account for ambiguous truncated course_ids (i.e. multiple different full course_ids match the truncation). This edge case does not happen on our instances.
Python
agpl-3.0
caesar2164/edx-platform,caesar2164/edx-platform,Stanford-Online/edx-platform,Stanford-Online/edx-platform,Stanford-Online/edx-platform,caesar2164/edx-platform,Stanford-Online/edx-platform,caesar2164/edx-platform
Add script to update ora2 workflows with truncated course_ids Stanford-Online/edx-ora2#25 expands course_id length. Note this script does not account for ambiguous truncated course_ids (i.e. multiple different full course_ids match the truncation). This edge case does not happen on our instances.
#!/usr/bin/env python """ Script to fix workflows with truncated course_ids from https://github.com/Stanford-Online/edx-ora2/pull/25. AIClassifierSet, AIGradingWorkflow and AITrainingWorkflow excluded as they are not used by Stanford. """ from itertools import chain import os import django from django.db.models.functio...
<commit_before><commit_msg>Add script to update ora2 workflows with truncated course_ids Stanford-Online/edx-ora2#25 expands course_id length. Note this script does not account for ambiguous truncated course_ids (i.e. multiple different full course_ids match the truncation). This edge case does not happen on our insta...
#!/usr/bin/env python """ Script to fix workflows with truncated course_ids from https://github.com/Stanford-Online/edx-ora2/pull/25. AIClassifierSet, AIGradingWorkflow and AITrainingWorkflow excluded as they are not used by Stanford. """ from itertools import chain import os import django from django.db.models.functio...
Add script to update ora2 workflows with truncated course_ids Stanford-Online/edx-ora2#25 expands course_id length. Note this script does not account for ambiguous truncated course_ids (i.e. multiple different full course_ids match the truncation). This edge case does not happen on our instances.#!/usr/bin/env python ...
<commit_before><commit_msg>Add script to update ora2 workflows with truncated course_ids Stanford-Online/edx-ora2#25 expands course_id length. Note this script does not account for ambiguous truncated course_ids (i.e. multiple different full course_ids match the truncation). This edge case does not happen on our insta...
bd11a0b7885b15ee6d7f54c9fe99c09ae0d13701
Crawer-GoogleNew.py
Crawer-GoogleNew.py
#!/usr/bin/env python3 #Crawer Google News # coding=utf-8 # -*- coding: utf8 -*- from urllib.request import urlopen from bs4 import BeautifulSoup res = urlopen("https://news.google.com") soup = BeautifulSoup(res, "html.parser") #print soup.select(".esc-body") count = 1 for item in soup.select(".esc-body"): prin...
Add modify code Google News Crawer
Add modify code Google News Crawer
Python
epl-1.0
KuChanTung/Python
Add modify code Google News Crawer
#!/usr/bin/env python3 #Crawer Google News # coding=utf-8 # -*- coding: utf8 -*- from urllib.request import urlopen from bs4 import BeautifulSoup res = urlopen("https://news.google.com") soup = BeautifulSoup(res, "html.parser") #print soup.select(".esc-body") count = 1 for item in soup.select(".esc-body"): prin...
<commit_before><commit_msg>Add modify code Google News Crawer<commit_after>
#!/usr/bin/env python3 #Crawer Google News # coding=utf-8 # -*- coding: utf8 -*- from urllib.request import urlopen from bs4 import BeautifulSoup res = urlopen("https://news.google.com") soup = BeautifulSoup(res, "html.parser") #print soup.select(".esc-body") count = 1 for item in soup.select(".esc-body"): prin...
Add modify code Google News Crawer#!/usr/bin/env python3 #Crawer Google News # coding=utf-8 # -*- coding: utf8 -*- from urllib.request import urlopen from bs4 import BeautifulSoup res = urlopen("https://news.google.com") soup = BeautifulSoup(res, "html.parser") #print soup.select(".esc-body") count = 1 for item in ...
<commit_before><commit_msg>Add modify code Google News Crawer<commit_after>#!/usr/bin/env python3 #Crawer Google News # coding=utf-8 # -*- coding: utf8 -*- from urllib.request import urlopen from bs4 import BeautifulSoup res = urlopen("https://news.google.com") soup = BeautifulSoup(res, "html.parser") #print soup.sel...
8f6b308a9b0f2a4469bae8b844776245e69a8eaf
TWLight/users/migrations/0056_expire_all_sessions.py
TWLight/users/migrations/0056_expire_all_sessions.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-05-08 17:49 from __future__ import unicode_literals from django.db import migrations from django.core import management from django.contrib.sessions.models import Session from django.utils.timezone import now def expire_all_sessions(apps, schema_editor): ...
Add migration clearing all sessions.
Add migration clearing all sessions.
Python
mit
WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight
Add migration clearing all sessions.
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-05-08 17:49 from __future__ import unicode_literals from django.db import migrations from django.core import management from django.contrib.sessions.models import Session from django.utils.timezone import now def expire_all_sessions(apps, schema_editor): ...
<commit_before><commit_msg>Add migration clearing all sessions.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-05-08 17:49 from __future__ import unicode_literals from django.db import migrations from django.core import management from django.contrib.sessions.models import Session from django.utils.timezone import now def expire_all_sessions(apps, schema_editor): ...
Add migration clearing all sessions.# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-05-08 17:49 from __future__ import unicode_literals from django.db import migrations from django.core import management from django.contrib.sessions.models import Session from django.utils.timezone import now def expire...
<commit_before><commit_msg>Add migration clearing all sessions.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-05-08 17:49 from __future__ import unicode_literals from django.db import migrations from django.core import management from django.contrib.sessions.models import Session from djan...
f2e22271bab3b1fb9152f57003ee96c009afcc72
django/artists/tests/test_serializers.py
django/artists/tests/test_serializers.py
from unittest import TestCase from ..models import Artist, Hyperlink from ..serializers import ArtistSerializer, HyperlinkSerializer class HyperlinkSerializerTest(TestCase): """Tests for Hyperlink serializer.""" def test_valid_fields(self): id_ = 4 name = 'jamendo' display_name = "J...
Add tests for artist serializers
Add tests for artist serializers
Python
bsd-3-clause
FreeMusicNinja/freemusic.ninja,FreeMusicNinja/freemusic.ninja
Add tests for artist serializers
from unittest import TestCase from ..models import Artist, Hyperlink from ..serializers import ArtistSerializer, HyperlinkSerializer class HyperlinkSerializerTest(TestCase): """Tests for Hyperlink serializer.""" def test_valid_fields(self): id_ = 4 name = 'jamendo' display_name = "J...
<commit_before><commit_msg>Add tests for artist serializers<commit_after>
from unittest import TestCase from ..models import Artist, Hyperlink from ..serializers import ArtistSerializer, HyperlinkSerializer class HyperlinkSerializerTest(TestCase): """Tests for Hyperlink serializer.""" def test_valid_fields(self): id_ = 4 name = 'jamendo' display_name = "J...
Add tests for artist serializersfrom unittest import TestCase from ..models import Artist, Hyperlink from ..serializers import ArtistSerializer, HyperlinkSerializer class HyperlinkSerializerTest(TestCase): """Tests for Hyperlink serializer.""" def test_valid_fields(self): id_ = 4 name = 'ja...
<commit_before><commit_msg>Add tests for artist serializers<commit_after>from unittest import TestCase from ..models import Artist, Hyperlink from ..serializers import ArtistSerializer, HyperlinkSerializer class HyperlinkSerializerTest(TestCase): """Tests for Hyperlink serializer.""" def test_valid_fields(...
2274eb1fcc2330188d9b84da261f5a370da61092
indra/sources/hypothesis/annotator.py
indra/sources/hypothesis/annotator.py
from indra.assemblers.english import EnglishAssembler from indra.databases import identifiers from indra.statements.agent import get_grounding, default_ns_order grounding_ns = default_ns_order + \ ['NCIT', 'PUBCHEM', 'CHEMBL'] def statement_to_annotations(stmt, annotate_agents=True): annotation_text = get_a...
Implement more sophisticated annotation generation
Implement more sophisticated annotation generation
Python
bsd-2-clause
sorgerlab/belpy,bgyori/indra,johnbachman/indra,sorgerlab/indra,johnbachman/indra,bgyori/indra,sorgerlab/indra,bgyori/indra,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,sorgerlab/belpy
Implement more sophisticated annotation generation
from indra.assemblers.english import EnglishAssembler from indra.databases import identifiers from indra.statements.agent import get_grounding, default_ns_order grounding_ns = default_ns_order + \ ['NCIT', 'PUBCHEM', 'CHEMBL'] def statement_to_annotations(stmt, annotate_agents=True): annotation_text = get_a...
<commit_before><commit_msg>Implement more sophisticated annotation generation<commit_after>
from indra.assemblers.english import EnglishAssembler from indra.databases import identifiers from indra.statements.agent import get_grounding, default_ns_order grounding_ns = default_ns_order + \ ['NCIT', 'PUBCHEM', 'CHEMBL'] def statement_to_annotations(stmt, annotate_agents=True): annotation_text = get_a...
Implement more sophisticated annotation generationfrom indra.assemblers.english import EnglishAssembler from indra.databases import identifiers from indra.statements.agent import get_grounding, default_ns_order grounding_ns = default_ns_order + \ ['NCIT', 'PUBCHEM', 'CHEMBL'] def statement_to_annotations(stmt, ...
<commit_before><commit_msg>Implement more sophisticated annotation generation<commit_after>from indra.assemblers.english import EnglishAssembler from indra.databases import identifiers from indra.statements.agent import get_grounding, default_ns_order grounding_ns = default_ns_order + \ ['NCIT', 'PUBCHEM', 'CHEMB...
d7c958299382ec3177318cf818d0c90d467a2369
migrations/006_add_indexes.py
migrations/006_add_indexes.py
import logging import migrations logging.basicConfig() log = logging.getLogger() conn = migrations.connect() cur = conn.cursor() def drop_index(table, idx): cur.execute("SHOW INDEX FROM %s WHERE KEY_NAME='%s'" % (table, idx)) if cur.fetchone(): cur.execute("DROP INDEX %s ON %s" % (idx, table)) dro...
Add migration script to add indexes
Add migration script to add indexes
Python
apache-2.0
pegasus-isi/pegasus-metrics,pegasus-isi/pegasus-metrics,pegasus-isi/pegasus-metrics
Add migration script to add indexes
import logging import migrations logging.basicConfig() log = logging.getLogger() conn = migrations.connect() cur = conn.cursor() def drop_index(table, idx): cur.execute("SHOW INDEX FROM %s WHERE KEY_NAME='%s'" % (table, idx)) if cur.fetchone(): cur.execute("DROP INDEX %s ON %s" % (idx, table)) dro...
<commit_before><commit_msg>Add migration script to add indexes<commit_after>
import logging import migrations logging.basicConfig() log = logging.getLogger() conn = migrations.connect() cur = conn.cursor() def drop_index(table, idx): cur.execute("SHOW INDEX FROM %s WHERE KEY_NAME='%s'" % (table, idx)) if cur.fetchone(): cur.execute("DROP INDEX %s ON %s" % (idx, table)) dro...
Add migration script to add indexesimport logging import migrations logging.basicConfig() log = logging.getLogger() conn = migrations.connect() cur = conn.cursor() def drop_index(table, idx): cur.execute("SHOW INDEX FROM %s WHERE KEY_NAME='%s'" % (table, idx)) if cur.fetchone(): cur.execute("DROP I...
<commit_before><commit_msg>Add migration script to add indexes<commit_after>import logging import migrations logging.basicConfig() log = logging.getLogger() conn = migrations.connect() cur = conn.cursor() def drop_index(table, idx): cur.execute("SHOW INDEX FROM %s WHERE KEY_NAME='%s'" % (table, idx)) if cu...
20b10fcedc6395dc693185e01fc4c56479660c52
scripts/release/rethreshold_family.py
scripts/release/rethreshold_family.py
""" Copyright [2009-2019] EMBL-European Bioinformatics Institute 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 a...
Add function to checkout a family
Add function to checkout a family
Python
apache-2.0
Rfam/rfam-production,Rfam/rfam-production,Rfam/rfam-production
Add function to checkout a family
""" Copyright [2009-2019] EMBL-European Bioinformatics Institute 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 a...
<commit_before><commit_msg>Add function to checkout a family<commit_after>
""" Copyright [2009-2019] EMBL-European Bioinformatics Institute 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 a...
Add function to checkout a family""" Copyright [2009-2019] EMBL-European Bioinformatics Institute 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 Unles...
<commit_before><commit_msg>Add function to checkout a family<commit_after>""" Copyright [2009-2019] EMBL-European Bioinformatics Institute 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://...
b6b617fe24f39bf4000977d4171349aee2a729b5
ocradmin/plugins/abbyy_nodes.py
ocradmin/plugins/abbyy_nodes.py
""" Cuneiform Recogniser """ from nodetree import node, manager from ocradmin import plugins from ocradmin.plugins import stages, generic_nodes import types import os import shutil import tempfile import subprocess as sp NAME = "Abbyy" class AbbyyRecognizerNode(generic_nodes.CommandLineRecognizerNode): """ ...
Add a quicky Abbyy recogniser node. Doesn't seem to work yet, but can't be sure 'cos our license has run out of pages...
Add a quicky Abbyy recogniser node. Doesn't seem to work yet, but can't be sure 'cos our license has run out of pages...
Python
apache-2.0
vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium
Add a quicky Abbyy recogniser node. Doesn't seem to work yet, but can't be sure 'cos our license has run out of pages...
""" Cuneiform Recogniser """ from nodetree import node, manager from ocradmin import plugins from ocradmin.plugins import stages, generic_nodes import types import os import shutil import tempfile import subprocess as sp NAME = "Abbyy" class AbbyyRecognizerNode(generic_nodes.CommandLineRecognizerNode): """ ...
<commit_before><commit_msg>Add a quicky Abbyy recogniser node. Doesn't seem to work yet, but can't be sure 'cos our license has run out of pages...<commit_after>
""" Cuneiform Recogniser """ from nodetree import node, manager from ocradmin import plugins from ocradmin.plugins import stages, generic_nodes import types import os import shutil import tempfile import subprocess as sp NAME = "Abbyy" class AbbyyRecognizerNode(generic_nodes.CommandLineRecognizerNode): """ ...
Add a quicky Abbyy recogniser node. Doesn't seem to work yet, but can't be sure 'cos our license has run out of pages...""" Cuneiform Recogniser """ from nodetree import node, manager from ocradmin import plugins from ocradmin.plugins import stages, generic_nodes import types import os import shutil import tempfile ...
<commit_before><commit_msg>Add a quicky Abbyy recogniser node. Doesn't seem to work yet, but can't be sure 'cos our license has run out of pages...<commit_after>""" Cuneiform Recogniser """ from nodetree import node, manager from ocradmin import plugins from ocradmin.plugins import stages, generic_nodes import types ...
48c942e89e343cbd7de009a87302396a077054b4
apps/domain/tests/test_routes/test_groups.py
apps/domain/tests/test_routes/test_groups.py
def test_create_group(client): result = client.post("/groups/", data={"group_name": "group test", "members": ["239y94asd", "whor244123"]}) assert result.status_code == 200 assert result.get_json() == {"msg": "Group created succesfully!"} def test_get_all_groups(client): result = client.get("/groups/")...
ADD Domain groups unit tests
ADD Domain groups unit tests
Python
apache-2.0
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
ADD Domain groups unit tests
def test_create_group(client): result = client.post("/groups/", data={"group_name": "group test", "members": ["239y94asd", "whor244123"]}) assert result.status_code == 200 assert result.get_json() == {"msg": "Group created succesfully!"} def test_get_all_groups(client): result = client.get("/groups/")...
<commit_before><commit_msg>ADD Domain groups unit tests<commit_after>
def test_create_group(client): result = client.post("/groups/", data={"group_name": "group test", "members": ["239y94asd", "whor244123"]}) assert result.status_code == 200 assert result.get_json() == {"msg": "Group created succesfully!"} def test_get_all_groups(client): result = client.get("/groups/")...
ADD Domain groups unit tests def test_create_group(client): result = client.post("/groups/", data={"group_name": "group test", "members": ["239y94asd", "whor244123"]}) assert result.status_code == 200 assert result.get_json() == {"msg": "Group created succesfully!"} def test_get_all_groups(client): res...
<commit_before><commit_msg>ADD Domain groups unit tests<commit_after> def test_create_group(client): result = client.post("/groups/", data={"group_name": "group test", "members": ["239y94asd", "whor244123"]}) assert result.status_code == 200 assert result.get_json() == {"msg": "Group created succesfully!"} ...
9ebd1ed784bbd91ac06a401e3c0e4113a09436f1
test/test_regions.py
test/test_regions.py
import numpy as np import pyfds as fds def test_output(): out = fds.Output(fds.LineRegion([0, 1, 2], [0, 0.2], 'test output')) out.signals = [np.linspace(0, 1) for _ in range(len(out.region.indices))] assert np.allclose(out.mean_signal, np.linspace(0, 1))
Add test case for Output class.
Add test case for Output class.
Python
bsd-3-clause
emtpb/pyfds
Add test case for Output class.
import numpy as np import pyfds as fds def test_output(): out = fds.Output(fds.LineRegion([0, 1, 2], [0, 0.2], 'test output')) out.signals = [np.linspace(0, 1) for _ in range(len(out.region.indices))] assert np.allclose(out.mean_signal, np.linspace(0, 1))
<commit_before><commit_msg>Add test case for Output class.<commit_after>
import numpy as np import pyfds as fds def test_output(): out = fds.Output(fds.LineRegion([0, 1, 2], [0, 0.2], 'test output')) out.signals = [np.linspace(0, 1) for _ in range(len(out.region.indices))] assert np.allclose(out.mean_signal, np.linspace(0, 1))
Add test case for Output class.import numpy as np import pyfds as fds def test_output(): out = fds.Output(fds.LineRegion([0, 1, 2], [0, 0.2], 'test output')) out.signals = [np.linspace(0, 1) for _ in range(len(out.region.indices))] assert np.allclose(out.mean_signal, np.linspace(0, 1))
<commit_before><commit_msg>Add test case for Output class.<commit_after>import numpy as np import pyfds as fds def test_output(): out = fds.Output(fds.LineRegion([0, 1, 2], [0, 0.2], 'test output')) out.signals = [np.linspace(0, 1) for _ in range(len(out.region.indices))] assert np.allclose(out.mean_signa...
b1076f68a33b1358b0de1825e683537bfd58979e
bin/2000/shape_msa_block.py
bin/2000/shape_msa_block.py
"""shape_msa_block.py Output one shapefile per MSA featuring all the blocks it contains """ import os import csv import fiona # # Import MSA to blockgroup crosswalk # msa_to_block = {} with open('data/2000/crosswalks/msa_block.csv', 'r') as source: reader = csv.reader(source, delimiter='\t') reader.next() ...
Add script to extract the shape of all blocks contained in the 2000 MSA
Add script to extract the shape of all blocks contained in the 2000 MSA
Python
bsd-2-clause
scities/2000-us-metro-atlas
Add script to extract the shape of all blocks contained in the 2000 MSA
"""shape_msa_block.py Output one shapefile per MSA featuring all the blocks it contains """ import os import csv import fiona # # Import MSA to blockgroup crosswalk # msa_to_block = {} with open('data/2000/crosswalks/msa_block.csv', 'r') as source: reader = csv.reader(source, delimiter='\t') reader.next() ...
<commit_before><commit_msg>Add script to extract the shape of all blocks contained in the 2000 MSA<commit_after>
"""shape_msa_block.py Output one shapefile per MSA featuring all the blocks it contains """ import os import csv import fiona # # Import MSA to blockgroup crosswalk # msa_to_block = {} with open('data/2000/crosswalks/msa_block.csv', 'r') as source: reader = csv.reader(source, delimiter='\t') reader.next() ...
Add script to extract the shape of all blocks contained in the 2000 MSA"""shape_msa_block.py Output one shapefile per MSA featuring all the blocks it contains """ import os import csv import fiona # # Import MSA to blockgroup crosswalk # msa_to_block = {} with open('data/2000/crosswalks/msa_block.csv', 'r') as sour...
<commit_before><commit_msg>Add script to extract the shape of all blocks contained in the 2000 MSA<commit_after>"""shape_msa_block.py Output one shapefile per MSA featuring all the blocks it contains """ import os import csv import fiona # # Import MSA to blockgroup crosswalk # msa_to_block = {} with open('data/200...
7b6081ac2918ca8a6c3400a3284129e1329c1cac
letsencrypt/client/apache_obj.py
letsencrypt/client/apache_obj.py
"""Module contains classes used by the Apache Configurator.""" class Addr(object): """Represents an Apache VirtualHost address.""" def __init__(self, addr): """:param tuple addr: tuple of strings (ip, port)""" self.tup = addr @classmethod def fromstring(cls, str_addr): ...
Move out Apache specific Objects
Move out Apache specific Objects
Python
apache-2.0
mrb/letsencrypt,dietsche/letsencrypt,tdfischer/lets-encrypt-preview,hlieberman/letsencrypt,lbeltrame/letsencrypt,ruo91/letsencrypt,rutsky/letsencrypt,skynet/letsencrypt,Sveder/letsencrypt,stweil/letsencrypt,g1franc/lets-encrypt-preview,rutsky/letsencrypt,BillKeenan/lets-encrypt-preview,jtl999/certbot,Jadaw1n/letsencryp...
Move out Apache specific Objects
"""Module contains classes used by the Apache Configurator.""" class Addr(object): """Represents an Apache VirtualHost address.""" def __init__(self, addr): """:param tuple addr: tuple of strings (ip, port)""" self.tup = addr @classmethod def fromstring(cls, str_addr): ...
<commit_before><commit_msg>Move out Apache specific Objects<commit_after>
"""Module contains classes used by the Apache Configurator.""" class Addr(object): """Represents an Apache VirtualHost address.""" def __init__(self, addr): """:param tuple addr: tuple of strings (ip, port)""" self.tup = addr @classmethod def fromstring(cls, str_addr): ...
Move out Apache specific Objects"""Module contains classes used by the Apache Configurator.""" class Addr(object): """Represents an Apache VirtualHost address.""" def __init__(self, addr): """:param tuple addr: tuple of strings (ip, port)""" self.tup = addr @classmethod def fro...
<commit_before><commit_msg>Move out Apache specific Objects<commit_after>"""Module contains classes used by the Apache Configurator.""" class Addr(object): """Represents an Apache VirtualHost address.""" def __init__(self, addr): """:param tuple addr: tuple of strings (ip, port)""" self.tup = a...
fba89c72c13279c0709b0967a597427ee177665b
tests/test_angles.py
tests/test_angles.py
import unittest from flatlib import angle class AngleTests(unittest.TestCase): def setUp(self): pass def test_norm(self): """Tests angle normalizations.""" self.assertEqual(angle.norm(0), 0) self.assertEqual(angle.norm(360), 0) self.assertEqual(angle.norm(361), 1) ...
Create tests for basic angle computations
Create tests for basic angle computations
Python
mit
flatangle/flatlib
Create tests for basic angle computations
import unittest from flatlib import angle class AngleTests(unittest.TestCase): def setUp(self): pass def test_norm(self): """Tests angle normalizations.""" self.assertEqual(angle.norm(0), 0) self.assertEqual(angle.norm(360), 0) self.assertEqual(angle.norm(361), 1) ...
<commit_before><commit_msg>Create tests for basic angle computations<commit_after>
import unittest from flatlib import angle class AngleTests(unittest.TestCase): def setUp(self): pass def test_norm(self): """Tests angle normalizations.""" self.assertEqual(angle.norm(0), 0) self.assertEqual(angle.norm(360), 0) self.assertEqual(angle.norm(361), 1) ...
Create tests for basic angle computationsimport unittest from flatlib import angle class AngleTests(unittest.TestCase): def setUp(self): pass def test_norm(self): """Tests angle normalizations.""" self.assertEqual(angle.norm(0), 0) self.assertEqual(angle.norm(360), 0) ...
<commit_before><commit_msg>Create tests for basic angle computations<commit_after>import unittest from flatlib import angle class AngleTests(unittest.TestCase): def setUp(self): pass def test_norm(self): """Tests angle normalizations.""" self.assertEqual(angle.norm(0), 0) se...
8e221ddbd84b11364208fd505c9a7854aca1c854
mistral/db/sqlalchemy/migration/alembic_migrations/versions/015_add_unique_keys_for_non_locking_model.py
mistral/db/sqlalchemy/migration/alembic_migrations/versions/015_add_unique_keys_for_non_locking_model.py
# Copyright 2016 OpenStack Foundation. # # 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 ...
Add unique keys for non locking model
Add unique keys for non locking model The unique key colums are part of the new non locking model. The migration scripts adds 2 unique key columns to 2 tables. One of the new columns is already in the model and the other is under review. Change-Id: Icd352ed709f378a8141bcf6264bc9abba0f8db9a Closes-Bug: #1610269
Python
apache-2.0
StackStorm/mistral,openstack/mistral,openstack/mistral,StackStorm/mistral
Add unique keys for non locking model The unique key colums are part of the new non locking model. The migration scripts adds 2 unique key columns to 2 tables. One of the new columns is already in the model and the other is under review. Change-Id: Icd352ed709f378a8141bcf6264bc9abba0f8db9a Closes-Bug: #1610269
# Copyright 2016 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
<commit_before><commit_msg>Add unique keys for non locking model The unique key colums are part of the new non locking model. The migration scripts adds 2 unique key columns to 2 tables. One of the new columns is already in the model and the other is under review. Change-Id: Icd352ed709f378a8141bcf6264bc9abba0f8db9a...
# Copyright 2016 OpenStack Foundation. # # 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 ...
Add unique keys for non locking model The unique key colums are part of the new non locking model. The migration scripts adds 2 unique key columns to 2 tables. One of the new columns is already in the model and the other is under review. Change-Id: Icd352ed709f378a8141bcf6264bc9abba0f8db9a Closes-Bug: #1610269# Copy...
<commit_before><commit_msg>Add unique keys for non locking model The unique key colums are part of the new non locking model. The migration scripts adds 2 unique key columns to 2 tables. One of the new columns is already in the model and the other is under review. Change-Id: Icd352ed709f378a8141bcf6264bc9abba0f8db9a...
674721cc3e0f7fac030cf75fcdcfc4ee3d2f539f
runtime/python/test/test_err.py
runtime/python/test/test_err.py
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
Test err handling in Py glue.
Test err handling in Py glue. Check that a Clownfish exception gets transformed into a Python exception.
Python
apache-2.0
rectang/lucy-clownfish,apache/lucy-clownfish,rectang/lucy-clownfish,apache/lucy-clownfish,nwellnhof/lucy-clownfish,rectang/lucy-clownfish,nwellnhof/lucy-clownfish,apache/lucy-clownfish,nwellnhof/lucy-clownfish,apache/lucy-clownfish,nwellnhof/lucy-clownfish,apache/lucy-clownfish,apache/lucy-clownfish,rectang/lucy-clownf...
Test err handling in Py glue. Check that a Clownfish exception gets transformed into a Python exception.
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
<commit_before><commit_msg>Test err handling in Py glue. Check that a Clownfish exception gets transformed into a Python exception.<commit_after>
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
Test err handling in Py glue. Check that a Clownfish exception gets transformed into a Python exception.# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # Th...
<commit_before><commit_msg>Test err handling in Py glue. Check that a Clownfish exception gets transformed into a Python exception.<commit_after># Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional inform...
59c7a33693bfc45eca95a0bd3bd271f6ec904a3d
libs/playback/config/add_swap.py
libs/playback/config/add_swap.py
# The MIT License (MIT) # # Copyright (c) 2015 Taio Jia (jiasir) <jiasir@icloud.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the ri...
Add compute swap when needed
Add compute swap when needed
Python
mit
nofdev/playback,jiasir/playback
Add compute swap when needed
# The MIT License (MIT) # # Copyright (c) 2015 Taio Jia (jiasir) <jiasir@icloud.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the ri...
<commit_before><commit_msg>Add compute swap when needed<commit_after>
# The MIT License (MIT) # # Copyright (c) 2015 Taio Jia (jiasir) <jiasir@icloud.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the ri...
Add compute swap when needed# The MIT License (MIT) # # Copyright (c) 2015 Taio Jia (jiasir) <jiasir@icloud.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, includi...
<commit_before><commit_msg>Add compute swap when needed<commit_after># The MIT License (MIT) # # Copyright (c) 2015 Taio Jia (jiasir) <jiasir@icloud.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in ...
c1f01676e63280c379bd6b39f30d8b42750bda68
mpu9255.py
mpu9255.py
# mpu9255.py MicroPython driver for the InvenSense MPU9255 inertial measurement unit # Authors Peter Hinch, Sebastian Plamauer # V0.1 7th October 2022 ''' mpu9255 is a micropython module for the InvenSense MPU9255 sensor. It measures acceleration, turn rate and the magnetic field in three axis. The MPU9255 sensor is f...
Fix bad chip ID error when using MPU9250 class with MPU9255 sensor
Fix bad chip ID error when using MPU9250 class with MPU9255 sensor
Python
mit
micropython-IMU/micropython-mpu9x50
Fix bad chip ID error when using MPU9250 class with MPU9255 sensor
# mpu9255.py MicroPython driver for the InvenSense MPU9255 inertial measurement unit # Authors Peter Hinch, Sebastian Plamauer # V0.1 7th October 2022 ''' mpu9255 is a micropython module for the InvenSense MPU9255 sensor. It measures acceleration, turn rate and the magnetic field in three axis. The MPU9255 sensor is f...
<commit_before><commit_msg>Fix bad chip ID error when using MPU9250 class with MPU9255 sensor<commit_after>
# mpu9255.py MicroPython driver for the InvenSense MPU9255 inertial measurement unit # Authors Peter Hinch, Sebastian Plamauer # V0.1 7th October 2022 ''' mpu9255 is a micropython module for the InvenSense MPU9255 sensor. It measures acceleration, turn rate and the magnetic field in three axis. The MPU9255 sensor is f...
Fix bad chip ID error when using MPU9250 class with MPU9255 sensor# mpu9255.py MicroPython driver for the InvenSense MPU9255 inertial measurement unit # Authors Peter Hinch, Sebastian Plamauer # V0.1 7th October 2022 ''' mpu9255 is a micropython module for the InvenSense MPU9255 sensor. It measures acceleration, turn ...
<commit_before><commit_msg>Fix bad chip ID error when using MPU9250 class with MPU9255 sensor<commit_after># mpu9255.py MicroPython driver for the InvenSense MPU9255 inertial measurement unit # Authors Peter Hinch, Sebastian Plamauer # V0.1 7th October 2022 ''' mpu9255 is a micropython module for the InvenSense MPU925...
8651febe42d49d535095d07c27143331b0285b93
numba/cuda/tests/cudapy/test_datetime.py
numba/cuda/tests/cudapy/test_datetime.py
from __future__ import print_function import numpy as np from numba import cuda from numba import unittest_support as unittest from numba.tests.support import TestCase from numba.cuda.testing import SerialMixin class TestCudaAutojit(SerialMixin, TestCase): def test_basic_datetime_kernel(self): @cuda.jit...
Add test for gpu datetime
Add test for gpu datetime
Python
bsd-2-clause
seibert/numba,stonebig/numba,IntelLabs/numba,stonebig/numba,sklam/numba,cpcloud/numba,cpcloud/numba,seibert/numba,IntelLabs/numba,jriehl/numba,IntelLabs/numba,gmarkall/numba,stonebig/numba,sklam/numba,cpcloud/numba,sklam/numba,stuartarchibald/numba,numba/numba,jriehl/numba,gmarkall/numba,stuartarchibald/numba,gmarkall/...
Add test for gpu datetime
from __future__ import print_function import numpy as np from numba import cuda from numba import unittest_support as unittest from numba.tests.support import TestCase from numba.cuda.testing import SerialMixin class TestCudaAutojit(SerialMixin, TestCase): def test_basic_datetime_kernel(self): @cuda.jit...
<commit_before><commit_msg>Add test for gpu datetime<commit_after>
from __future__ import print_function import numpy as np from numba import cuda from numba import unittest_support as unittest from numba.tests.support import TestCase from numba.cuda.testing import SerialMixin class TestCudaAutojit(SerialMixin, TestCase): def test_basic_datetime_kernel(self): @cuda.jit...
Add test for gpu datetimefrom __future__ import print_function import numpy as np from numba import cuda from numba import unittest_support as unittest from numba.tests.support import TestCase from numba.cuda.testing import SerialMixin class TestCudaAutojit(SerialMixin, TestCase): def test_basic_datetime_kernel...
<commit_before><commit_msg>Add test for gpu datetime<commit_after>from __future__ import print_function import numpy as np from numba import cuda from numba import unittest_support as unittest from numba.tests.support import TestCase from numba.cuda.testing import SerialMixin class TestCudaAutojit(SerialMixin, Test...
5fab5508f5710c764f88bc27378711128df5f962
src/dbus_python_client_gen/_errors.py
src/dbus_python_client_gen/_errors.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Exception hierarchy for this package. """ class DPClientError(Exception): """ Top-level error. """ ...
Add a few error classes
Add a few error classes Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com>
Python
mpl-2.0
mulkieran/dbus-python-client-gen
Add a few error classes Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com>
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Exception hierarchy for this package. """ class DPClientError(Exception): """ Top-level error. """ ...
<commit_before><commit_msg>Add a few error classes Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com><commit_after>
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Exception hierarchy for this package. """ class DPClientError(Exception): """ Top-level error. """ ...
Add a few error classes Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Exception hiera...
<commit_before><commit_msg>Add a few error classes Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com><commit_after># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://m...
01b0afde57aa109f7b5fa6fccce0d67cdeeec7dc
belpy/tests/test_biopax.py
belpy/tests/test_biopax.py
from belpy.biopax import biopax_api from belpy.pysb_assembler import PysbAssembler def test_hyphenated_agent_names(): """This query should contain reactions with agent names RAF1-BRAF, which need to be canonicalized to Python-compatible names before model assembly.""" bp = biopax_api.process_pc_neighbo...
Test for handling hyphenated agents in biopax
Test for handling hyphenated agents in biopax Also agents including spaces, etc.
Python
bsd-2-clause
sorgerlab/belpy,sorgerlab/indra,johnbachman/belpy,pvtodorov/indra,decarlin/indra,johnbachman/indra,sorgerlab/indra,johnbachman/indra,jmuhlich/indra,bgyori/indra,decarlin/indra,sorgerlab/indra,pvtodorov/indra,pvtodorov/indra,johnbachman/belpy,sorgerlab/belpy,bgyori/indra,bgyori/indra,pvtodorov/indra,jmuhlich/indra,decar...
Test for handling hyphenated agents in biopax Also agents including spaces, etc.
from belpy.biopax import biopax_api from belpy.pysb_assembler import PysbAssembler def test_hyphenated_agent_names(): """This query should contain reactions with agent names RAF1-BRAF, which need to be canonicalized to Python-compatible names before model assembly.""" bp = biopax_api.process_pc_neighbo...
<commit_before><commit_msg>Test for handling hyphenated agents in biopax Also agents including spaces, etc.<commit_after>
from belpy.biopax import biopax_api from belpy.pysb_assembler import PysbAssembler def test_hyphenated_agent_names(): """This query should contain reactions with agent names RAF1-BRAF, which need to be canonicalized to Python-compatible names before model assembly.""" bp = biopax_api.process_pc_neighbo...
Test for handling hyphenated agents in biopax Also agents including spaces, etc.from belpy.biopax import biopax_api from belpy.pysb_assembler import PysbAssembler def test_hyphenated_agent_names(): """This query should contain reactions with agent names RAF1-BRAF, which need to be canonicalized to Python-comp...
<commit_before><commit_msg>Test for handling hyphenated agents in biopax Also agents including spaces, etc.<commit_after>from belpy.biopax import biopax_api from belpy.pysb_assembler import PysbAssembler def test_hyphenated_agent_names(): """This query should contain reactions with agent names RAF1-BRAF, whic...
f99682315fd5a50523fc28baf89710fe9a0ec18e
cluster/__init__.py
cluster/__init__.py
#!/usr/bin/env python2 def is_this_chef(): from socket import gethostname return gethostname() == 'chef.compbio.ucsf.edu' def require_chef(): if not is_this_chef(): raise SystemExit("This script must be run on chef.")
Add a function to say whether or not chef is the current host.
Add a function to say whether or not chef is the current host.
Python
mit
Kortemme-Lab/klab,Kortemme-Lab/klab,Kortemme-Lab/klab,Kortemme-Lab/klab
Add a function to say whether or not chef is the current host.
#!/usr/bin/env python2 def is_this_chef(): from socket import gethostname return gethostname() == 'chef.compbio.ucsf.edu' def require_chef(): if not is_this_chef(): raise SystemExit("This script must be run on chef.")
<commit_before><commit_msg>Add a function to say whether or not chef is the current host.<commit_after>
#!/usr/bin/env python2 def is_this_chef(): from socket import gethostname return gethostname() == 'chef.compbio.ucsf.edu' def require_chef(): if not is_this_chef(): raise SystemExit("This script must be run on chef.")
Add a function to say whether or not chef is the current host.#!/usr/bin/env python2 def is_this_chef(): from socket import gethostname return gethostname() == 'chef.compbio.ucsf.edu' def require_chef(): if not is_this_chef(): raise SystemExit("This script must be run on chef.")
<commit_before><commit_msg>Add a function to say whether or not chef is the current host.<commit_after>#!/usr/bin/env python2 def is_this_chef(): from socket import gethostname return gethostname() == 'chef.compbio.ucsf.edu' def require_chef(): if not is_this_chef(): raise SystemExit("This script ...
6501a871bc26981e274b3780206175be9db5c027
migrations/versions/0059_add_letter_template_type.py
migrations/versions/0059_add_letter_template_type.py
"""empty message Revision ID: f266fb67597a Revises: 0058_add_letters_flag Create Date: 2016-11-07 16:13:18.961527 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0059_add_letter_template_type' down_revision = '0058_add_letters_flag' name = 'template_type' tm...
Add letter to possible template types in DB
Add letter to possible template types in DB A letter type was added to the `enum` in the `Template` model at the same it was added to the `Notification` model. But the migration was only done for the `notifications` table, not the `templates` table. See: https://github.com/alphagov/notifications-api/commit/25db1bce#d...
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Add letter to possible template types in DB A letter type was added to the `enum` in the `Template` model at the same it was added to the `Notification` model. But the migration was only done for the `notifications` table, not the `templates` table. See: https://github.com/alphagov/notifications-api/commit/25db1bce#d...
"""empty message Revision ID: f266fb67597a Revises: 0058_add_letters_flag Create Date: 2016-11-07 16:13:18.961527 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0059_add_letter_template_type' down_revision = '0058_add_letters_flag' name = 'template_type' tm...
<commit_before><commit_msg>Add letter to possible template types in DB A letter type was added to the `enum` in the `Template` model at the same it was added to the `Notification` model. But the migration was only done for the `notifications` table, not the `templates` table. See: https://github.com/alphagov/notifica...
"""empty message Revision ID: f266fb67597a Revises: 0058_add_letters_flag Create Date: 2016-11-07 16:13:18.961527 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0059_add_letter_template_type' down_revision = '0058_add_letters_flag' name = 'template_type' tm...
Add letter to possible template types in DB A letter type was added to the `enum` in the `Template` model at the same it was added to the `Notification` model. But the migration was only done for the `notifications` table, not the `templates` table. See: https://github.com/alphagov/notifications-api/commit/25db1bce#d...
<commit_before><commit_msg>Add letter to possible template types in DB A letter type was added to the `enum` in the `Template` model at the same it was added to the `Notification` model. But the migration was only done for the `notifications` table, not the `templates` table. See: https://github.com/alphagov/notifica...
fbc7622ffba8a527c45efed11f7044580deb3072
mvp/extensions.py
mvp/extensions.py
import os from . import hooks from .viewport import playblast def default_handler(data, options): _, ext = os.path.splitext(data['filename']) is_qt = ext == '.mov' kwargs = dict( camera=data['camera'], state=data['state'], width=data['width'], height=data['height'], )...
Implement h264 and png as ext hooks
Implement h264 and png as ext hooks
Python
mit
danbradham/mvp
Implement h264 and png as ext hooks
import os from . import hooks from .viewport import playblast def default_handler(data, options): _, ext = os.path.splitext(data['filename']) is_qt = ext == '.mov' kwargs = dict( camera=data['camera'], state=data['state'], width=data['width'], height=data['height'], )...
<commit_before><commit_msg>Implement h264 and png as ext hooks<commit_after>
import os from . import hooks from .viewport import playblast def default_handler(data, options): _, ext = os.path.splitext(data['filename']) is_qt = ext == '.mov' kwargs = dict( camera=data['camera'], state=data['state'], width=data['width'], height=data['height'], )...
Implement h264 and png as ext hooksimport os from . import hooks from .viewport import playblast def default_handler(data, options): _, ext = os.path.splitext(data['filename']) is_qt = ext == '.mov' kwargs = dict( camera=data['camera'], state=data['state'], width=data['width'], ...
<commit_before><commit_msg>Implement h264 and png as ext hooks<commit_after>import os from . import hooks from .viewport import playblast def default_handler(data, options): _, ext = os.path.splitext(data['filename']) is_qt = ext == '.mov' kwargs = dict( camera=data['camera'], state=data...
bc0f4bccf07d87bcc50469b5b20db44679f30128
scripts/add-neuron-catalogue-concepts.py
scripts/add-neuron-catalogue-concepts.py
#!/usr/bin/env python from common import db_connection import sys if len(sys.argv) != 3: print >> sys.stderr, "Usage: %s <PROJECT-ID> <USER-ID>" sys.exit(1) project_id = int(sys.argv[1]) user_id = int(sys.argv[2]) c = db_connection.cursor() for class_name in ('driver_line', 'cell_body_location'): c.ex...
Add the concepts required for the neuron catalogue Django application
Add the concepts required for the neuron catalogue Django application
Python
agpl-3.0
fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID,htem/CATMAID,htem/CATMAID,fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID
Add the concepts required for the neuron catalogue Django application
#!/usr/bin/env python from common import db_connection import sys if len(sys.argv) != 3: print >> sys.stderr, "Usage: %s <PROJECT-ID> <USER-ID>" sys.exit(1) project_id = int(sys.argv[1]) user_id = int(sys.argv[2]) c = db_connection.cursor() for class_name in ('driver_line', 'cell_body_location'): c.ex...
<commit_before><commit_msg>Add the concepts required for the neuron catalogue Django application<commit_after>
#!/usr/bin/env python from common import db_connection import sys if len(sys.argv) != 3: print >> sys.stderr, "Usage: %s <PROJECT-ID> <USER-ID>" sys.exit(1) project_id = int(sys.argv[1]) user_id = int(sys.argv[2]) c = db_connection.cursor() for class_name in ('driver_line', 'cell_body_location'): c.ex...
Add the concepts required for the neuron catalogue Django application#!/usr/bin/env python from common import db_connection import sys if len(sys.argv) != 3: print >> sys.stderr, "Usage: %s <PROJECT-ID> <USER-ID>" sys.exit(1) project_id = int(sys.argv[1]) user_id = int(sys.argv[2]) c = db_connection.cursor...
<commit_before><commit_msg>Add the concepts required for the neuron catalogue Django application<commit_after>#!/usr/bin/env python from common import db_connection import sys if len(sys.argv) != 3: print >> sys.stderr, "Usage: %s <PROJECT-ID> <USER-ID>" sys.exit(1) project_id = int(sys.argv[1]) user_id = i...
1eced53f26bffd42df81fc7c655da46591204136
examples/decryption_test.py
examples/decryption_test.py
""" This test demonstrates the use of encryption/decryption. (Technically, obfuscation/unobfuscation.) """ from seleniumbase import BaseCase from seleniumbase import encryption class MyTestClass(BaseCase): def test_rate_limited_printing(self): self.open("https://www.saucedemo.com/") self.update_...
Add a new example test
Add a new example test
Python
mit
seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase
Add a new example test
""" This test demonstrates the use of encryption/decryption. (Technically, obfuscation/unobfuscation.) """ from seleniumbase import BaseCase from seleniumbase import encryption class MyTestClass(BaseCase): def test_rate_limited_printing(self): self.open("https://www.saucedemo.com/") self.update_...
<commit_before><commit_msg>Add a new example test<commit_after>
""" This test demonstrates the use of encryption/decryption. (Technically, obfuscation/unobfuscation.) """ from seleniumbase import BaseCase from seleniumbase import encryption class MyTestClass(BaseCase): def test_rate_limited_printing(self): self.open("https://www.saucedemo.com/") self.update_...
Add a new example test""" This test demonstrates the use of encryption/decryption. (Technically, obfuscation/unobfuscation.) """ from seleniumbase import BaseCase from seleniumbase import encryption class MyTestClass(BaseCase): def test_rate_limited_printing(self): self.open("https://www.saucedemo.com/"...
<commit_before><commit_msg>Add a new example test<commit_after>""" This test demonstrates the use of encryption/decryption. (Technically, obfuscation/unobfuscation.) """ from seleniumbase import BaseCase from seleniumbase import encryption class MyTestClass(BaseCase): def test_rate_limited_printing(self): ...
5782fc5cb505ff6af8d20411004a05ad53e82b90
fabfile/testbeds/testbed_mlab.py
fabfile/testbeds/testbed_mlab.py
from fabric.api import env #Management ip addresses of hosts in the cluster host1 = 'root@10.84.19.42' host2 = 'root@10.84.19.43' host3 = 'root@10.84.19.44' host4 = 'root@10.84.19.45' host5 = 'root@10.84.19.46' #External routers if any #for eg. #ext_routers = [('mx1', '10.204.216.253')] ext_routers = [] #Autonomous...
Add testbed file for mlab
Add testbed file for mlab
Python
apache-2.0
Juniper/contrail-fabric-utils,Juniper/contrail-fabric-utils
Add testbed file for mlab
from fabric.api import env #Management ip addresses of hosts in the cluster host1 = 'root@10.84.19.42' host2 = 'root@10.84.19.43' host3 = 'root@10.84.19.44' host4 = 'root@10.84.19.45' host5 = 'root@10.84.19.46' #External routers if any #for eg. #ext_routers = [('mx1', '10.204.216.253')] ext_routers = [] #Autonomous...
<commit_before><commit_msg>Add testbed file for mlab<commit_after>
from fabric.api import env #Management ip addresses of hosts in the cluster host1 = 'root@10.84.19.42' host2 = 'root@10.84.19.43' host3 = 'root@10.84.19.44' host4 = 'root@10.84.19.45' host5 = 'root@10.84.19.46' #External routers if any #for eg. #ext_routers = [('mx1', '10.204.216.253')] ext_routers = [] #Autonomous...
Add testbed file for mlabfrom fabric.api import env #Management ip addresses of hosts in the cluster host1 = 'root@10.84.19.42' host2 = 'root@10.84.19.43' host3 = 'root@10.84.19.44' host4 = 'root@10.84.19.45' host5 = 'root@10.84.19.46' #External routers if any #for eg. #ext_routers = [('mx1', '10.204.216.253')] ext_...
<commit_before><commit_msg>Add testbed file for mlab<commit_after>from fabric.api import env #Management ip addresses of hosts in the cluster host1 = 'root@10.84.19.42' host2 = 'root@10.84.19.43' host3 = 'root@10.84.19.44' host4 = 'root@10.84.19.45' host5 = 'root@10.84.19.46' #External routers if any #for eg. #ext_r...
4002e0088a50d1a4ac5c20e52425c9f78d6761c6
tests/unit/proposals/test_models.py
tests/unit/proposals/test_models.py
# Third Party Stuff import pytest from tests import factories as f @pytest.mark.parametrize('method', [ 'get_absolute_url', 'get_delete_url', 'get_down_vote_url', 'get_hashid', 'get_remove_vote_url', 'get_review_url', 'get_slug', 'get_up_vote_url', 'get_update_url', 'get_vote_u...
Add unit tests for proposal method getter methods
Add unit tests for proposal method getter methods closes #448
Python
mit
ChillarAnand/junction,ChillarAnand/junction,pythonindia/junction,ChillarAnand/junction,ChillarAnand/junction,pythonindia/junction,pythonindia/junction,pythonindia/junction
Add unit tests for proposal method getter methods closes #448
# Third Party Stuff import pytest from tests import factories as f @pytest.mark.parametrize('method', [ 'get_absolute_url', 'get_delete_url', 'get_down_vote_url', 'get_hashid', 'get_remove_vote_url', 'get_review_url', 'get_slug', 'get_up_vote_url', 'get_update_url', 'get_vote_u...
<commit_before><commit_msg>Add unit tests for proposal method getter methods closes #448<commit_after>
# Third Party Stuff import pytest from tests import factories as f @pytest.mark.parametrize('method', [ 'get_absolute_url', 'get_delete_url', 'get_down_vote_url', 'get_hashid', 'get_remove_vote_url', 'get_review_url', 'get_slug', 'get_up_vote_url', 'get_update_url', 'get_vote_u...
Add unit tests for proposal method getter methods closes #448# Third Party Stuff import pytest from tests import factories as f @pytest.mark.parametrize('method', [ 'get_absolute_url', 'get_delete_url', 'get_down_vote_url', 'get_hashid', 'get_remove_vote_url', 'get_review_url', 'get_slug'...
<commit_before><commit_msg>Add unit tests for proposal method getter methods closes #448<commit_after># Third Party Stuff import pytest from tests import factories as f @pytest.mark.parametrize('method', [ 'get_absolute_url', 'get_delete_url', 'get_down_vote_url', 'get_hashid', 'get_remove_vote_u...
8f0443c35e25c69ec4216e6d5c6717b3c069ebd0
scripts/remove_wiki_title_forward_slashes.py
scripts/remove_wiki_title_forward_slashes.py
""" Remove forward slashes from wiki page titles, since it is no longer an allowed character and breaks validation. """ import logging import sys from framework.mongo import database as db from framework.transactions.context import TokuTransaction from website.app import init_app from website.project.model import Nod...
Remove forward slashes from wiki page names
Remove forward slashes from wiki page names
Python
apache-2.0
binoculars/osf.io,cslzchen/osf.io,RomanZWang/osf.io,alexschiller/osf.io,TomBaxter/osf.io,leb2dg/osf.io,rdhyee/osf.io,baylee-d/osf.io,wearpants/osf.io,hmoco/osf.io,HalcyonChimera/osf.io,felliott/osf.io,acshi/osf.io,aaxelb/osf.io,acshi/osf.io,DanielSBrown/osf.io,doublebits/osf.io,monikagrabowska/osf.io,TomHeatwole/osf.io...
Remove forward slashes from wiki page names
""" Remove forward slashes from wiki page titles, since it is no longer an allowed character and breaks validation. """ import logging import sys from framework.mongo import database as db from framework.transactions.context import TokuTransaction from website.app import init_app from website.project.model import Nod...
<commit_before><commit_msg>Remove forward slashes from wiki page names<commit_after>
""" Remove forward slashes from wiki page titles, since it is no longer an allowed character and breaks validation. """ import logging import sys from framework.mongo import database as db from framework.transactions.context import TokuTransaction from website.app import init_app from website.project.model import Nod...
Remove forward slashes from wiki page names""" Remove forward slashes from wiki page titles, since it is no longer an allowed character and breaks validation. """ import logging import sys from framework.mongo import database as db from framework.transactions.context import TokuTransaction from website.app import ini...
<commit_before><commit_msg>Remove forward slashes from wiki page names<commit_after>""" Remove forward slashes from wiki page titles, since it is no longer an allowed character and breaks validation. """ import logging import sys from framework.mongo import database as db from framework.transactions.context import Tok...
7295c18179870db944f0496d521a7031e483d1e2
skan/test/test_skeleton_class.py
skan/test/test_skeleton_class.py
import os, sys from collections import defaultdict import numpy as np from numpy.testing import assert_equal, assert_allclose from skan.csr import Skeleton from skan._testdata import (tinycycle, tinyline, skeleton0, skeleton1, skeleton2, skeleton3d, topograph1d, skeleton4) def test_skelet...
Add tests for new skeleton class
Add tests for new skeleton class
Python
bsd-3-clause
jni/skan
Add tests for new skeleton class
import os, sys from collections import defaultdict import numpy as np from numpy.testing import assert_equal, assert_allclose from skan.csr import Skeleton from skan._testdata import (tinycycle, tinyline, skeleton0, skeleton1, skeleton2, skeleton3d, topograph1d, skeleton4) def test_skelet...
<commit_before><commit_msg>Add tests for new skeleton class<commit_after>
import os, sys from collections import defaultdict import numpy as np from numpy.testing import assert_equal, assert_allclose from skan.csr import Skeleton from skan._testdata import (tinycycle, tinyline, skeleton0, skeleton1, skeleton2, skeleton3d, topograph1d, skeleton4) def test_skelet...
Add tests for new skeleton classimport os, sys from collections import defaultdict import numpy as np from numpy.testing import assert_equal, assert_allclose from skan.csr import Skeleton from skan._testdata import (tinycycle, tinyline, skeleton0, skeleton1, skeleton2, skeleton3d, topograph...
<commit_before><commit_msg>Add tests for new skeleton class<commit_after>import os, sys from collections import defaultdict import numpy as np from numpy.testing import assert_equal, assert_allclose from skan.csr import Skeleton from skan._testdata import (tinycycle, tinyline, skeleton0, skeleton1, ...
118576da487634c16a2ea3907d12cc452b67cc0f
src/detectors/detector_utils.py
src/detectors/detector_utils.py
""" Detector utilities """ __license__ = """ This file is part of RAPD Copyright (C) 2016, Cornell University All rights reserved. RAPD is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3. RAPD is...
Add utility t print out detector information from an image file
Add utility t print out detector information from an image file
Python
agpl-3.0
RAPD/RAPD,RAPD/RAPD,RAPD/RAPD,RAPD/RAPD,RAPD/RAPD
Add utility t print out detector information from an image file
""" Detector utilities """ __license__ = """ This file is part of RAPD Copyright (C) 2016, Cornell University All rights reserved. RAPD is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3. RAPD is...
<commit_before><commit_msg>Add utility t print out detector information from an image file<commit_after>
""" Detector utilities """ __license__ = """ This file is part of RAPD Copyright (C) 2016, Cornell University All rights reserved. RAPD is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3. RAPD is...
Add utility t print out detector information from an image file""" Detector utilities """ __license__ = """ This file is part of RAPD Copyright (C) 2016, Cornell University All rights reserved. RAPD is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as...
<commit_before><commit_msg>Add utility t print out detector information from an image file<commit_after>""" Detector utilities """ __license__ = """ This file is part of RAPD Copyright (C) 2016, Cornell University All rights reserved. RAPD is free software: you can redistribute it and/or modify it under the terms of...
e976c426bef01cc9abdc985e36eae3695d8ee384
tests/test_frozen_at_when_copying_dataset.py
tests/test_frozen_at_when_copying_dataset.py
""" Tests for https://github.com/jic-dtool/dtoolcore/issues/20 """ import os import time from . import tmp_dir_fixture # NOQA import dtoolcore as dc def test_frozen_at_value_when_copying_dataset(tmp_dir_fixture): # NOQA with dc.DataSetCreator("delete-me", tmp_dir_fixture) as ds_creator: ...
Add missing test from functionality in previous commit
Add missing test from functionality in previous commit
Python
mit
JIC-CSB/dtoolcore
Add missing test from functionality in previous commit
""" Tests for https://github.com/jic-dtool/dtoolcore/issues/20 """ import os import time from . import tmp_dir_fixture # NOQA import dtoolcore as dc def test_frozen_at_value_when_copying_dataset(tmp_dir_fixture): # NOQA with dc.DataSetCreator("delete-me", tmp_dir_fixture) as ds_creator: ...
<commit_before><commit_msg>Add missing test from functionality in previous commit<commit_after>
""" Tests for https://github.com/jic-dtool/dtoolcore/issues/20 """ import os import time from . import tmp_dir_fixture # NOQA import dtoolcore as dc def test_frozen_at_value_when_copying_dataset(tmp_dir_fixture): # NOQA with dc.DataSetCreator("delete-me", tmp_dir_fixture) as ds_creator: ...
Add missing test from functionality in previous commit""" Tests for https://github.com/jic-dtool/dtoolcore/issues/20 """ import os import time from . import tmp_dir_fixture # NOQA import dtoolcore as dc def test_frozen_at_value_when_copying_dataset(tmp_dir_fixture): # NOQA with dc.DataSetCreator...
<commit_before><commit_msg>Add missing test from functionality in previous commit<commit_after>""" Tests for https://github.com/jic-dtool/dtoolcore/issues/20 """ import os import time from . import tmp_dir_fixture # NOQA import dtoolcore as dc def test_frozen_at_value_when_copying_dataset(tmp_dir_fixtur...
0457c1d56e210db960f84f78d90ead3736056eb4
test/functional/test_cli.py
test/functional/test_cli.py
# Copyright (c) 2013, Sascha Peilicke <saschpe@gmx.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHO...
Add functional test for command-line interface
Add functional test for command-line interface
Python
apache-2.0
saschpe/rapport
Add functional test for command-line interface
# Copyright (c) 2013, Sascha Peilicke <saschpe@gmx.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHO...
<commit_before><commit_msg>Add functional test for command-line interface<commit_after>
# Copyright (c) 2013, Sascha Peilicke <saschpe@gmx.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHO...
Add functional test for command-line interface# Copyright (c) 2013, Sascha Peilicke <saschpe@gmx.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed i...
<commit_before><commit_msg>Add functional test for command-line interface<commit_after># Copyright (c) 2013, Sascha Peilicke <saschpe@gmx.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foun...
e02b7e4dc0d6ba94f63ee2ed48db120c52eb11cd
utilities/src/d1_util/download_sciobj.py
utilities/src/d1_util/download_sciobj.py
#!/usr/bin/env python # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (t...
Add utility/example for downloading single sciobj from CN or MN
Add utility/example for downloading single sciobj from CN or MN
Python
apache-2.0
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
Add utility/example for downloading single sciobj from CN or MN
#!/usr/bin/env python # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (t...
<commit_before><commit_msg>Add utility/example for downloading single sciobj from CN or MN<commit_after>
#!/usr/bin/env python # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (t...
Add utility/example for downloading single sciobj from CN or MN#!/usr/bin/env python # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-201...
<commit_before><commit_msg>Add utility/example for downloading single sciobj from CN or MN<commit_after>#!/usr/bin/env python # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at htt...
2048ec26a2218e6060e1fd03ab876b59bd576a07
tests/test_hybrid_properties.py
tests/test_hybrid_properties.py
from pytest import raises import sqlalchemy as sa from sqlalchemy.ext.hybrid import hybrid_property from wtforms_alchemy import ModelForm from wtforms_alchemy.exc import AttributeTypeException from tests import ModelFormTestCase class TestHybridProperties(ModelFormTestCase): def test_hybrid_property_returning_col...
Add tests for hybrid properties
Add tests for hybrid properties
Python
bsd-3-clause
kelvinhammond/wtforms-alchemy,williamwu0220/wtforms-alchemy,quantus/wtforms-alchemy
Add tests for hybrid properties
from pytest import raises import sqlalchemy as sa from sqlalchemy.ext.hybrid import hybrid_property from wtforms_alchemy import ModelForm from wtforms_alchemy.exc import AttributeTypeException from tests import ModelFormTestCase class TestHybridProperties(ModelFormTestCase): def test_hybrid_property_returning_col...
<commit_before><commit_msg>Add tests for hybrid properties<commit_after>
from pytest import raises import sqlalchemy as sa from sqlalchemy.ext.hybrid import hybrid_property from wtforms_alchemy import ModelForm from wtforms_alchemy.exc import AttributeTypeException from tests import ModelFormTestCase class TestHybridProperties(ModelFormTestCase): def test_hybrid_property_returning_col...
Add tests for hybrid propertiesfrom pytest import raises import sqlalchemy as sa from sqlalchemy.ext.hybrid import hybrid_property from wtforms_alchemy import ModelForm from wtforms_alchemy.exc import AttributeTypeException from tests import ModelFormTestCase class TestHybridProperties(ModelFormTestCase): def tes...
<commit_before><commit_msg>Add tests for hybrid properties<commit_after>from pytest import raises import sqlalchemy as sa from sqlalchemy.ext.hybrid import hybrid_property from wtforms_alchemy import ModelForm from wtforms_alchemy.exc import AttributeTypeException from tests import ModelFormTestCase class TestHybridP...
7c4d13d1f2591ae0a3eb8dc7ffa5fa03258c7662
django/applications/catmaid/management/commands/catmaid_set_user_profiles_to_default.py
django/applications/catmaid/management/commands/catmaid_set_user_profiles_to_default.py
from django.conf import settings from django.contrib.auth.models import User from django.core.management.base import NoArgsCommand, CommandError class Command(NoArgsCommand): help = "Set the user profile settings of every user to the defaults" def handle_noargs(self, **options): for u in User.objects....
Add management command to set all user profiles to defaults
Add management command to set all user profiles to defaults
Python
agpl-3.0
htem/CATMAID,htem/CATMAID,fzadow/CATMAID,fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID,htem/CATMAID,fzadow/CATMAID
Add management command to set all user profiles to defaults
from django.conf import settings from django.contrib.auth.models import User from django.core.management.base import NoArgsCommand, CommandError class Command(NoArgsCommand): help = "Set the user profile settings of every user to the defaults" def handle_noargs(self, **options): for u in User.objects....
<commit_before><commit_msg>Add management command to set all user profiles to defaults<commit_after>
from django.conf import settings from django.contrib.auth.models import User from django.core.management.base import NoArgsCommand, CommandError class Command(NoArgsCommand): help = "Set the user profile settings of every user to the defaults" def handle_noargs(self, **options): for u in User.objects....
Add management command to set all user profiles to defaultsfrom django.conf import settings from django.contrib.auth.models import User from django.core.management.base import NoArgsCommand, CommandError class Command(NoArgsCommand): help = "Set the user profile settings of every user to the defaults" def han...
<commit_before><commit_msg>Add management command to set all user profiles to defaults<commit_after>from django.conf import settings from django.contrib.auth.models import User from django.core.management.base import NoArgsCommand, CommandError class Command(NoArgsCommand): help = "Set the user profile settings of...
66931b591cc40dcafecf4c8daff95b8fc17771f3
tools/ui-languages-check.py
tools/ui-languages-check.py
#!/usr/bin/python # -*- coding: utf-8 -*- import os.path import sys import subprocess from txclib import utils from txclib.project import Project try: from json import loads as parse_json except ImportError: from simplejson import loads as parse_json class UiLanguagesCheck(Project): def get_ui_langs(self...
Add script to check UI languages coverage
Add script to check UI languages coverage
Python
agpl-3.0
shashank19gaurav/tatoeba2,shashank19gaurav/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,shashank19gaurav/tatoeba2,shashank19gaurav/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2
Add script to check UI languages coverage
#!/usr/bin/python # -*- coding: utf-8 -*- import os.path import sys import subprocess from txclib import utils from txclib.project import Project try: from json import loads as parse_json except ImportError: from simplejson import loads as parse_json class UiLanguagesCheck(Project): def get_ui_langs(self...
<commit_before><commit_msg>Add script to check UI languages coverage<commit_after>
#!/usr/bin/python # -*- coding: utf-8 -*- import os.path import sys import subprocess from txclib import utils from txclib.project import Project try: from json import loads as parse_json except ImportError: from simplejson import loads as parse_json class UiLanguagesCheck(Project): def get_ui_langs(self...
Add script to check UI languages coverage#!/usr/bin/python # -*- coding: utf-8 -*- import os.path import sys import subprocess from txclib import utils from txclib.project import Project try: from json import loads as parse_json except ImportError: from simplejson import loads as parse_json class UiLanguages...
<commit_before><commit_msg>Add script to check UI languages coverage<commit_after>#!/usr/bin/python # -*- coding: utf-8 -*- import os.path import sys import subprocess from txclib import utils from txclib.project import Project try: from json import loads as parse_json except ImportError: from simplejson impo...
9e3d460d797b9ab3032a8be0c92b88efe136458b
openquake/commands/webui.py
openquake/commands/webui.py
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2016, GEM Foundation # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
Add a command to start the WebUI using oq
Add a command to start the WebUI using oq The django development server is started in foreground on localhost:8800. Meant to be used with multi_user = false but works also if true. Former-commit-id: 5df6e6b3ec523376906abeb8a52eb6c5dc5d46ec [formerly bbfc5549fb632d535ed1934e0d2bd1226ccd4507] Former-commit-id: 9705079...
Python
agpl-3.0
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine
Add a command to start the WebUI using oq The django development server is started in foreground on localhost:8800. Meant to be used with multi_user = false but works also if true. Former-commit-id: 5df6e6b3ec523376906abeb8a52eb6c5dc5d46ec [formerly bbfc5549fb632d535ed1934e0d2bd1226ccd4507] Former-commit-id: 9705079...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2016, GEM Foundation # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
<commit_before><commit_msg>Add a command to start the WebUI using oq The django development server is started in foreground on localhost:8800. Meant to be used with multi_user = false but works also if true. Former-commit-id: 5df6e6b3ec523376906abeb8a52eb6c5dc5d46ec [formerly bbfc5549fb632d535ed1934e0d2bd1226ccd4507...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2016, GEM Foundation # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
Add a command to start the WebUI using oq The django development server is started in foreground on localhost:8800. Meant to be used with multi_user = false but works also if true. Former-commit-id: 5df6e6b3ec523376906abeb8a52eb6c5dc5d46ec [formerly bbfc5549fb632d535ed1934e0d2bd1226ccd4507] Former-commit-id: 9705079...
<commit_before><commit_msg>Add a command to start the WebUI using oq The django development server is started in foreground on localhost:8800. Meant to be used with multi_user = false but works also if true. Former-commit-id: 5df6e6b3ec523376906abeb8a52eb6c5dc5d46ec [formerly bbfc5549fb632d535ed1934e0d2bd1226ccd4507...
c08b4d2922d366e6078e6d6dda542de79031918d
examples/translations/korean_test_1.py
examples/translations/korean_test_1.py
# Korean Language Test - Python 3 Only! from seleniumbase.translate.korean import 셀레늄_테스트_케이스 # noqa class 테스트_클래스(셀레늄_테스트_케이스): # noqa def test_실시예_1(self): self.URL_열기("https://ko.wikipedia.org/wiki/") self.텍스트_확인("위키백과") self.요소_확인('[title="위키백과:소개"]') self.텍스트를_업데이트("#search...
Add a Korean example test
Add a Korean example test
Python
mit
seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase
Add a Korean example test
# Korean Language Test - Python 3 Only! from seleniumbase.translate.korean import 셀레늄_테스트_케이스 # noqa class 테스트_클래스(셀레늄_테스트_케이스): # noqa def test_실시예_1(self): self.URL_열기("https://ko.wikipedia.org/wiki/") self.텍스트_확인("위키백과") self.요소_확인('[title="위키백과:소개"]') self.텍스트를_업데이트("#search...
<commit_before><commit_msg>Add a Korean example test<commit_after>
# Korean Language Test - Python 3 Only! from seleniumbase.translate.korean import 셀레늄_테스트_케이스 # noqa class 테스트_클래스(셀레늄_테스트_케이스): # noqa def test_실시예_1(self): self.URL_열기("https://ko.wikipedia.org/wiki/") self.텍스트_확인("위키백과") self.요소_확인('[title="위키백과:소개"]') self.텍스트를_업데이트("#search...
Add a Korean example test# Korean Language Test - Python 3 Only! from seleniumbase.translate.korean import 셀레늄_테스트_케이스 # noqa class 테스트_클래스(셀레늄_테스트_케이스): # noqa def test_실시예_1(self): self.URL_열기("https://ko.wikipedia.org/wiki/") self.텍스트_확인("위키백과") self.요소_확인('[title="위키백과:소개"]') ...
<commit_before><commit_msg>Add a Korean example test<commit_after># Korean Language Test - Python 3 Only! from seleniumbase.translate.korean import 셀레늄_테스트_케이스 # noqa class 테스트_클래스(셀레늄_테스트_케이스): # noqa def test_실시예_1(self): self.URL_열기("https://ko.wikipedia.org/wiki/") self.텍스트_확인("위키백과") ...
c6e628fe12397a57afa9c7744a3feb6667315987
locations/spiders/loves.py
locations/spiders/loves.py
# -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem HEADERS = {'Content-Type': 'application/json'} class LovesSpider(scrapy.Spider): name = "loves" allowed_domains = ["www.loves.com"] download_delay = 0.2 def start_requests(self): payload = json.du...
Add spider for Loves Travel Stops
Add spider for Loves Travel Stops
Python
mit
iandees/all-the-places,iandees/all-the-places,iandees/all-the-places
Add spider for Loves Travel Stops
# -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem HEADERS = {'Content-Type': 'application/json'} class LovesSpider(scrapy.Spider): name = "loves" allowed_domains = ["www.loves.com"] download_delay = 0.2 def start_requests(self): payload = json.du...
<commit_before><commit_msg>Add spider for Loves Travel Stops<commit_after>
# -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem HEADERS = {'Content-Type': 'application/json'} class LovesSpider(scrapy.Spider): name = "loves" allowed_domains = ["www.loves.com"] download_delay = 0.2 def start_requests(self): payload = json.du...
Add spider for Loves Travel Stops# -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem HEADERS = {'Content-Type': 'application/json'} class LovesSpider(scrapy.Spider): name = "loves" allowed_domains = ["www.loves.com"] download_delay = 0.2 def start_requests...
<commit_before><commit_msg>Add spider for Loves Travel Stops<commit_after># -*- coding: utf-8 -*- import scrapy import json from locations.items import GeojsonPointItem HEADERS = {'Content-Type': 'application/json'} class LovesSpider(scrapy.Spider): name = "loves" allowed_domains = ["www.loves.com"] dow...
6ef4254e1167185598a31bfb6c0deb52388fa42a
HammingDistance/Python/HammingDistance.py
HammingDistance/Python/HammingDistance.py
def HammingDistance(s1, s2): if len(s1) != len(s2): raise ValueError("ERROR: Strings must have the same length") return sum(c1 != c2 for c1, c2 in zip(s1, s2))
Add Hamming Distance in Python
Add Hamming Distance in Python
Python
apache-2.0
maazsq/Algorithms_Example,alok760/Algorithms_Example,churrizo/Algorithms_Example,Thuva4/Algorithms_Example,maazsq/Algorithms_Example,AtoMc/Algorithms_Example,pranjalrai/Algorithms_Example,AtoMc/Algorithms_Example,maazsq/Algorithms_Example,Astrophilic/Algorithms_Example,Anat-Port/Algorithms_Example,Astrophilic/Algorithm...
Add Hamming Distance in Python
def HammingDistance(s1, s2): if len(s1) != len(s2): raise ValueError("ERROR: Strings must have the same length") return sum(c1 != c2 for c1, c2 in zip(s1, s2))
<commit_before><commit_msg>Add Hamming Distance in Python<commit_after>
def HammingDistance(s1, s2): if len(s1) != len(s2): raise ValueError("ERROR: Strings must have the same length") return sum(c1 != c2 for c1, c2 in zip(s1, s2))
Add Hamming Distance in Pythondef HammingDistance(s1, s2): if len(s1) != len(s2): raise ValueError("ERROR: Strings must have the same length") return sum(c1 != c2 for c1, c2 in zip(s1, s2))
<commit_before><commit_msg>Add Hamming Distance in Python<commit_after>def HammingDistance(s1, s2): if len(s1) != len(s2): raise ValueError("ERROR: Strings must have the same length") return sum(c1 != c2 for c1, c2 in zip(s1, s2))
cb62cea248d217504947ff76bdd0af9306f508ce
temperature_measurement_to_db.py
temperature_measurement_to_db.py
import os import glob import time import datetime import MySQLdb as mdb os.system('modprobe w1-gpio') os.system('modprobe w1-therm') base_dir = '/sys/bus/w1/devices/' device_folder = glob.glob(base_dir + '28*')[0] device_file = device_folder + '/w1_slave' def read_temp_raw(): f = open(device_file, 'r') lines...
Add python script to project
Add python script to project Temperature measurement using raspberry pi. Temperatures are save to MySql database.
Python
mit
tnisula/IoT_Kurssi,tnisula/IoT_Kurssi,tnisula/IoT_Kurssi,tnisula/IoT_Kurssi
Add python script to project Temperature measurement using raspberry pi. Temperatures are save to MySql database.
import os import glob import time import datetime import MySQLdb as mdb os.system('modprobe w1-gpio') os.system('modprobe w1-therm') base_dir = '/sys/bus/w1/devices/' device_folder = glob.glob(base_dir + '28*')[0] device_file = device_folder + '/w1_slave' def read_temp_raw(): f = open(device_file, 'r') lines...
<commit_before><commit_msg>Add python script to project Temperature measurement using raspberry pi. Temperatures are save to MySql database.<commit_after>
import os import glob import time import datetime import MySQLdb as mdb os.system('modprobe w1-gpio') os.system('modprobe w1-therm') base_dir = '/sys/bus/w1/devices/' device_folder = glob.glob(base_dir + '28*')[0] device_file = device_folder + '/w1_slave' def read_temp_raw(): f = open(device_file, 'r') lines...
Add python script to project Temperature measurement using raspberry pi. Temperatures are save to MySql database.import os import glob import time import datetime import MySQLdb as mdb os.system('modprobe w1-gpio') os.system('modprobe w1-therm') base_dir = '/sys/bus/w1/devices/' device_folder = glob.glob(base_dir + ...
<commit_before><commit_msg>Add python script to project Temperature measurement using raspberry pi. Temperatures are save to MySql database.<commit_after>import os import glob import time import datetime import MySQLdb as mdb os.system('modprobe w1-gpio') os.system('modprobe w1-therm') base_dir = '/sys/bus/w1/device...
e71f3ab92ffe0e6a32833855347f1ada9e773ede
salt/modules/pkg.py
salt/modules/pkg.py
''' Top level package command wrapper, used to translate the os detected by facter to the correct package manager ''' import salt.modules.pacman import salt.modules.yum #import salt.modules.apt factmap = { 'Archlinux': 'pacman', 'Fedora': 'yum', 'RedHat': 'yum', #'Debian': '...
Set up module to map to the correct package manager for the OS
Set up module to map to the correct package manager for the OS
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
Set up module to map to the correct package manager for the OS
''' Top level package command wrapper, used to translate the os detected by facter to the correct package manager ''' import salt.modules.pacman import salt.modules.yum #import salt.modules.apt factmap = { 'Archlinux': 'pacman', 'Fedora': 'yum', 'RedHat': 'yum', #'Debian': '...
<commit_before><commit_msg>Set up module to map to the correct package manager for the OS<commit_after>
''' Top level package command wrapper, used to translate the os detected by facter to the correct package manager ''' import salt.modules.pacman import salt.modules.yum #import salt.modules.apt factmap = { 'Archlinux': 'pacman', 'Fedora': 'yum', 'RedHat': 'yum', #'Debian': '...
Set up module to map to the correct package manager for the OS''' Top level package command wrapper, used to translate the os detected by facter to the correct package manager ''' import salt.modules.pacman import salt.modules.yum #import salt.modules.apt factmap = { 'Archlinux': 'pacman', 'Fedor...
<commit_before><commit_msg>Set up module to map to the correct package manager for the OS<commit_after>''' Top level package command wrapper, used to translate the os detected by facter to the correct package manager ''' import salt.modules.pacman import salt.modules.yum #import salt.modules.apt factmap = { ...
2d7e9a353cb19e49e072615c09ca9c590eabace2
astrobin/management/commands/message_all.py
astrobin/management/commands/message_all.py
from django.core.management.base import BaseCommand from django.contrib.auth.models import User import persistent_messages class Command(BaseCommand): help = "Sends a message to all users." def handle(self, *args, **options): if len(args) < 2: print "Need two arbuments: subject and body."...
Add command to message everybody.
Add command to message everybody.
Python
agpl-3.0
astrobin/astrobin,astrobin/astrobin,astrobin/astrobin,astrobin/astrobin
Add command to message everybody.
from django.core.management.base import BaseCommand from django.contrib.auth.models import User import persistent_messages class Command(BaseCommand): help = "Sends a message to all users." def handle(self, *args, **options): if len(args) < 2: print "Need two arbuments: subject and body."...
<commit_before><commit_msg>Add command to message everybody.<commit_after>
from django.core.management.base import BaseCommand from django.contrib.auth.models import User import persistent_messages class Command(BaseCommand): help = "Sends a message to all users." def handle(self, *args, **options): if len(args) < 2: print "Need two arbuments: subject and body."...
Add command to message everybody.from django.core.management.base import BaseCommand from django.contrib.auth.models import User import persistent_messages class Command(BaseCommand): help = "Sends a message to all users." def handle(self, *args, **options): if len(args) < 2: print "Need ...
<commit_before><commit_msg>Add command to message everybody.<commit_after>from django.core.management.base import BaseCommand from django.contrib.auth.models import User import persistent_messages class Command(BaseCommand): help = "Sends a message to all users." def handle(self, *args, **options): i...
41e2cd0802a5fc8fb247a5063b08aaec5e701797
scripts/fix_data.py
scripts/fix_data.py
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014 Google Inc. All Rights Reserved. import models import uma def CorrectPropertyName(bucket_id): if bucket_id in uma.CSS_PROPERTY_BUCKETS: return uma.CSS_PROPERTY_BUCKETS[bucket_id] return None def FetchAllPropertiesWithError(bucket_id=None): q = m...
Add db data correcting script
Add db data correcting script
Python
apache-2.0
mdittmer/chromium-dashboard,modulexcite/chromium-dashboard,beaufortfrancois/chromium-dashboard,jeffposnick/chromium-dashboard,modulexcite/chromium-dashboard,beaufortfrancois/chromium-dashboard,GoogleChrome/chromium-dashboard,GoogleChrome/chromium-dashboard,jeffposnick/chromium-dashboard,jeffposnick/chromium-dashboard,G...
Add db data correcting script
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014 Google Inc. All Rights Reserved. import models import uma def CorrectPropertyName(bucket_id): if bucket_id in uma.CSS_PROPERTY_BUCKETS: return uma.CSS_PROPERTY_BUCKETS[bucket_id] return None def FetchAllPropertiesWithError(bucket_id=None): q = m...
<commit_before><commit_msg>Add db data correcting script<commit_after>
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014 Google Inc. All Rights Reserved. import models import uma def CorrectPropertyName(bucket_id): if bucket_id in uma.CSS_PROPERTY_BUCKETS: return uma.CSS_PROPERTY_BUCKETS[bucket_id] return None def FetchAllPropertiesWithError(bucket_id=None): q = m...
Add db data correcting script#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014 Google Inc. All Rights Reserved. import models import uma def CorrectPropertyName(bucket_id): if bucket_id in uma.CSS_PROPERTY_BUCKETS: return uma.CSS_PROPERTY_BUCKETS[bucket_id] return None def FetchAllPropertiesWithE...
<commit_before><commit_msg>Add db data correcting script<commit_after>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014 Google Inc. All Rights Reserved. import models import uma def CorrectPropertyName(bucket_id): if bucket_id in uma.CSS_PROPERTY_BUCKETS: return uma.CSS_PROPERTY_BUCKETS[bucket_id] ...
3e4305259b9f7b0842bac99c4d3a70014e01ac15
tests_asyncio/test_dataloader.py
tests_asyncio/test_dataloader.py
from collections import namedtuple from unittest.mock import Mock from pytest import mark from aiodataloader import DataLoader from graphene import ObjectType, String, Schema, Field, List CHARACTERS = { "1": {"name": "Luke Skywalker", "sibling": "3"}, "2": {"name": "Darth Vader", "sibling": None}, "3": {...
Add basic test for aiodataloader
Add basic test for aiodataloader
Python
mit
graphql-python/graphene,graphql-python/graphene
Add basic test for aiodataloader
from collections import namedtuple from unittest.mock import Mock from pytest import mark from aiodataloader import DataLoader from graphene import ObjectType, String, Schema, Field, List CHARACTERS = { "1": {"name": "Luke Skywalker", "sibling": "3"}, "2": {"name": "Darth Vader", "sibling": None}, "3": {...
<commit_before><commit_msg>Add basic test for aiodataloader<commit_after>
from collections import namedtuple from unittest.mock import Mock from pytest import mark from aiodataloader import DataLoader from graphene import ObjectType, String, Schema, Field, List CHARACTERS = { "1": {"name": "Luke Skywalker", "sibling": "3"}, "2": {"name": "Darth Vader", "sibling": None}, "3": {...
Add basic test for aiodataloaderfrom collections import namedtuple from unittest.mock import Mock from pytest import mark from aiodataloader import DataLoader from graphene import ObjectType, String, Schema, Field, List CHARACTERS = { "1": {"name": "Luke Skywalker", "sibling": "3"}, "2": {"name": "Darth Vade...
<commit_before><commit_msg>Add basic test for aiodataloader<commit_after>from collections import namedtuple from unittest.mock import Mock from pytest import mark from aiodataloader import DataLoader from graphene import ObjectType, String, Schema, Field, List CHARACTERS = { "1": {"name": "Luke Skywalker", "sibl...
edf2ebfec6b6a5ddde418590ad8d775a393675bc
tests/test_manifold_elliptope.py
tests/test_manifold_elliptope.py
import unittest import numpy as np import numpy.linalg as la import numpy.random as rnd import numpy.testing as np_testing from pymanopt.manifolds import Elliptope class TestElliptopeManifold(unittest.TestCase): def setUp(self): self.n = n = 50 self.k = k = 10 self.man = Elliptope(n, k) ...
Add elliptope manifold test skeleton.
Add elliptope manifold test skeleton.
Python
bsd-3-clause
nkoep/pymanopt,tingelst/pymanopt,nkoep/pymanopt,pymanopt/pymanopt,nkoep/pymanopt,pymanopt/pymanopt,j-towns/pymanopt
Add elliptope manifold test skeleton.
import unittest import numpy as np import numpy.linalg as la import numpy.random as rnd import numpy.testing as np_testing from pymanopt.manifolds import Elliptope class TestElliptopeManifold(unittest.TestCase): def setUp(self): self.n = n = 50 self.k = k = 10 self.man = Elliptope(n, k) ...
<commit_before><commit_msg>Add elliptope manifold test skeleton.<commit_after>
import unittest import numpy as np import numpy.linalg as la import numpy.random as rnd import numpy.testing as np_testing from pymanopt.manifolds import Elliptope class TestElliptopeManifold(unittest.TestCase): def setUp(self): self.n = n = 50 self.k = k = 10 self.man = Elliptope(n, k) ...
Add elliptope manifold test skeleton.import unittest import numpy as np import numpy.linalg as la import numpy.random as rnd import numpy.testing as np_testing from pymanopt.manifolds import Elliptope class TestElliptopeManifold(unittest.TestCase): def setUp(self): self.n = n = 50 self.k = k = 1...
<commit_before><commit_msg>Add elliptope manifold test skeleton.<commit_after>import unittest import numpy as np import numpy.linalg as la import numpy.random as rnd import numpy.testing as np_testing from pymanopt.manifolds import Elliptope class TestElliptopeManifold(unittest.TestCase): def setUp(self): ...
837e35e1ecd8c4ab62a7011471d56c7b9283fb4d
media/mojo/scripts/run_mojo_media_renderer.py
media/mojo/scripts/run_mojo_media_renderer.py
#!/usr/bin/env python # Copyright 2015 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. # # The script follows mojo/services/html_viewer/view_url.py and modified it for # test the mojo media renderer. The page will be render...
Add script to run/test the mojo media renderer.
Add script to run/test the mojo media renderer. The script follows mojo/services/html_viewer/view_url.py. See the script for how to use it. BUG=410451 TEST=Run the script to test. Review URL: https://codereview.chromium.org/991963003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#319741}
Python
bsd-3-clause
chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk,axinging/chromium-crosswa...
Add script to run/test the mojo media renderer. The script follows mojo/services/html_viewer/view_url.py. See the script for how to use it. BUG=410451 TEST=Run the script to test. Review URL: https://codereview.chromium.org/991963003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#319741}
#!/usr/bin/env python # Copyright 2015 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. # # The script follows mojo/services/html_viewer/view_url.py and modified it for # test the mojo media renderer. The page will be render...
<commit_before><commit_msg>Add script to run/test the mojo media renderer. The script follows mojo/services/html_viewer/view_url.py. See the script for how to use it. BUG=410451 TEST=Run the script to test. Review URL: https://codereview.chromium.org/991963003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f...
#!/usr/bin/env python # Copyright 2015 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. # # The script follows mojo/services/html_viewer/view_url.py and modified it for # test the mojo media renderer. The page will be render...
Add script to run/test the mojo media renderer. The script follows mojo/services/html_viewer/view_url.py. See the script for how to use it. BUG=410451 TEST=Run the script to test. Review URL: https://codereview.chromium.org/991963003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#319741}#!/usr/bin/e...
<commit_before><commit_msg>Add script to run/test the mojo media renderer. The script follows mojo/services/html_viewer/view_url.py. See the script for how to use it. BUG=410451 TEST=Run the script to test. Review URL: https://codereview.chromium.org/991963003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f...
fca7a5923a412745e428fc9435fb2d7c7d376d11
recipes/earthpy/run_test.py
recipes/earthpy/run_test.py
import earthpy.io as eio import rasterio as rio with rio.open(eio.path_to_example('rmnp-dem.tif')) as src: dem = src.read()
Add script for a simple test
Add script for a simple test
Python
bsd-3-clause
dschreij/staged-recipes,chrisburr/staged-recipes,isuruf/staged-recipes,scopatz/staged-recipes,ocefpaf/staged-recipes,ReimarBauer/staged-recipes,birdsarah/staged-recipes,birdsarah/staged-recipes,Juanlu001/staged-recipes,mcs07/staged-recipes,igortg/staged-recipes,igortg/staged-recipes,johanneskoester/staged-recipes,kwilc...
Add script for a simple test
import earthpy.io as eio import rasterio as rio with rio.open(eio.path_to_example('rmnp-dem.tif')) as src: dem = src.read()
<commit_before><commit_msg>Add script for a simple test<commit_after>
import earthpy.io as eio import rasterio as rio with rio.open(eio.path_to_example('rmnp-dem.tif')) as src: dem = src.read()
Add script for a simple testimport earthpy.io as eio import rasterio as rio with rio.open(eio.path_to_example('rmnp-dem.tif')) as src: dem = src.read()
<commit_before><commit_msg>Add script for a simple test<commit_after>import earthpy.io as eio import rasterio as rio with rio.open(eio.path_to_example('rmnp-dem.tif')) as src: dem = src.read()
78137a7d276eed39b885754256c1601e5941f62c
convert_to_recovery_and_remove_useless.py
convert_to_recovery_and_remove_useless.py
import sys import os import pandas as pd from utils import get_driving_log_dataframe from utils import img_folder from shutil import copyfile directory = sys.argv[1] output_directory = sys.argv[2] driving_log_df = get_driving_log_dataframe(directory) steering = driving_log_df['steering'] angle_offset = 0.25 # i...
Add useful script for standartizing data in beta simulator and the normal one
Add useful script for standartizing data in beta simulator and the normal one
Python
mit
hristo-vrigazov/behavioral-cloning,hristo-vrigazov/behavioral-cloning
Add useful script for standartizing data in beta simulator and the normal one
import sys import os import pandas as pd from utils import get_driving_log_dataframe from utils import img_folder from shutil import copyfile directory = sys.argv[1] output_directory = sys.argv[2] driving_log_df = get_driving_log_dataframe(directory) steering = driving_log_df['steering'] angle_offset = 0.25 # i...
<commit_before><commit_msg>Add useful script for standartizing data in beta simulator and the normal one<commit_after>
import sys import os import pandas as pd from utils import get_driving_log_dataframe from utils import img_folder from shutil import copyfile directory = sys.argv[1] output_directory = sys.argv[2] driving_log_df = get_driving_log_dataframe(directory) steering = driving_log_df['steering'] angle_offset = 0.25 # i...
Add useful script for standartizing data in beta simulator and the normal oneimport sys import os import pandas as pd from utils import get_driving_log_dataframe from utils import img_folder from shutil import copyfile directory = sys.argv[1] output_directory = sys.argv[2] driving_log_df = get_driving_log_dataframe...
<commit_before><commit_msg>Add useful script for standartizing data in beta simulator and the normal one<commit_after>import sys import os import pandas as pd from utils import get_driving_log_dataframe from utils import img_folder from shutil import copyfile directory = sys.argv[1] output_directory = sys.argv[2] d...
2a54042645a651c9c578517743f7267720e9d6b9
data/migrations/deb/1_3_433_to_1_3_434.py
data/migrations/deb/1_3_433_to_1_3_434.py
#!/usr/bin/python3.5 import os import sys import traceback from indy_common.config_util import getConfig from indy_common.config_helper import NodeConfigHelper from ledger.compact_merkle_tree import CompactMerkleTree from plenum.common.stack_manager import TxnStackManager from plenum.common.ledger import Ledger from...
Add migration script that appends node and client IPs to indy env file.
Add migration script that appends node and client IPs to indy env file. Signed-off-by: Sergey Shilov <064bbdfaeb89a0bebebfe7b388747a73c8941704@dsr-company.com>
Python
apache-2.0
spivachuk/sovrin-node,spivachuk/sovrin-node,spivachuk/sovrin-node,spivachuk/sovrin-node
Add migration script that appends node and client IPs to indy env file. Signed-off-by: Sergey Shilov <064bbdfaeb89a0bebebfe7b388747a73c8941704@dsr-company.com>
#!/usr/bin/python3.5 import os import sys import traceback from indy_common.config_util import getConfig from indy_common.config_helper import NodeConfigHelper from ledger.compact_merkle_tree import CompactMerkleTree from plenum.common.stack_manager import TxnStackManager from plenum.common.ledger import Ledger from...
<commit_before><commit_msg>Add migration script that appends node and client IPs to indy env file. Signed-off-by: Sergey Shilov <064bbdfaeb89a0bebebfe7b388747a73c8941704@dsr-company.com><commit_after>
#!/usr/bin/python3.5 import os import sys import traceback from indy_common.config_util import getConfig from indy_common.config_helper import NodeConfigHelper from ledger.compact_merkle_tree import CompactMerkleTree from plenum.common.stack_manager import TxnStackManager from plenum.common.ledger import Ledger from...
Add migration script that appends node and client IPs to indy env file. Signed-off-by: Sergey Shilov <064bbdfaeb89a0bebebfe7b388747a73c8941704@dsr-company.com>#!/usr/bin/python3.5 import os import sys import traceback from indy_common.config_util import getConfig from indy_common.config_helper import NodeConfigHelper...
<commit_before><commit_msg>Add migration script that appends node and client IPs to indy env file. Signed-off-by: Sergey Shilov <064bbdfaeb89a0bebebfe7b388747a73c8941704@dsr-company.com><commit_after>#!/usr/bin/python3.5 import os import sys import traceback from indy_common.config_util import getConfig from indy_com...
05e07c6f2dd5b334e917696ff13f57a426272014
parsing/command_parsing.py
parsing/command_parsing.py
''' In app map, sometimes need to describe how to start and close one UI element So create a simple command language to satify this. this language is like: 'elementX.elementY.operation [parameter1 parameter2 ...]' parameter could be number,string,bool,list,tuple ''' import ply.lex as lex import ply.yacc as yacc impor...
Add parsing for describing UIElement start/stop
Add parsing for describing UIElement start/stop Signed-off-by: xcgspring <8f4f8d15922e4269158d45cde01dc3497961f40d@126.com>
Python
apache-2.0
xcgspring/AXUI,xcgspring/AXUI,xcgspring/AXUI
Add parsing for describing UIElement start/stop Signed-off-by: xcgspring <8f4f8d15922e4269158d45cde01dc3497961f40d@126.com>
''' In app map, sometimes need to describe how to start and close one UI element So create a simple command language to satify this. this language is like: 'elementX.elementY.operation [parameter1 parameter2 ...]' parameter could be number,string,bool,list,tuple ''' import ply.lex as lex import ply.yacc as yacc impor...
<commit_before><commit_msg>Add parsing for describing UIElement start/stop Signed-off-by: xcgspring <8f4f8d15922e4269158d45cde01dc3497961f40d@126.com><commit_after>
''' In app map, sometimes need to describe how to start and close one UI element So create a simple command language to satify this. this language is like: 'elementX.elementY.operation [parameter1 parameter2 ...]' parameter could be number,string,bool,list,tuple ''' import ply.lex as lex import ply.yacc as yacc impor...
Add parsing for describing UIElement start/stop Signed-off-by: xcgspring <8f4f8d15922e4269158d45cde01dc3497961f40d@126.com>''' In app map, sometimes need to describe how to start and close one UI element So create a simple command language to satify this. this language is like: 'elementX.elementY.operation [parameter1...
<commit_before><commit_msg>Add parsing for describing UIElement start/stop Signed-off-by: xcgspring <8f4f8d15922e4269158d45cde01dc3497961f40d@126.com><commit_after>''' In app map, sometimes need to describe how to start and close one UI element So create a simple command language to satify this. this language is like:...
89612a126b7df58022554df439bef2988e504643
py/delete-node-in-a-bst.py
py/delete-node-in-a-bst.py
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def deleteNode(self, root, key): """ :type root: TreeNode :type key: int :rtype: TreeNode...
Add py solution for 450. Delete Node in a BST
Add py solution for 450. Delete Node in a BST 450. Delete Node in a BST: https://leetcode.com/problems/delete-node-in-a-bst/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 450. Delete Node in a BST 450. Delete Node in a BST: https://leetcode.com/problems/delete-node-in-a-bst/
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def deleteNode(self, root, key): """ :type root: TreeNode :type key: int :rtype: TreeNode...
<commit_before><commit_msg>Add py solution for 450. Delete Node in a BST 450. Delete Node in a BST: https://leetcode.com/problems/delete-node-in-a-bst/<commit_after>
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def deleteNode(self, root, key): """ :type root: TreeNode :type key: int :rtype: TreeNode...
Add py solution for 450. Delete Node in a BST 450. Delete Node in a BST: https://leetcode.com/problems/delete-node-in-a-bst/# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): ...
<commit_before><commit_msg>Add py solution for 450. Delete Node in a BST 450. Delete Node in a BST: https://leetcode.com/problems/delete-node-in-a-bst/<commit_after># Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # se...
78a32a311d5578cb1bdf8e7d0c7f0ab567b6b986
actions/cloudbolt_plugins/prep_ctl_server_for_remote_scripts/prep_ctl_for_remote_scripts.py
actions/cloudbolt_plugins/prep_ctl_server_for_remote_scripts/prep_ctl_for_remote_scripts.py
#!/usr/bin/env python """ Used to configure some prerequisites that a CenturyLink VM needs before we can successfully run remote scripts on it. Namely, captures its credentials and stores them on the CB server object and adds a public IP address so it's accessible. Meant to be run as an orchestration action during pr...
Add example CTL Prep Plug-in
Add example CTL Prep Plug-in Can be referenced or used to save CTL credentials in CB and add a public IP.
Python
apache-2.0
CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge
Add example CTL Prep Plug-in Can be referenced or used to save CTL credentials in CB and add a public IP.
#!/usr/bin/env python """ Used to configure some prerequisites that a CenturyLink VM needs before we can successfully run remote scripts on it. Namely, captures its credentials and stores them on the CB server object and adds a public IP address so it's accessible. Meant to be run as an orchestration action during pr...
<commit_before><commit_msg>Add example CTL Prep Plug-in Can be referenced or used to save CTL credentials in CB and add a public IP.<commit_after>
#!/usr/bin/env python """ Used to configure some prerequisites that a CenturyLink VM needs before we can successfully run remote scripts on it. Namely, captures its credentials and stores them on the CB server object and adds a public IP address so it's accessible. Meant to be run as an orchestration action during pr...
Add example CTL Prep Plug-in Can be referenced or used to save CTL credentials in CB and add a public IP.#!/usr/bin/env python """ Used to configure some prerequisites that a CenturyLink VM needs before we can successfully run remote scripts on it. Namely, captures its credentials and stores them on the CB server obj...
<commit_before><commit_msg>Add example CTL Prep Plug-in Can be referenced or used to save CTL credentials in CB and add a public IP.<commit_after>#!/usr/bin/env python """ Used to configure some prerequisites that a CenturyLink VM needs before we can successfully run remote scripts on it. Namely, captures its credent...
86cede2c228e2e6bccb4adbdfe81d9d4bd34ac6f
teams/blog_fetch.py
teams/blog_fetch.py
"""Fetches the blogs configured on the website to local files. The local files dumped to are 'BLOGNAME.incoming.yml' in the assets/blogs directory. Should be run as a regular cron-job. Must be run from within the website virtual environment. --- Copyright (c) 2013, University Radio York. All rights reserved. Redi...
Move the Python end of blog-fetch to LASS.
Move the Python end of blog-fetch to LASS.
Python
bsd-2-clause
UniversityRadioYork/lass-pyramid
Move the Python end of blog-fetch to LASS.
"""Fetches the blogs configured on the website to local files. The local files dumped to are 'BLOGNAME.incoming.yml' in the assets/blogs directory. Should be run as a regular cron-job. Must be run from within the website virtual environment. --- Copyright (c) 2013, University Radio York. All rights reserved. Redi...
<commit_before><commit_msg>Move the Python end of blog-fetch to LASS.<commit_after>
"""Fetches the blogs configured on the website to local files. The local files dumped to are 'BLOGNAME.incoming.yml' in the assets/blogs directory. Should be run as a regular cron-job. Must be run from within the website virtual environment. --- Copyright (c) 2013, University Radio York. All rights reserved. Redi...
Move the Python end of blog-fetch to LASS."""Fetches the blogs configured on the website to local files. The local files dumped to are 'BLOGNAME.incoming.yml' in the assets/blogs directory. Should be run as a regular cron-job. Must be run from within the website virtual environment. --- Copyright (c) 2013, Univers...
<commit_before><commit_msg>Move the Python end of blog-fetch to LASS.<commit_after>"""Fetches the blogs configured on the website to local files. The local files dumped to are 'BLOGNAME.incoming.yml' in the assets/blogs directory. Should be run as a regular cron-job. Must be run from within the website virtual envir...
4cb674093c95ebbe3f7dc61d0b6a262995337100
osf/migrations/0012_auto_20170411_1548.py
osf/migrations/0012_auto_20170411_1548.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-04-05 17:30 from __future__ import unicode_literals from django.db import migrations, models from django.contrib.auth.models import Permission, Group from django.contrib.contenttypes.models import ContentType from osf.models import OSFUser def fix_osfuser_vi...
Add proper view_osfuser permission to read_only and admin groups
Add proper view_osfuser permission to read_only and admin groups
Python
apache-2.0
chennan47/osf.io,adlius/osf.io,leb2dg/osf.io,binoculars/osf.io,mattclark/osf.io,icereval/osf.io,Johnetordoff/osf.io,chrisseto/osf.io,caseyrollins/osf.io,sloria/osf.io,saradbowman/osf.io,brianjgeiger/osf.io,Johnetordoff/osf.io,chennan47/osf.io,leb2dg/osf.io,Johnetordoff/osf.io,Nesiehr/osf.io,mfraezz/osf.io,HalcyonChimer...
Add proper view_osfuser permission to read_only and admin groups
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-04-05 17:30 from __future__ import unicode_literals from django.db import migrations, models from django.contrib.auth.models import Permission, Group from django.contrib.contenttypes.models import ContentType from osf.models import OSFUser def fix_osfuser_vi...
<commit_before><commit_msg>Add proper view_osfuser permission to read_only and admin groups<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-04-05 17:30 from __future__ import unicode_literals from django.db import migrations, models from django.contrib.auth.models import Permission, Group from django.contrib.contenttypes.models import ContentType from osf.models import OSFUser def fix_osfuser_vi...
Add proper view_osfuser permission to read_only and admin groups# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-04-05 17:30 from __future__ import unicode_literals from django.db import migrations, models from django.contrib.auth.models import Permission, Group from django.contrib.contenttypes.models import ...
<commit_before><commit_msg>Add proper view_osfuser permission to read_only and admin groups<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-04-05 17:30 from __future__ import unicode_literals from django.db import migrations, models from django.contrib.auth.models import Permission, Group from d...
d821e62e343150ee57daa4e5ac6ad203cb4d9708
comp/microsoft/000_missinteger.py
comp/microsoft/000_missinteger.py
''' https://app.codility.com/demo/results/demoHZEZJ5-D8X/ This is a demo task. Write a function: def solution(A) that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A. For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5. Give...
Implement MissingInteger (microsoft oa demo)
Implement MissingInteger (microsoft oa demo)
Python
mit
Chasego/codirit,cc13ny/algo,Chasego/codi,Chasego/cod,Chasego/codi,cc13ny/algo,Chasego/codi,Chasego/cod,Chasego/codi,Chasego/codirit,Chasego/codi,cc13ny/algo,Chasego/codirit,cc13ny/algo,Chasego/cod,Chasego/cod,cc13ny/algo,Chasego/codirit,Chasego/cod,Chasego/codirit
Implement MissingInteger (microsoft oa demo)
''' https://app.codility.com/demo/results/demoHZEZJ5-D8X/ This is a demo task. Write a function: def solution(A) that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A. For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5. Give...
<commit_before><commit_msg>Implement MissingInteger (microsoft oa demo)<commit_after>
''' https://app.codility.com/demo/results/demoHZEZJ5-D8X/ This is a demo task. Write a function: def solution(A) that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A. For example, given A = [1, 3, 6, 4, 1, 2], the function should return 5. Give...
Implement MissingInteger (microsoft oa demo)''' https://app.codility.com/demo/results/demoHZEZJ5-D8X/ This is a demo task. Write a function: def solution(A) that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur in A. For example, given A = [1, 3, 6, 4...
<commit_before><commit_msg>Implement MissingInteger (microsoft oa demo)<commit_after>''' https://app.codility.com/demo/results/demoHZEZJ5-D8X/ This is a demo task. Write a function: def solution(A) that, given an array A of N integers, returns the smallest positive integer (greater than 0) that does not occur ...
e1d268d1d7ad63c0c9db6ff3b6645b835ef4513f
resources/git/hooks/pre_commit.py
resources/git/hooks/pre_commit.py
#! /usr/bin/env python # -*- coding: utf-8 -*- """ This script provides automatic update and staging of documentation files when "raw" documentation files have been changed. """ from __future__ import absolute_import, division, print_function, unicode_literals import inspect import os import sys import git GIT_HOO...
Add git hook to auto-stage docs files
resources: Add git hook to auto-stage docs files
Python
bsd-3-clause
khalim19/gimp-plugin-export-layers,khalim19/gimp-plugin-export-layers
resources: Add git hook to auto-stage docs files
#! /usr/bin/env python # -*- coding: utf-8 -*- """ This script provides automatic update and staging of documentation files when "raw" documentation files have been changed. """ from __future__ import absolute_import, division, print_function, unicode_literals import inspect import os import sys import git GIT_HOO...
<commit_before><commit_msg>resources: Add git hook to auto-stage docs files<commit_after>
#! /usr/bin/env python # -*- coding: utf-8 -*- """ This script provides automatic update and staging of documentation files when "raw" documentation files have been changed. """ from __future__ import absolute_import, division, print_function, unicode_literals import inspect import os import sys import git GIT_HOO...
resources: Add git hook to auto-stage docs files#! /usr/bin/env python # -*- coding: utf-8 -*- """ This script provides automatic update and staging of documentation files when "raw" documentation files have been changed. """ from __future__ import absolute_import, division, print_function, unicode_literals import i...
<commit_before><commit_msg>resources: Add git hook to auto-stage docs files<commit_after>#! /usr/bin/env python # -*- coding: utf-8 -*- """ This script provides automatic update and staging of documentation files when "raw" documentation files have been changed. """ from __future__ import absolute_import, division, p...