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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8040b797ba78f59fd0d182dfd22993340cb37700 | test/test_logging.py | test/test_logging.py | from cStringIO import StringIO
import logging
import os
import sys
import tempfile
import unittest
from apel.common import set_up_logging
class LoggingTest(unittest.TestCase):
def setUp(self):
# Capture stdout in a StringIO object for inspection.
self._stdout = sys.stdout
sys.stdout = Str... | Add unittest for logging from apel.common.__init__ | Add unittest for logging from apel.common.__init__
| Python | apache-2.0 | apel/apel,stfc/apel,tofu-rocketry/apel,stfc/apel,tofu-rocketry/apel,apel/apel | Add unittest for logging from apel.common.__init__ | from cStringIO import StringIO
import logging
import os
import sys
import tempfile
import unittest
from apel.common import set_up_logging
class LoggingTest(unittest.TestCase):
def setUp(self):
# Capture stdout in a StringIO object for inspection.
self._stdout = sys.stdout
sys.stdout = Str... | <commit_before><commit_msg>Add unittest for logging from apel.common.__init__<commit_after> | from cStringIO import StringIO
import logging
import os
import sys
import tempfile
import unittest
from apel.common import set_up_logging
class LoggingTest(unittest.TestCase):
def setUp(self):
# Capture stdout in a StringIO object for inspection.
self._stdout = sys.stdout
sys.stdout = Str... | Add unittest for logging from apel.common.__init__from cStringIO import StringIO
import logging
import os
import sys
import tempfile
import unittest
from apel.common import set_up_logging
class LoggingTest(unittest.TestCase):
def setUp(self):
# Capture stdout in a StringIO object for inspection.
... | <commit_before><commit_msg>Add unittest for logging from apel.common.__init__<commit_after>from cStringIO import StringIO
import logging
import os
import sys
import tempfile
import unittest
from apel.common import set_up_logging
class LoggingTest(unittest.TestCase):
def setUp(self):
# Capture stdout in a... | |
c0e6979a98251fa2300b2c61f206775ef953f7a8 | tests/test-basics.py | tests/test-basics.py | #!/usr/bin/env python
import unittest
import pandas as pd
import pdfplumber
import sys, os
import six
import logging
logging.disable(logging.ERROR)
HERE = os.path.abspath(os.path.dirname(__file__))
class Test(unittest.TestCase):
def setUp(self):
path = os.path.join(HERE, "pdfs/nics-background-checks-201... | Add test for very basic things | Add test for very basic things
| Python | mit | jsvine/pdfplumber | Add test for very basic things | #!/usr/bin/env python
import unittest
import pandas as pd
import pdfplumber
import sys, os
import six
import logging
logging.disable(logging.ERROR)
HERE = os.path.abspath(os.path.dirname(__file__))
class Test(unittest.TestCase):
def setUp(self):
path = os.path.join(HERE, "pdfs/nics-background-checks-201... | <commit_before><commit_msg>Add test for very basic things<commit_after> | #!/usr/bin/env python
import unittest
import pandas as pd
import pdfplumber
import sys, os
import six
import logging
logging.disable(logging.ERROR)
HERE = os.path.abspath(os.path.dirname(__file__))
class Test(unittest.TestCase):
def setUp(self):
path = os.path.join(HERE, "pdfs/nics-background-checks-201... | Add test for very basic things#!/usr/bin/env python
import unittest
import pandas as pd
import pdfplumber
import sys, os
import six
import logging
logging.disable(logging.ERROR)
HERE = os.path.abspath(os.path.dirname(__file__))
class Test(unittest.TestCase):
def setUp(self):
path = os.path.join(HERE, "p... | <commit_before><commit_msg>Add test for very basic things<commit_after>#!/usr/bin/env python
import unittest
import pandas as pd
import pdfplumber
import sys, os
import six
import logging
logging.disable(logging.ERROR)
HERE = os.path.abspath(os.path.dirname(__file__))
class Test(unittest.TestCase):
def setUp(se... | |
305a137352ee2a287ded5d39657f91460e474e3b | tests/test_search.py | tests/test_search.py | """Test the ElasticSearch module"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from pytest import raises
from gobble.search import Contributo... | Add tests for ElasticSearch classes. | Add tests for ElasticSearch classes.
| Python | mit | openspending/gobble | Add tests for ElasticSearch classes. | """Test the ElasticSearch module"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from pytest import raises
from gobble.search import Contributo... | <commit_before><commit_msg>Add tests for ElasticSearch classes.<commit_after> | """Test the ElasticSearch module"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from pytest import raises
from gobble.search import Contributo... | Add tests for ElasticSearch classes."""Test the ElasticSearch module"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from pytest import raises
... | <commit_before><commit_msg>Add tests for ElasticSearch classes.<commit_after>"""Test the ElasticSearch module"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.inst... | |
5981cba4f2bac5b1c29d4901bd0b3b3f523eb8a9 | tests/test_tshark.py | tests/test_tshark.py | import mock
from pyshark.tshark.tshark import (
get_tshark_display_filter_flag,
get_tshark_interfaces,
get_tshark_version,
)
@mock.patch('pyshark.tshark.tshark.subprocess.check_output', autospec=True)
def test_get_tshark_version(mock_check_output):
mock_check_output.return_value = (
b'TShark 1... | Add tests for tshark sub-module | Add tests for tshark sub-module
| Python | mit | eaufavor/pyshark-ssl,KimiNewt/pyshark | Add tests for tshark sub-module | import mock
from pyshark.tshark.tshark import (
get_tshark_display_filter_flag,
get_tshark_interfaces,
get_tshark_version,
)
@mock.patch('pyshark.tshark.tshark.subprocess.check_output', autospec=True)
def test_get_tshark_version(mock_check_output):
mock_check_output.return_value = (
b'TShark 1... | <commit_before><commit_msg>Add tests for tshark sub-module<commit_after> | import mock
from pyshark.tshark.tshark import (
get_tshark_display_filter_flag,
get_tshark_interfaces,
get_tshark_version,
)
@mock.patch('pyshark.tshark.tshark.subprocess.check_output', autospec=True)
def test_get_tshark_version(mock_check_output):
mock_check_output.return_value = (
b'TShark 1... | Add tests for tshark sub-moduleimport mock
from pyshark.tshark.tshark import (
get_tshark_display_filter_flag,
get_tshark_interfaces,
get_tshark_version,
)
@mock.patch('pyshark.tshark.tshark.subprocess.check_output', autospec=True)
def test_get_tshark_version(mock_check_output):
mock_check_output.retu... | <commit_before><commit_msg>Add tests for tshark sub-module<commit_after>import mock
from pyshark.tshark.tshark import (
get_tshark_display_filter_flag,
get_tshark_interfaces,
get_tshark_version,
)
@mock.patch('pyshark.tshark.tshark.subprocess.check_output', autospec=True)
def test_get_tshark_version(mock_... | |
c637bb057698b2699c9515ee9aed8432d7c51fe7 | projects/generate.py | projects/generate.py | import os
import subprocess
import sys
# get the path to the directory containing the script
projects_directory = os.path.dirname(os.path.realpath(__file__))
platform_name = sys.platform
platform_folder = ""
if platform_name == 'win32':
platform_folder = "win"
elif platform_name == 'darwin':
platform_folder = "mac"... | Add Python project generation script. | Add Python project generation script.
| Python | mit | chrisculy/Divida,chrisculy/Divida | Add Python project generation script. | import os
import subprocess
import sys
# get the path to the directory containing the script
projects_directory = os.path.dirname(os.path.realpath(__file__))
platform_name = sys.platform
platform_folder = ""
if platform_name == 'win32':
platform_folder = "win"
elif platform_name == 'darwin':
platform_folder = "mac"... | <commit_before><commit_msg>Add Python project generation script.<commit_after> | import os
import subprocess
import sys
# get the path to the directory containing the script
projects_directory = os.path.dirname(os.path.realpath(__file__))
platform_name = sys.platform
platform_folder = ""
if platform_name == 'win32':
platform_folder = "win"
elif platform_name == 'darwin':
platform_folder = "mac"... | Add Python project generation script.import os
import subprocess
import sys
# get the path to the directory containing the script
projects_directory = os.path.dirname(os.path.realpath(__file__))
platform_name = sys.platform
platform_folder = ""
if platform_name == 'win32':
platform_folder = "win"
elif platform_name ... | <commit_before><commit_msg>Add Python project generation script.<commit_after>import os
import subprocess
import sys
# get the path to the directory containing the script
projects_directory = os.path.dirname(os.path.realpath(__file__))
platform_name = sys.platform
platform_folder = ""
if platform_name == 'win32':
pl... | |
ef204d9455070d3ebff2890813e98ca44d398212 | client/bootloader_run_application.py | client/bootloader_run_application.py | #!/usr/bin/env python
import utils
import commands
def parse_commandline_args():
parser = utils.ConnectionArgumentParser(description='Send a jump to application command.')
parser.add_argument("ids", metavar='DEVICEID', nargs='*', type=int,
help="Device IDs to send jump command")
par... | Add tool to send a jump to application command. | Add tool to send a jump to application command.
| Python | bsd-2-clause | cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader | Add tool to send a jump to application command. | #!/usr/bin/env python
import utils
import commands
def parse_commandline_args():
parser = utils.ConnectionArgumentParser(description='Send a jump to application command.')
parser.add_argument("ids", metavar='DEVICEID', nargs='*', type=int,
help="Device IDs to send jump command")
par... | <commit_before><commit_msg>Add tool to send a jump to application command.<commit_after> | #!/usr/bin/env python
import utils
import commands
def parse_commandline_args():
parser = utils.ConnectionArgumentParser(description='Send a jump to application command.')
parser.add_argument("ids", metavar='DEVICEID', nargs='*', type=int,
help="Device IDs to send jump command")
par... | Add tool to send a jump to application command.#!/usr/bin/env python
import utils
import commands
def parse_commandline_args():
parser = utils.ConnectionArgumentParser(description='Send a jump to application command.')
parser.add_argument("ids", metavar='DEVICEID', nargs='*', type=int,
... | <commit_before><commit_msg>Add tool to send a jump to application command.<commit_after>#!/usr/bin/env python
import utils
import commands
def parse_commandline_args():
parser = utils.ConnectionArgumentParser(description='Send a jump to application command.')
parser.add_argument("ids", metavar='DEVICEID', narg... | |
7c292b1577420d74fd72cbc4eef3d5364ba01bb2 | backend/django/apps/accounts/migrations/0001_initial.py | backend/django/apps/accounts/migrations/0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-11 19:06
from __future__ import unicode_literals
import apps.accounts.models
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependenc... | Make the initial account migrations | Make the initial account migrations
| Python | mit | slavpetroff/sweetshop,slavpetroff/sweetshop | Make the initial account migrations | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-11 19:06
from __future__ import unicode_literals
import apps.accounts.models
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependenc... | <commit_before><commit_msg>Make the initial account migrations<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-11 19:06
from __future__ import unicode_literals
import apps.accounts.models
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependenc... | Make the initial account migrations# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-11 19:06
from __future__ import unicode_literals
import apps.accounts.models
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):... | <commit_before><commit_msg>Make the initial account migrations<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-11 19:06
from __future__ import unicode_literals
import apps.accounts.models
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone... | |
3c9ef6d42bb45d147d0c6093ea134d94fc4cf29f | penn/libraries.py | penn/libraries.py | """A module for consuming the Penn Libraries API"""
import requests
BASE_URL = "http://dla.library.upenn.edu/2.0.0/search"
def search(query):
"""Search Penn Libraries Franklin for documents
The maximum pagesize currently is 50.
"""
params = {
's.cmd': 'setTextQuery(%s)setPageSize(50)setHoldin... | Add primitive library search support | Add primitive library search support
| Python | mit | pennlabs/penn-sdk-python,pennlabs/penn-sdk-python | Add primitive library search support | """A module for consuming the Penn Libraries API"""
import requests
BASE_URL = "http://dla.library.upenn.edu/2.0.0/search"
def search(query):
"""Search Penn Libraries Franklin for documents
The maximum pagesize currently is 50.
"""
params = {
's.cmd': 'setTextQuery(%s)setPageSize(50)setHoldin... | <commit_before><commit_msg>Add primitive library search support<commit_after> | """A module for consuming the Penn Libraries API"""
import requests
BASE_URL = "http://dla.library.upenn.edu/2.0.0/search"
def search(query):
"""Search Penn Libraries Franklin for documents
The maximum pagesize currently is 50.
"""
params = {
's.cmd': 'setTextQuery(%s)setPageSize(50)setHoldin... | Add primitive library search support"""A module for consuming the Penn Libraries API"""
import requests
BASE_URL = "http://dla.library.upenn.edu/2.0.0/search"
def search(query):
"""Search Penn Libraries Franklin for documents
The maximum pagesize currently is 50.
"""
params = {
's.cmd': 'setT... | <commit_before><commit_msg>Add primitive library search support<commit_after>"""A module for consuming the Penn Libraries API"""
import requests
BASE_URL = "http://dla.library.upenn.edu/2.0.0/search"
def search(query):
"""Search Penn Libraries Franklin for documents
The maximum pagesize currently is 50.
... | |
8290df4317b0aae2c15b4a82942413b84f754e84 | cla_public/apps/base/tests/test_locale.py | cla_public/apps/base/tests/test_locale.py | import unittest
from cla_public.apps.base.views import set_locale
from cla_public.app import create_app
from flask import request
class LocaleTest(unittest.TestCase):
def setUp(self):
self.app = create_app('config/testing.py')
ctx = self.app.test_request_context()
ctx.push()
self.client = self.app.... | Test locale is set based on query param | Test locale is set based on query param
| Python | mit | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public | Test locale is set based on query param | import unittest
from cla_public.apps.base.views import set_locale
from cla_public.app import create_app
from flask import request
class LocaleTest(unittest.TestCase):
def setUp(self):
self.app = create_app('config/testing.py')
ctx = self.app.test_request_context()
ctx.push()
self.client = self.app.... | <commit_before><commit_msg>Test locale is set based on query param<commit_after> | import unittest
from cla_public.apps.base.views import set_locale
from cla_public.app import create_app
from flask import request
class LocaleTest(unittest.TestCase):
def setUp(self):
self.app = create_app('config/testing.py')
ctx = self.app.test_request_context()
ctx.push()
self.client = self.app.... | Test locale is set based on query paramimport unittest
from cla_public.apps.base.views import set_locale
from cla_public.app import create_app
from flask import request
class LocaleTest(unittest.TestCase):
def setUp(self):
self.app = create_app('config/testing.py')
ctx = self.app.test_request_context()
... | <commit_before><commit_msg>Test locale is set based on query param<commit_after>import unittest
from cla_public.apps.base.views import set_locale
from cla_public.app import create_app
from flask import request
class LocaleTest(unittest.TestCase):
def setUp(self):
self.app = create_app('config/testing.py')
... | |
844fd2533063343c969d9ff9259c80605fe488dd | hiicart/forms.py | hiicart/forms.py | from django import forms
class PaymentFormBase(forms.Form):
def __getitem__(self, key):
payment_fields = self._get_payment_fields()
if key in payment_fields:
key = payment_fields[key]
return super(PaymentFormBase, self).__getitem__(key)
def _get_payment_fields(self):
ra... | Apply refactoring done to authorize.net form/gateway to braintree. | Apply refactoring done to authorize.net form/gateway to braintree.
| Python | mit | hiidef/hiicart,hiidef/hiicart | Apply refactoring done to authorize.net form/gateway to braintree. | from django import forms
class PaymentFormBase(forms.Form):
def __getitem__(self, key):
payment_fields = self._get_payment_fields()
if key in payment_fields:
key = payment_fields[key]
return super(PaymentFormBase, self).__getitem__(key)
def _get_payment_fields(self):
ra... | <commit_before><commit_msg>Apply refactoring done to authorize.net form/gateway to braintree.<commit_after> | from django import forms
class PaymentFormBase(forms.Form):
def __getitem__(self, key):
payment_fields = self._get_payment_fields()
if key in payment_fields:
key = payment_fields[key]
return super(PaymentFormBase, self).__getitem__(key)
def _get_payment_fields(self):
ra... | Apply refactoring done to authorize.net form/gateway to braintree.from django import forms
class PaymentFormBase(forms.Form):
def __getitem__(self, key):
payment_fields = self._get_payment_fields()
if key in payment_fields:
key = payment_fields[key]
return super(PaymentFormBase, ... | <commit_before><commit_msg>Apply refactoring done to authorize.net form/gateway to braintree.<commit_after>from django import forms
class PaymentFormBase(forms.Form):
def __getitem__(self, key):
payment_fields = self._get_payment_fields()
if key in payment_fields:
key = payment_fields[ke... | |
8a07ebf3db3cd2b70534c92e90d5428444e3d8f1 | bookwormDB/bin/dbbindings-flask.py | bookwormDB/bin/dbbindings-flask.py | #!/usr/bin/env python
#So we load in the terms that allow the API implementation to happen for now.
from bookwormDB.general_API import SQLAPIcall as SQLAPIcall
from flask import Flask, request, Response
import json
import os
app = Flask(__name__)
@app.route('/')
def index():
JSONinput = request.args.get('queryTe... | Add a python-only alternative to dbbindings.py | Add a python-only alternative to dbbindings.py
Pushing a small web app that can return Bookworm API calls through Python, rather than Apache HTTP Server. It is currently a very simple porting of the Apache code that runs on port 8080, and is intended for minimal installs.
| Python | mit | Bookworm-project/BookwormDB,Bookworm-project/BookwormDB | Add a python-only alternative to dbbindings.py
Pushing a small web app that can return Bookworm API calls through Python, rather than Apache HTTP Server. It is currently a very simple porting of the Apache code that runs on port 8080, and is intended for minimal installs. | #!/usr/bin/env python
#So we load in the terms that allow the API implementation to happen for now.
from bookwormDB.general_API import SQLAPIcall as SQLAPIcall
from flask import Flask, request, Response
import json
import os
app = Flask(__name__)
@app.route('/')
def index():
JSONinput = request.args.get('queryTe... | <commit_before><commit_msg>Add a python-only alternative to dbbindings.py
Pushing a small web app that can return Bookworm API calls through Python, rather than Apache HTTP Server. It is currently a very simple porting of the Apache code that runs on port 8080, and is intended for minimal installs.<commit_after> | #!/usr/bin/env python
#So we load in the terms that allow the API implementation to happen for now.
from bookwormDB.general_API import SQLAPIcall as SQLAPIcall
from flask import Flask, request, Response
import json
import os
app = Flask(__name__)
@app.route('/')
def index():
JSONinput = request.args.get('queryTe... | Add a python-only alternative to dbbindings.py
Pushing a small web app that can return Bookworm API calls through Python, rather than Apache HTTP Server. It is currently a very simple porting of the Apache code that runs on port 8080, and is intended for minimal installs.#!/usr/bin/env python
#So we load in the terms... | <commit_before><commit_msg>Add a python-only alternative to dbbindings.py
Pushing a small web app that can return Bookworm API calls through Python, rather than Apache HTTP Server. It is currently a very simple porting of the Apache code that runs on port 8080, and is intended for minimal installs.<commit_after>#!/usr... | |
ea0ff4ae04907473e2af6e7629ea9d73a34f4d85 | graphysio/plotwidgets/poiselector.py | graphysio/plotwidgets/poiselector.py | from functools import partial
import numpy as np
import pandas as pd
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore
from graphysio.plotwidgets.plotwidget import PlotWidget
from graphysio.plotwidgets.tsplot import CurveItemWithFeet
class POISelectorWidget(PlotWidget):
@staticmethod
def mouseMo... | Add sketch for POI selector widget | Add sketch for POI selector widget
| Python | isc | jaj42/dyngraph,jaj42/GraPhysio,jaj42/GraPhysio | Add sketch for POI selector widget | from functools import partial
import numpy as np
import pandas as pd
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore
from graphysio.plotwidgets.plotwidget import PlotWidget
from graphysio.plotwidgets.tsplot import CurveItemWithFeet
class POISelectorWidget(PlotWidget):
@staticmethod
def mouseMo... | <commit_before><commit_msg>Add sketch for POI selector widget<commit_after> | from functools import partial
import numpy as np
import pandas as pd
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore
from graphysio.plotwidgets.plotwidget import PlotWidget
from graphysio.plotwidgets.tsplot import CurveItemWithFeet
class POISelectorWidget(PlotWidget):
@staticmethod
def mouseMo... | Add sketch for POI selector widgetfrom functools import partial
import numpy as np
import pandas as pd
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore
from graphysio.plotwidgets.plotwidget import PlotWidget
from graphysio.plotwidgets.tsplot import CurveItemWithFeet
class POISelectorWidget(PlotWidget):... | <commit_before><commit_msg>Add sketch for POI selector widget<commit_after>from functools import partial
import numpy as np
import pandas as pd
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore
from graphysio.plotwidgets.plotwidget import PlotWidget
from graphysio.plotwidgets.tsplot import CurveItemWithF... | |
3bcb4fd5fd9680d33423e76bd9502f408a5e498f | tests/test_modules/test_scanning/test_unrollingblock.py | tests/test_modules/test_scanning/test_unrollingblock.py | from mock import Mock
from malcolm.modules.scanning.blocks import unrolling_block
from malcolm.testutil import ChildTestCase
class TestUnrollingBlock(ChildTestCase):
def test_unrolling_block(self):
self.create_child_block(
unrolling_block,
Mock(),
mri="TEST:MRI",
... | Add test to instantiate unrolling block | Add test to instantiate unrolling block
| Python | apache-2.0 | dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm | Add test to instantiate unrolling block | from mock import Mock
from malcolm.modules.scanning.blocks import unrolling_block
from malcolm.testutil import ChildTestCase
class TestUnrollingBlock(ChildTestCase):
def test_unrolling_block(self):
self.create_child_block(
unrolling_block,
Mock(),
mri="TEST:MRI",
... | <commit_before><commit_msg>Add test to instantiate unrolling block<commit_after> | from mock import Mock
from malcolm.modules.scanning.blocks import unrolling_block
from malcolm.testutil import ChildTestCase
class TestUnrollingBlock(ChildTestCase):
def test_unrolling_block(self):
self.create_child_block(
unrolling_block,
Mock(),
mri="TEST:MRI",
... | Add test to instantiate unrolling blockfrom mock import Mock
from malcolm.modules.scanning.blocks import unrolling_block
from malcolm.testutil import ChildTestCase
class TestUnrollingBlock(ChildTestCase):
def test_unrolling_block(self):
self.create_child_block(
unrolling_block,
Mo... | <commit_before><commit_msg>Add test to instantiate unrolling block<commit_after>from mock import Mock
from malcolm.modules.scanning.blocks import unrolling_block
from malcolm.testutil import ChildTestCase
class TestUnrollingBlock(ChildTestCase):
def test_unrolling_block(self):
self.create_child_block(
... | |
998442022f2c71197c6e91fb8de276316eff5cc5 | tempest/tests/lib/services/volume/v2/test_capabilities_client.py | tempest/tests/lib/services/volume/v2/test_capabilities_client.py | # Copyright 2017 AT&T Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | Add Capabilities Client unit tests | Add Capabilities Client unit tests
Change-Id: I0bb5d0d7b775ee41dedf6ac30ece3698d585f072
| Python | apache-2.0 | Juniper/tempest,vedujoshi/tempest,cisco-openstack/tempest,cisco-openstack/tempest,vedujoshi/tempest,masayukig/tempest,openstack/tempest,Juniper/tempest,masayukig/tempest,openstack/tempest | Add Capabilities Client unit tests
Change-Id: I0bb5d0d7b775ee41dedf6ac30ece3698d585f072 | # Copyright 2017 AT&T Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | <commit_before><commit_msg>Add Capabilities Client unit tests
Change-Id: I0bb5d0d7b775ee41dedf6ac30ece3698d585f072<commit_after> | # Copyright 2017 AT&T Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | Add Capabilities Client unit tests
Change-Id: I0bb5d0d7b775ee41dedf6ac30ece3698d585f072# Copyright 2017 AT&T Corporation.
# 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... | <commit_before><commit_msg>Add Capabilities Client unit tests
Change-Id: I0bb5d0d7b775ee41dedf6ac30ece3698d585f072<commit_after># Copyright 2017 AT&T Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the L... | |
1c39b15ef604db13c37e37080ba6294c163b0c5d | tools/gitlog2asciidoc.py | tools/gitlog2asciidoc.py | #!/usr/bin/python
import sys
import re
import subprocess
"""
This script generates a release note from the output of git log
between the specified tags.
Arguments:
since -- tag name
until -- tag name
Example Input:
* <commit subject>
+
<commit message>
Bug: issue 123
Change-Id: <change id>
Signed... | Add scripts to create release notes from git log | Add scripts to create release notes from git log
These script generates a list of commits from git log between
<since> and <until>. The output of this script is in asciidoc
format containting list of commits subject and body.
Bug: issue 1272
Change-Id: I32b2ee055e81c5663128aafefd5f46c2e17e58c8
| Python | apache-2.0 | midnightradio/gerrit,zommarin/gerrit,gcoders/gerrit,bpollack/gerrit,Seinlin/gerrit,thesamet/gerrit,keerath/gerrit_newssh,teamblueridge/gerrit,qtproject/qtqa-gerrit,GerritCodeReview/gerrit,anminhsu/gerrit,quyixia/gerrit,teamblueridge/gerrit,thinkernel/gerrit,Seinlin/gerrit,quyixia/gerrit,ashang/aaron-gerrit,Saulis/gerri... | Add scripts to create release notes from git log
These script generates a list of commits from git log between
<since> and <until>. The output of this script is in asciidoc
format containting list of commits subject and body.
Bug: issue 1272
Change-Id: I32b2ee055e81c5663128aafefd5f46c2e17e58c8 | #!/usr/bin/python
import sys
import re
import subprocess
"""
This script generates a release note from the output of git log
between the specified tags.
Arguments:
since -- tag name
until -- tag name
Example Input:
* <commit subject>
+
<commit message>
Bug: issue 123
Change-Id: <change id>
Signed... | <commit_before><commit_msg>Add scripts to create release notes from git log
These script generates a list of commits from git log between
<since> and <until>. The output of this script is in asciidoc
format containting list of commits subject and body.
Bug: issue 1272
Change-Id: I32b2ee055e81c5663128aafefd5f46c2e17e5... | #!/usr/bin/python
import sys
import re
import subprocess
"""
This script generates a release note from the output of git log
between the specified tags.
Arguments:
since -- tag name
until -- tag name
Example Input:
* <commit subject>
+
<commit message>
Bug: issue 123
Change-Id: <change id>
Signed... | Add scripts to create release notes from git log
These script generates a list of commits from git log between
<since> and <until>. The output of this script is in asciidoc
format containting list of commits subject and body.
Bug: issue 1272
Change-Id: I32b2ee055e81c5663128aafefd5f46c2e17e58c8#!/usr/bin/python
import... | <commit_before><commit_msg>Add scripts to create release notes from git log
These script generates a list of commits from git log between
<since> and <until>. The output of this script is in asciidoc
format containting list of commits subject and body.
Bug: issue 1272
Change-Id: I32b2ee055e81c5663128aafefd5f46c2e17e5... | |
02cad9118c4aa03e783899ce4637d4c4fe010f57 | scripts/add-missing-terminal-part-ofs.py | scripts/add-missing-terminal-part-ofs.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.argv[0],)
sys.exit(1)
project_id = int(sys.argv[1])
user_id = int(sys.argv[2])
c = db_connection.cursor()
c.execute("SELECT id FROM relation WHERE project... | Add a script to add back the missing [terminal] part_of [skeleton] relationships | Add a script to add back the missing [terminal] part_of [skeleton] relationships
| Python | agpl-3.0 | htem/CATMAID,fzadow/CATMAID,htem/CATMAID,htem/CATMAID,fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID,fzadow/CATMAID | Add a script to add back the missing [terminal] part_of [skeleton] relationships | #!/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.argv[0],)
sys.exit(1)
project_id = int(sys.argv[1])
user_id = int(sys.argv[2])
c = db_connection.cursor()
c.execute("SELECT id FROM relation WHERE project... | <commit_before><commit_msg>Add a script to add back the missing [terminal] part_of [skeleton] relationships<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.argv[0],)
sys.exit(1)
project_id = int(sys.argv[1])
user_id = int(sys.argv[2])
c = db_connection.cursor()
c.execute("SELECT id FROM relation WHERE project... | Add a script to add back the missing [terminal] part_of [skeleton] relationships#!/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.argv[0],)
sys.exit(1)
project_id = int(sys.argv[1])
user_id = int(sys.argv[2... | <commit_before><commit_msg>Add a script to add back the missing [terminal] part_of [skeleton] relationships<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.argv[0],)
sys.exit(1)
project_id = ... | |
58c10946515b37e55b06f3e455a59c44d3b6076d | buzzmobile/tests/rostest_utils.py | buzzmobile/tests/rostest_utils.py | import roslaunch
import functools
import subprocess
def with_roscore(obj):
"""Decorator to run all tests in a testcase with their own roscore.
This wraps the setUp and tearDown methods to start by first spinning up a
roscore process, and tears it down at the very end. This adds a small time
penalty, b... | Add utilities to make writing ros tests less painful. | Add utilities to make writing ros tests less painful.
| Python | mit | jgkamat/buzzmobile,gtagency/buzzmobile,gtagency/buzzmobile,jgkamat/buzzmobile,gtagency/buzzmobile,jgkamat/buzzmobile | Add utilities to make writing ros tests less painful. | import roslaunch
import functools
import subprocess
def with_roscore(obj):
"""Decorator to run all tests in a testcase with their own roscore.
This wraps the setUp and tearDown methods to start by first spinning up a
roscore process, and tears it down at the very end. This adds a small time
penalty, b... | <commit_before><commit_msg>Add utilities to make writing ros tests less painful.<commit_after> | import roslaunch
import functools
import subprocess
def with_roscore(obj):
"""Decorator to run all tests in a testcase with their own roscore.
This wraps the setUp and tearDown methods to start by first spinning up a
roscore process, and tears it down at the very end. This adds a small time
penalty, b... | Add utilities to make writing ros tests less painful.import roslaunch
import functools
import subprocess
def with_roscore(obj):
"""Decorator to run all tests in a testcase with their own roscore.
This wraps the setUp and tearDown methods to start by first spinning up a
roscore process, and tears it down a... | <commit_before><commit_msg>Add utilities to make writing ros tests less painful.<commit_after>import roslaunch
import functools
import subprocess
def with_roscore(obj):
"""Decorator to run all tests in a testcase with their own roscore.
This wraps the setUp and tearDown methods to start by first spinning up a... | |
e64b399370ae4ddb21a969d1b8c664d2201790f9 | engines/ep/management/sync_repl.py | engines/ep/management/sync_repl.py | #!/usr/bin/env python
""" Simple CLI for basic SyncWrite operations."""
from __future__ import print_function
from collections import defaultdict
import mc_bin_client
import sys
if len(sys.argv) < 7:
print("Usage: {} <host[:port]> <user> <password> <bucket> <op> <key> [value]".format(sys.argv[0]), file = sys.std... | Add basic CLI for SyncWrite requests | [SR] Add basic CLI for SyncWrite requests
Add sync_repl.py; a basic command-line interface to making Synchronous
Replication requests.
Example usage - to perform a set with durability requirements to key
'test' setting its value to 'XXX':
./sync_repl.py localhost:12000 Administrator asdasd default setD test XXX
... | Python | bsd-3-clause | daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine | [SR] Add basic CLI for SyncWrite requests
Add sync_repl.py; a basic command-line interface to making Synchronous
Replication requests.
Example usage - to perform a set with durability requirements to key
'test' setting its value to 'XXX':
./sync_repl.py localhost:12000 Administrator asdasd default setD test XXX
... | #!/usr/bin/env python
""" Simple CLI for basic SyncWrite operations."""
from __future__ import print_function
from collections import defaultdict
import mc_bin_client
import sys
if len(sys.argv) < 7:
print("Usage: {} <host[:port]> <user> <password> <bucket> <op> <key> [value]".format(sys.argv[0]), file = sys.std... | <commit_before><commit_msg>[SR] Add basic CLI for SyncWrite requests
Add sync_repl.py; a basic command-line interface to making Synchronous
Replication requests.
Example usage - to perform a set with durability requirements to key
'test' setting its value to 'XXX':
./sync_repl.py localhost:12000 Administrator as... | #!/usr/bin/env python
""" Simple CLI for basic SyncWrite operations."""
from __future__ import print_function
from collections import defaultdict
import mc_bin_client
import sys
if len(sys.argv) < 7:
print("Usage: {} <host[:port]> <user> <password> <bucket> <op> <key> [value]".format(sys.argv[0]), file = sys.std... | [SR] Add basic CLI for SyncWrite requests
Add sync_repl.py; a basic command-line interface to making Synchronous
Replication requests.
Example usage - to perform a set with durability requirements to key
'test' setting its value to 'XXX':
./sync_repl.py localhost:12000 Administrator asdasd default setD test XXX
... | <commit_before><commit_msg>[SR] Add basic CLI for SyncWrite requests
Add sync_repl.py; a basic command-line interface to making Synchronous
Replication requests.
Example usage - to perform a set with durability requirements to key
'test' setting its value to 'XXX':
./sync_repl.py localhost:12000 Administrator as... | |
e87f5c80d7723480544374c175cacc5540f9f6ab | Lib/test/leakers/test_generator_cycle.py | Lib/test/leakers/test_generator_cycle.py |
# This leaks since the introduction of yield-expr and the use of generators
# as coroutines, trunk revision 39239. The cycle-GC doesn't seem to pick up
# the cycle, or decides it can't clean it up.
def leak():
def gen():
while True:
yield g
g = gen()
| Add an example of a generator->freevar->cell->generator reference-cycle that doesn't get cleaned up and thus leaks. | Add an example of a generator->freevar->cell->generator reference-cycle that
doesn't get cleaned up and thus leaks.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | Add an example of a generator->freevar->cell->generator reference-cycle that
doesn't get cleaned up and thus leaks. |
# This leaks since the introduction of yield-expr and the use of generators
# as coroutines, trunk revision 39239. The cycle-GC doesn't seem to pick up
# the cycle, or decides it can't clean it up.
def leak():
def gen():
while True:
yield g
g = gen()
| <commit_before><commit_msg>Add an example of a generator->freevar->cell->generator reference-cycle that
doesn't get cleaned up and thus leaks.<commit_after> |
# This leaks since the introduction of yield-expr and the use of generators
# as coroutines, trunk revision 39239. The cycle-GC doesn't seem to pick up
# the cycle, or decides it can't clean it up.
def leak():
def gen():
while True:
yield g
g = gen()
| Add an example of a generator->freevar->cell->generator reference-cycle that
doesn't get cleaned up and thus leaks.
# This leaks since the introduction of yield-expr and the use of generators
# as coroutines, trunk revision 39239. The cycle-GC doesn't seem to pick up
# the cycle, or decides it can't clean it up.
def l... | <commit_before><commit_msg>Add an example of a generator->freevar->cell->generator reference-cycle that
doesn't get cleaned up and thus leaks.<commit_after>
# This leaks since the introduction of yield-expr and the use of generators
# as coroutines, trunk revision 39239. The cycle-GC doesn't seem to pick up
# the cycle... | |
7529bbffd349c57d3ec527a91b620252d0814414 | kolibri/core/test/test_key_urls.py | kolibri/core/test/test_key_urls.py | from __future__ import absolute_import, print_function, unicode_literals
from django.core.urlresolvers import reverse
from rest_framework.test import APITestCase
from kolibri.auth.models import Facility, DeviceOwner
class KolibriTagNavigationTestCase(APITestCase):
def test_redirect_to_setup_wizard(self):
... | Test that redirects from root URL are performed appropriately. | Test that redirects from root URL are performed appropriately.
| Python | mit | mrpau/kolibri,rtibbles/kolibri,christianmemije/kolibri,jonboiser/kolibri,benjaoming/kolibri,jayoshih/kolibri,jtamiace/kolibri,learningequality/kolibri,jonboiser/kolibri,christianmemije/kolibri,jamalex/kolibri,DXCanas/kolibri,aronasorman/kolibri,whitzhu/kolibri,DXCanas/kolibri,lyw07/kolibri,MingDai/kolibri,lyw07/kolibri... | Test that redirects from root URL are performed appropriately. | from __future__ import absolute_import, print_function, unicode_literals
from django.core.urlresolvers import reverse
from rest_framework.test import APITestCase
from kolibri.auth.models import Facility, DeviceOwner
class KolibriTagNavigationTestCase(APITestCase):
def test_redirect_to_setup_wizard(self):
... | <commit_before><commit_msg>Test that redirects from root URL are performed appropriately.<commit_after> | from __future__ import absolute_import, print_function, unicode_literals
from django.core.urlresolvers import reverse
from rest_framework.test import APITestCase
from kolibri.auth.models import Facility, DeviceOwner
class KolibriTagNavigationTestCase(APITestCase):
def test_redirect_to_setup_wizard(self):
... | Test that redirects from root URL are performed appropriately.from __future__ import absolute_import, print_function, unicode_literals
from django.core.urlresolvers import reverse
from rest_framework.test import APITestCase
from kolibri.auth.models import Facility, DeviceOwner
class KolibriTagNavigationTestCase(APIT... | <commit_before><commit_msg>Test that redirects from root URL are performed appropriately.<commit_after>from __future__ import absolute_import, print_function, unicode_literals
from django.core.urlresolvers import reverse
from rest_framework.test import APITestCase
from kolibri.auth.models import Facility, DeviceOwner... | |
8b778a0564d424fc4c9e91da90ced7e8cec9b002 | lava/utils/data_tables/backends.py | lava/utils/data_tables/backends.py | # Copyright (C) 2012 Linaro Limited
#
# Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
#
# This file is part of LAVA Server.
#
# LAVA Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# as published by the Free Software... | Add array backend for data tables | Add array backend for data tables
This simple backend performs all operations inside python's runtime
memory. It is suitable for working with small data sets and experimenting
with data-tables.
The actual backend is not fully finished as it is not essential. It lacks
per-column search, regexp support and multi-column... | Python | agpl-3.0 | OSSystems/lava-server,Linaro/lava-server,OSSystems/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server,Linaro/lava-server | Add array backend for data tables
This simple backend performs all operations inside python's runtime
memory. It is suitable for working with small data sets and experimenting
with data-tables.
The actual backend is not fully finished as it is not essential. It lacks
per-column search, regexp support and multi-column... | # Copyright (C) 2012 Linaro Limited
#
# Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
#
# This file is part of LAVA Server.
#
# LAVA Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# as published by the Free Software... | <commit_before><commit_msg>Add array backend for data tables
This simple backend performs all operations inside python's runtime
memory. It is suitable for working with small data sets and experimenting
with data-tables.
The actual backend is not fully finished as it is not essential. It lacks
per-column search, rege... | # Copyright (C) 2012 Linaro Limited
#
# Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
#
# This file is part of LAVA Server.
#
# LAVA Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# as published by the Free Software... | Add array backend for data tables
This simple backend performs all operations inside python's runtime
memory. It is suitable for working with small data sets and experimenting
with data-tables.
The actual backend is not fully finished as it is not essential. It lacks
per-column search, regexp support and multi-column... | <commit_before><commit_msg>Add array backend for data tables
This simple backend performs all operations inside python's runtime
memory. It is suitable for working with small data sets and experimenting
with data-tables.
The actual backend is not fully finished as it is not essential. It lacks
per-column search, rege... | |
b635b6f17e8fceba72e48ab074120d3bddd9388d | tools/process_EXO.py | tools/process_EXO.py |
# EXO Convesion Script
# Using specification v1.01
# J.C. Loach (2013)
# Textual replacements
remove = {r"\centering":"", r"newline":"", r"tabular":""};
# Main loop through data file
with open("exo_data.txt") as f_in:
for line in f_in:
for i, j in remove.iteritems():
line = line.replace(i,j)
line = l... | Add tool for converting EXO data from latex to JSON | Add tool for converting EXO data from latex to JSON
| Python | apache-2.0 | chrisstanford/persephone-darkside,nepahwin/persephone,nepahwin/persephone,chrisstanford/persephone-darkside | Add tool for converting EXO data from latex to JSON |
# EXO Convesion Script
# Using specification v1.01
# J.C. Loach (2013)
# Textual replacements
remove = {r"\centering":"", r"newline":"", r"tabular":""};
# Main loop through data file
with open("exo_data.txt") as f_in:
for line in f_in:
for i, j in remove.iteritems():
line = line.replace(i,j)
line = l... | <commit_before><commit_msg>Add tool for converting EXO data from latex to JSON<commit_after> |
# EXO Convesion Script
# Using specification v1.01
# J.C. Loach (2013)
# Textual replacements
remove = {r"\centering":"", r"newline":"", r"tabular":""};
# Main loop through data file
with open("exo_data.txt") as f_in:
for line in f_in:
for i, j in remove.iteritems():
line = line.replace(i,j)
line = l... | Add tool for converting EXO data from latex to JSON
# EXO Convesion Script
# Using specification v1.01
# J.C. Loach (2013)
# Textual replacements
remove = {r"\centering":"", r"newline":"", r"tabular":""};
# Main loop through data file
with open("exo_data.txt") as f_in:
for line in f_in:
for i, j in remove.iteri... | <commit_before><commit_msg>Add tool for converting EXO data from latex to JSON<commit_after>
# EXO Convesion Script
# Using specification v1.01
# J.C. Loach (2013)
# Textual replacements
remove = {r"\centering":"", r"newline":"", r"tabular":""};
# Main loop through data file
with open("exo_data.txt") as f_in:
for l... | |
030e558b3b52900b8fa2cea9a92c055de3ec5b44 | corehq/apps/domain/management/commands/migrate_domain_countries.py | corehq/apps/domain/management/commands/migrate_domain_countries.py | from django.core.management.base import LabelCommand
from django_countries.countries import COUNTRIES
from corehq.apps.domain.models import Domain
class Command(LabelCommand):
help = "Migrates old django domain countries from string to list. Sept 2014."
args = ""
label = ""
def handle(self, *args, **o... | Add management command to migrate countries to list | Add management command to migrate countries to list
| Python | bsd-3-clause | puttarajubr/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq | Add management command to migrate countries to list | from django.core.management.base import LabelCommand
from django_countries.countries import COUNTRIES
from corehq.apps.domain.models import Domain
class Command(LabelCommand):
help = "Migrates old django domain countries from string to list. Sept 2014."
args = ""
label = ""
def handle(self, *args, **o... | <commit_before><commit_msg>Add management command to migrate countries to list<commit_after> | from django.core.management.base import LabelCommand
from django_countries.countries import COUNTRIES
from corehq.apps.domain.models import Domain
class Command(LabelCommand):
help = "Migrates old django domain countries from string to list. Sept 2014."
args = ""
label = ""
def handle(self, *args, **o... | Add management command to migrate countries to listfrom django.core.management.base import LabelCommand
from django_countries.countries import COUNTRIES
from corehq.apps.domain.models import Domain
class Command(LabelCommand):
help = "Migrates old django domain countries from string to list. Sept 2014."
args =... | <commit_before><commit_msg>Add management command to migrate countries to list<commit_after>from django.core.management.base import LabelCommand
from django_countries.countries import COUNTRIES
from corehq.apps.domain.models import Domain
class Command(LabelCommand):
help = "Migrates old django domain countries fr... | |
2e9c58f00db55e12f3a9df1a71fe33fbe440d7ce | corehq/apps/domain/management/commands/migrate_domain_countries.py | corehq/apps/domain/management/commands/migrate_domain_countries.py | from django.core.management.base import LabelCommand
from django_countries.countries import COUNTRIES
from corehq.apps.domain.models import Domain
class Command(LabelCommand):
help = "Migrates old django domain countries from string to list. Sept 2014."
args = ""
label = ""
def handle(self, *args, **o... | from django.core.management.base import LabelCommand
from django_countries.countries import COUNTRIES
from corehq.apps.domain.models import Domain
class Command(LabelCommand):
help = "Migrates old django domain countries from string to list. Sept 2014."
args = ""
label = ""
def handle(self, *args, **o... | Add migration for deployment country to countries | Add migration for deployment country to countries
| Python | bsd-3-clause | qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq | from django.core.management.base import LabelCommand
from django_countries.countries import COUNTRIES
from corehq.apps.domain.models import Domain
class Command(LabelCommand):
help = "Migrates old django domain countries from string to list. Sept 2014."
args = ""
label = ""
def handle(self, *args, **o... | from django.core.management.base import LabelCommand
from django_countries.countries import COUNTRIES
from corehq.apps.domain.models import Domain
class Command(LabelCommand):
help = "Migrates old django domain countries from string to list. Sept 2014."
args = ""
label = ""
def handle(self, *args, **o... | <commit_before>from django.core.management.base import LabelCommand
from django_countries.countries import COUNTRIES
from corehq.apps.domain.models import Domain
class Command(LabelCommand):
help = "Migrates old django domain countries from string to list. Sept 2014."
args = ""
label = ""
def handle(s... | from django.core.management.base import LabelCommand
from django_countries.countries import COUNTRIES
from corehq.apps.domain.models import Domain
class Command(LabelCommand):
help = "Migrates old django domain countries from string to list. Sept 2014."
args = ""
label = ""
def handle(self, *args, **o... | from django.core.management.base import LabelCommand
from django_countries.countries import COUNTRIES
from corehq.apps.domain.models import Domain
class Command(LabelCommand):
help = "Migrates old django domain countries from string to list. Sept 2014."
args = ""
label = ""
def handle(self, *args, **o... | <commit_before>from django.core.management.base import LabelCommand
from django_countries.countries import COUNTRIES
from corehq.apps.domain.models import Domain
class Command(LabelCommand):
help = "Migrates old django domain countries from string to list. Sept 2014."
args = ""
label = ""
def handle(s... |
5b251c46581e286f05e02ec2363b9c83a228f3fb | data_collection/social_media/twitter/spellchecking/get_category.py | data_collection/social_media/twitter/spellchecking/get_category.py | #!/usr/bin/env python2
# Install nltk: 'sudo pip install -U pyyaml nltk'
from nltk.stem.lancaster import LancasterStemmer
c = {'cname1': ['hello', 'rice', 'increasing'], 'cname2': ['horses', 'horse']}
c_stems = {}
st = LancasterStemmer()
# 1. Build set for existing categories
def init_stem_sets():
for cname in ... | Use NLTK to get word stems (useful for categorization) | Use NLTK to get word stems (useful for categorization)
| Python | bsd-3-clause | FAB4D/humanitas,FAB4D/humanitas,FAB4D/humanitas | Use NLTK to get word stems (useful for categorization) | #!/usr/bin/env python2
# Install nltk: 'sudo pip install -U pyyaml nltk'
from nltk.stem.lancaster import LancasterStemmer
c = {'cname1': ['hello', 'rice', 'increasing'], 'cname2': ['horses', 'horse']}
c_stems = {}
st = LancasterStemmer()
# 1. Build set for existing categories
def init_stem_sets():
for cname in ... | <commit_before><commit_msg>Use NLTK to get word stems (useful for categorization)<commit_after> | #!/usr/bin/env python2
# Install nltk: 'sudo pip install -U pyyaml nltk'
from nltk.stem.lancaster import LancasterStemmer
c = {'cname1': ['hello', 'rice', 'increasing'], 'cname2': ['horses', 'horse']}
c_stems = {}
st = LancasterStemmer()
# 1. Build set for existing categories
def init_stem_sets():
for cname in ... | Use NLTK to get word stems (useful for categorization)#!/usr/bin/env python2
# Install nltk: 'sudo pip install -U pyyaml nltk'
from nltk.stem.lancaster import LancasterStemmer
c = {'cname1': ['hello', 'rice', 'increasing'], 'cname2': ['horses', 'horse']}
c_stems = {}
st = LancasterStemmer()
# 1. Build set for exist... | <commit_before><commit_msg>Use NLTK to get word stems (useful for categorization)<commit_after>#!/usr/bin/env python2
# Install nltk: 'sudo pip install -U pyyaml nltk'
from nltk.stem.lancaster import LancasterStemmer
c = {'cname1': ['hello', 'rice', 'increasing'], 'cname2': ['horses', 'horse']}
c_stems = {}
st = Lan... | |
7ae164a58e229379f0acf674767bdb0b422cf13a | emission/net/ext_service/otp/test_otp.py | emission/net/ext_service/otp/test_otp.py | import unittest
import random
import datetime
import emission.net.ext_service.otp.otp as otp
import emission.core.wrapper.location as ecwl
import emission.storage.decorations.local_date_queries as ecsdlq
import emission.core.wrapper.user as ecwu
from past.utils import old_div
class TestOTPMethods(unittest.TestCase):... | Add test file for otp script | Add test file for otp script
| Python | bsd-3-clause | e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server | Add test file for otp script | import unittest
import random
import datetime
import emission.net.ext_service.otp.otp as otp
import emission.core.wrapper.location as ecwl
import emission.storage.decorations.local_date_queries as ecsdlq
import emission.core.wrapper.user as ecwu
from past.utils import old_div
class TestOTPMethods(unittest.TestCase):... | <commit_before><commit_msg>Add test file for otp script<commit_after> | import unittest
import random
import datetime
import emission.net.ext_service.otp.otp as otp
import emission.core.wrapper.location as ecwl
import emission.storage.decorations.local_date_queries as ecsdlq
import emission.core.wrapper.user as ecwu
from past.utils import old_div
class TestOTPMethods(unittest.TestCase):... | Add test file for otp scriptimport unittest
import random
import datetime
import emission.net.ext_service.otp.otp as otp
import emission.core.wrapper.location as ecwl
import emission.storage.decorations.local_date_queries as ecsdlq
import emission.core.wrapper.user as ecwu
from past.utils import old_div
class TestOT... | <commit_before><commit_msg>Add test file for otp script<commit_after>import unittest
import random
import datetime
import emission.net.ext_service.otp.otp as otp
import emission.core.wrapper.location as ecwl
import emission.storage.decorations.local_date_queries as ecsdlq
import emission.core.wrapper.user as ecwu
from... | |
6275c09373ac796876cebf62d74ac1f421eed3ca | ci/push/get_version_id.py | ci/push/get_version_id.py | import os
import sys
import csv
from push_api import SalesforcePushApi
# Force UTF8 output
reload(sys)
sys.setdefaultencoding('UTF8')
if __name__ == '__main__':
try:
username = os.environ.get('SF_USERNAME')
password = os.environ.get('SF_PASSWORD')
serverurl = os.environ.get('SF_SE... | Add push api script to get a version's salesforce id from its namespace and version number including support for patch and beta versions | Add push api script to get a version's salesforce id from its namespace
and version number including support for patch and beta versions
| Python | bsd-3-clause | steelbrick/CumulusCI,motivislearning/CumulusCI,steelbrick/CumulusCI,e02d96ec16/CumulusCI,cdcarter/CumulusCI,SalesforceFoundation/CumulusCI,Joble/CumulusCI,e02d96ec16/CumulusCI,motivislearning/CumulusCI,SalesforceFoundation/CumulusCI | Add push api script to get a version's salesforce id from its namespace
and version number including support for patch and beta versions | import os
import sys
import csv
from push_api import SalesforcePushApi
# Force UTF8 output
reload(sys)
sys.setdefaultencoding('UTF8')
if __name__ == '__main__':
try:
username = os.environ.get('SF_USERNAME')
password = os.environ.get('SF_PASSWORD')
serverurl = os.environ.get('SF_SE... | <commit_before><commit_msg>Add push api script to get a version's salesforce id from its namespace
and version number including support for patch and beta versions<commit_after> | import os
import sys
import csv
from push_api import SalesforcePushApi
# Force UTF8 output
reload(sys)
sys.setdefaultencoding('UTF8')
if __name__ == '__main__':
try:
username = os.environ.get('SF_USERNAME')
password = os.environ.get('SF_PASSWORD')
serverurl = os.environ.get('SF_SE... | Add push api script to get a version's salesforce id from its namespace
and version number including support for patch and beta versionsimport os
import sys
import csv
from push_api import SalesforcePushApi
# Force UTF8 output
reload(sys)
sys.setdefaultencoding('UTF8')
if __name__ == '__main__':
try:
... | <commit_before><commit_msg>Add push api script to get a version's salesforce id from its namespace
and version number including support for patch and beta versions<commit_after>import os
import sys
import csv
from push_api import SalesforcePushApi
# Force UTF8 output
reload(sys)
sys.setdefaultencoding('UTF8')
if __na... | |
2f4722bb30e39510e985a08da1d28dbdd6ccd232 | test/widgets/test_crypto_ticker.py | test/widgets/test_crypto_ticker.py | # Copyright (c) 2021 elParaguayo
#
# 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 rights
# to use, copy, modify, merge, publish, distrib... | Add test for CryptoTicker widget | Add test for CryptoTicker widget
| Python | mit | ramnes/qtile,qtile/qtile,ramnes/qtile,qtile/qtile | Add test for CryptoTicker widget | # Copyright (c) 2021 elParaguayo
#
# 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 rights
# to use, copy, modify, merge, publish, distrib... | <commit_before><commit_msg>Add test for CryptoTicker widget<commit_after> | # Copyright (c) 2021 elParaguayo
#
# 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 rights
# to use, copy, modify, merge, publish, distrib... | Add test for CryptoTicker widget# Copyright (c) 2021 elParaguayo
#
# 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 rights
# to use, copy,... | <commit_before><commit_msg>Add test for CryptoTicker widget<commit_after># Copyright (c) 2021 elParaguayo
#
# 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 with... | |
712ae25e8deda242856c2cc21afb86ba11c0258b | dockci/migrations/0003.py | dockci/migrations/0003.py | """
Migrate version to tag in build models
"""
import os
import shutil
import yaml
job_dirs = (
filename for filename in
os.listdir(os.path.join('data', 'builds'))
if os.path.isdir(os.path.join('data', 'builds', filename))
)
for job_dir in job_dirs:
build_files = (
filename for filename in
... | Add migration to rename version -> tag field | Add migration to rename version -> tag field
| Python | isc | RickyCook/paas-in-a-day-dockci,RickyCook/paas-in-a-day-dockci | Add migration to rename version -> tag field | """
Migrate version to tag in build models
"""
import os
import shutil
import yaml
job_dirs = (
filename for filename in
os.listdir(os.path.join('data', 'builds'))
if os.path.isdir(os.path.join('data', 'builds', filename))
)
for job_dir in job_dirs:
build_files = (
filename for filename in
... | <commit_before><commit_msg>Add migration to rename version -> tag field<commit_after> | """
Migrate version to tag in build models
"""
import os
import shutil
import yaml
job_dirs = (
filename for filename in
os.listdir(os.path.join('data', 'builds'))
if os.path.isdir(os.path.join('data', 'builds', filename))
)
for job_dir in job_dirs:
build_files = (
filename for filename in
... | Add migration to rename version -> tag field"""
Migrate version to tag in build models
"""
import os
import shutil
import yaml
job_dirs = (
filename for filename in
os.listdir(os.path.join('data', 'builds'))
if os.path.isdir(os.path.join('data', 'builds', filename))
)
for job_dir in job_dirs:
build_fi... | <commit_before><commit_msg>Add migration to rename version -> tag field<commit_after>"""
Migrate version to tag in build models
"""
import os
import shutil
import yaml
job_dirs = (
filename for filename in
os.listdir(os.path.join('data', 'builds'))
if os.path.isdir(os.path.join('data', 'builds', filename)... | |
c6108cacc7705c27b8913d82229c331551796830 | openprescribing/frontend/management/commands/migrate_some_dmd_data.py | openprescribing/frontend/management/commands/migrate_some_dmd_data.py | # This is a one-off command to migrate all TariffPrice and NCSOConcession data
# from the dmd app to the frontend app. It can be deleted once the dmd app has
# been removed.
from django.db import transaction
from django.core.management import BaseCommand
from dmd.models import TariffPrice as TariffPriceOld
from dmd.... | Add task to migrate TariffPrice and NCSOConcession data | Add task to migrate TariffPrice and NCSOConcession data
This file can be removed once the migration is done. (Should it be a
data migration?)
| Python | mit | ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc | Add task to migrate TariffPrice and NCSOConcession data
This file can be removed once the migration is done. (Should it be a
data migration?) | # This is a one-off command to migrate all TariffPrice and NCSOConcession data
# from the dmd app to the frontend app. It can be deleted once the dmd app has
# been removed.
from django.db import transaction
from django.core.management import BaseCommand
from dmd.models import TariffPrice as TariffPriceOld
from dmd.... | <commit_before><commit_msg>Add task to migrate TariffPrice and NCSOConcession data
This file can be removed once the migration is done. (Should it be a
data migration?)<commit_after> | # This is a one-off command to migrate all TariffPrice and NCSOConcession data
# from the dmd app to the frontend app. It can be deleted once the dmd app has
# been removed.
from django.db import transaction
from django.core.management import BaseCommand
from dmd.models import TariffPrice as TariffPriceOld
from dmd.... | Add task to migrate TariffPrice and NCSOConcession data
This file can be removed once the migration is done. (Should it be a
data migration?)# This is a one-off command to migrate all TariffPrice and NCSOConcession data
# from the dmd app to the frontend app. It can be deleted once the dmd app has
# been removed.
f... | <commit_before><commit_msg>Add task to migrate TariffPrice and NCSOConcession data
This file can be removed once the migration is done. (Should it be a
data migration?)<commit_after># This is a one-off command to migrate all TariffPrice and NCSOConcession data
# from the dmd app to the frontend app. It can be delete... | |
ab935c2fed108aeb1e7c0cad3ba97c48967c676f | flexx/util/eventhelper.py | flexx/util/eventhelper.py | import os
def iter_filenames(dir, ignore):
for dirpath, dirnames, filenames in os.walk(dir):
for fname in filenames:
filename = os.path.join(dirpath, fname)
if fname.endswith('.py'):
if fname not in ignore and filename not in ignore:
yie... | Add simple util to help convert to new event system | Add simple util to help convert to new event system
| Python | bsd-2-clause | jrversteegh/flexx,JohnLunzer/flexx,JohnLunzer/flexx,zoofIO/flexx,zoofIO/flexx,JohnLunzer/flexx,jrversteegh/flexx | Add simple util to help convert to new event system | import os
def iter_filenames(dir, ignore):
for dirpath, dirnames, filenames in os.walk(dir):
for fname in filenames:
filename = os.path.join(dirpath, fname)
if fname.endswith('.py'):
if fname not in ignore and filename not in ignore:
yie... | <commit_before><commit_msg>Add simple util to help convert to new event system<commit_after> | import os
def iter_filenames(dir, ignore):
for dirpath, dirnames, filenames in os.walk(dir):
for fname in filenames:
filename = os.path.join(dirpath, fname)
if fname.endswith('.py'):
if fname not in ignore and filename not in ignore:
yie... | Add simple util to help convert to new event systemimport os
def iter_filenames(dir, ignore):
for dirpath, dirnames, filenames in os.walk(dir):
for fname in filenames:
filename = os.path.join(dirpath, fname)
if fname.endswith('.py'):
if fname not in ignore a... | <commit_before><commit_msg>Add simple util to help convert to new event system<commit_after>import os
def iter_filenames(dir, ignore):
for dirpath, dirnames, filenames in os.walk(dir):
for fname in filenames:
filename = os.path.join(dirpath, fname)
if fname.endswith('.py'):
... | |
1bb34ccef2f5c622f258a7dbe375e3a62b6cf63d | py/magical-string.py | py/magical-string.py | class Solution(object):
def magicalString(self, n):
"""
:type n: int
:rtype: int
"""
if n == 0:
return 0
elif n <= 3:
return 1
q = [1, 2, 2]
cur = 1
skip = 2
cnt_1 = 1
total_cnt = 3
for v in q:
... | Add py solution for 481. Magical String | Add py solution for 481. Magical String
481. Magical String: https://leetcode.com/problems/magical-string/
| Python | apache-2.0 | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | Add py solution for 481. Magical String
481. Magical String: https://leetcode.com/problems/magical-string/ | class Solution(object):
def magicalString(self, n):
"""
:type n: int
:rtype: int
"""
if n == 0:
return 0
elif n <= 3:
return 1
q = [1, 2, 2]
cur = 1
skip = 2
cnt_1 = 1
total_cnt = 3
for v in q:
... | <commit_before><commit_msg>Add py solution for 481. Magical String
481. Magical String: https://leetcode.com/problems/magical-string/<commit_after> | class Solution(object):
def magicalString(self, n):
"""
:type n: int
:rtype: int
"""
if n == 0:
return 0
elif n <= 3:
return 1
q = [1, 2, 2]
cur = 1
skip = 2
cnt_1 = 1
total_cnt = 3
for v in q:
... | Add py solution for 481. Magical String
481. Magical String: https://leetcode.com/problems/magical-string/class Solution(object):
def magicalString(self, n):
"""
:type n: int
:rtype: int
"""
if n == 0:
return 0
elif n <= 3:
return 1
q ... | <commit_before><commit_msg>Add py solution for 481. Magical String
481. Magical String: https://leetcode.com/problems/magical-string/<commit_after>class Solution(object):
def magicalString(self, n):
"""
:type n: int
:rtype: int
"""
if n == 0:
return 0
eli... | |
654d21100ff2908af6c44e2d2d71ba92b1e96722 | script/lib/config.py | script/lib/config.py | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'aa87035cc012ce0d533bb56b947bca81a6e71b82'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'e375124044f9044ac88076eba0cd17361ee0997c'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | Upgrade libchromiumcontent to remove dom storage quota | Upgrade libchromiumcontent to remove dom storage quota
Closes #897.
| Python | mit | beni55/electron,vHanda/electron,leftstick/electron,mubassirhayat/electron,simongregory/electron,voidbridge/electron,tomashanacek/electron,nicobot/electron,MaxWhere/electron,pandoraui/electron,farmisen/electron,shennushi/electron,thomsonreuters/electron,minggo/electron,LadyNaggaga/electron,MaxGraey/electron,lrlna/electr... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'aa87035cc012ce0d533bb56b947bca81a6e71b82'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'e375124044f9044ac88076eba0cd17361ee0997c'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | <commit_before>#!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'aa87035cc012ce0d533bb56b947bca81a6e71b82'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'wi... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'e375124044f9044ac88076eba0cd17361ee0997c'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | #!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'aa87035cc012ce0d533bb56b947bca81a6e71b82'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
... | <commit_before>#!/usr/bin/env python
import platform
import sys
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'aa87035cc012ce0d533bb56b947bca81a6e71b82'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'wi... |
d9348ebad71376dd6e8c350f9d559cdd54c60cd0 | games/management/commands/resize_media.py | games/management/commands/resize_media.py | """Resize all game banners to a fixed size"""
import os
import shutil
from django.core.management.base import BaseCommand
from django.conf import settings
from sorl.thumbnail import get_thumbnail
from games.models import Game
class Command(BaseCommand):
"""Resize banners and icons"""
ICON_PATH = os.path.join... | Add management command to move icons and banners to static locations | Add management command to move icons and banners to static locations
| Python | agpl-3.0 | lutris/website,lutris/website,lutris/website,lutris/website | Add management command to move icons and banners to static locations | """Resize all game banners to a fixed size"""
import os
import shutil
from django.core.management.base import BaseCommand
from django.conf import settings
from sorl.thumbnail import get_thumbnail
from games.models import Game
class Command(BaseCommand):
"""Resize banners and icons"""
ICON_PATH = os.path.join... | <commit_before><commit_msg>Add management command to move icons and banners to static locations<commit_after> | """Resize all game banners to a fixed size"""
import os
import shutil
from django.core.management.base import BaseCommand
from django.conf import settings
from sorl.thumbnail import get_thumbnail
from games.models import Game
class Command(BaseCommand):
"""Resize banners and icons"""
ICON_PATH = os.path.join... | Add management command to move icons and banners to static locations"""Resize all game banners to a fixed size"""
import os
import shutil
from django.core.management.base import BaseCommand
from django.conf import settings
from sorl.thumbnail import get_thumbnail
from games.models import Game
class Command(BaseComman... | <commit_before><commit_msg>Add management command to move icons and banners to static locations<commit_after>"""Resize all game banners to a fixed size"""
import os
import shutil
from django.core.management.base import BaseCommand
from django.conf import settings
from sorl.thumbnail import get_thumbnail
from games.mode... | |
67b90064cfaa09c55ea138895eb6c7ed9513bc96 | Python-demo/test-demo/test_loop_with_else.py | Python-demo/test-demo/test_loop_with_else.py | # coding=utf-8
"""
# test_loop_with_else.py
#
# Copyright(C) By AbsentM. 2018
#
# Author: AbsentM
# Date: 2018/03/18
#
# Description: Test python loop with else demo
#
# Change Log:
# 2018/03/18 AbsentM Create the file
# 2018/03/18 AbsentM Add test demo
#
"""
def run_for_else_validation(fruits):
"""
... | Add python loop with else demo | Add python loop with else demo
| Python | mit | absentm/Demo,absentm/Demo,absentm/Demo,absentm/Demo,absentm/Demo,absentm/Demo | Add python loop with else demo | # coding=utf-8
"""
# test_loop_with_else.py
#
# Copyright(C) By AbsentM. 2018
#
# Author: AbsentM
# Date: 2018/03/18
#
# Description: Test python loop with else demo
#
# Change Log:
# 2018/03/18 AbsentM Create the file
# 2018/03/18 AbsentM Add test demo
#
"""
def run_for_else_validation(fruits):
"""
... | <commit_before><commit_msg>Add python loop with else demo<commit_after> | # coding=utf-8
"""
# test_loop_with_else.py
#
# Copyright(C) By AbsentM. 2018
#
# Author: AbsentM
# Date: 2018/03/18
#
# Description: Test python loop with else demo
#
# Change Log:
# 2018/03/18 AbsentM Create the file
# 2018/03/18 AbsentM Add test demo
#
"""
def run_for_else_validation(fruits):
"""
... | Add python loop with else demo# coding=utf-8
"""
# test_loop_with_else.py
#
# Copyright(C) By AbsentM. 2018
#
# Author: AbsentM
# Date: 2018/03/18
#
# Description: Test python loop with else demo
#
# Change Log:
# 2018/03/18 AbsentM Create the file
# 2018/03/18 AbsentM Add test demo
#
"""
def run_for_... | <commit_before><commit_msg>Add python loop with else demo<commit_after># coding=utf-8
"""
# test_loop_with_else.py
#
# Copyright(C) By AbsentM. 2018
#
# Author: AbsentM
# Date: 2018/03/18
#
# Description: Test python loop with else demo
#
# Change Log:
# 2018/03/18 AbsentM Create the file
# 2018/03/18 A... | |
c8336a85f002dfe8437c6092f3d44bca2c5e0b45 | dbaas/maintenance/scripts/migrate_email.py | dbaas/maintenance/scripts/migrate_email.py | from django.contrib.auth.models import User
from copy import deepcopy
def _migrate(file_path):
arq = open(file_path)
for line in arq.readlines():
old_email, new_email = line.strip().split(',')
old_email = old_email.strip()
new_email = new_email.strip()
try:
old_user... | Create script to migrate email | Create script to migrate email
| Python | bsd-3-clause | globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service | Create script to migrate email | from django.contrib.auth.models import User
from copy import deepcopy
def _migrate(file_path):
arq = open(file_path)
for line in arq.readlines():
old_email, new_email = line.strip().split(',')
old_email = old_email.strip()
new_email = new_email.strip()
try:
old_user... | <commit_before><commit_msg>Create script to migrate email<commit_after> | from django.contrib.auth.models import User
from copy import deepcopy
def _migrate(file_path):
arq = open(file_path)
for line in arq.readlines():
old_email, new_email = line.strip().split(',')
old_email = old_email.strip()
new_email = new_email.strip()
try:
old_user... | Create script to migrate emailfrom django.contrib.auth.models import User
from copy import deepcopy
def _migrate(file_path):
arq = open(file_path)
for line in arq.readlines():
old_email, new_email = line.strip().split(',')
old_email = old_email.strip()
new_email = new_email.strip()
... | <commit_before><commit_msg>Create script to migrate email<commit_after>from django.contrib.auth.models import User
from copy import deepcopy
def _migrate(file_path):
arq = open(file_path)
for line in arq.readlines():
old_email, new_email = line.strip().split(',')
old_email = old_email.strip()
... | |
fe45b745e5f0a859f10b6edf2ad8f1e24cc01a56 | heat_integrationtests/functional/test_simultaneous_update.py | heat_integrationtests/functional/test_simultaneous_update.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | Add integration tests for simultaneous updates | Add integration tests for simultaneous updates
Convergence allows us to start a stack update while a previous update (or
create) is still in progress. If a resource is found to be locked by a
previous graph traversal when the new traversal comes to update it, the
earlier traversal is responsible for retriggering the r... | Python | apache-2.0 | openstack/heat,noironetworks/heat,noironetworks/heat,openstack/heat | Add integration tests for simultaneous updates
Convergence allows us to start a stack update while a previous update (or
create) is still in progress. If a resource is found to be locked by a
previous graph traversal when the new traversal comes to update it, the
earlier traversal is responsible for retriggering the r... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | <commit_before><commit_msg>Add integration tests for simultaneous updates
Convergence allows us to start a stack update while a previous update (or
create) is still in progress. If a resource is found to be locked by a
previous graph traversal when the new traversal comes to update it, the
earlier traversal is respons... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | Add integration tests for simultaneous updates
Convergence allows us to start a stack update while a previous update (or
create) is still in progress. If a resource is found to be locked by a
previous graph traversal when the new traversal comes to update it, the
earlier traversal is responsible for retriggering the r... | <commit_before><commit_msg>Add integration tests for simultaneous updates
Convergence allows us to start a stack update while a previous update (or
create) is still in progress. If a resource is found to be locked by a
previous graph traversal when the new traversal comes to update it, the
earlier traversal is respons... | |
35aa49152ab28d3364afeac4a053b41082f0b3b9 | systrace/systrace/monitor_unittest.py | systrace/systrace/monitor_unittest.py | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import unittest
from systrace import decorators
from systrace import update_systrace_trace_viewer
SCRIPT_DIR = os.path.dirname(os.path.abspath(__... | Validate files needed by Android tools | Validate files needed by Android tools
BUG=catapult:#2546
Review-Url: https://codereview.chromium.org/2194743002
| Python | bsd-3-clause | sahiljain/catapult,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult,catapult-project/catapult,benschmaus/catapult,benschmaus/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,benschmaus/catapult,catapult-project/catapult,benschmaus/catapult,catapult-projec... | Validate files needed by Android tools
BUG=catapult:#2546
Review-Url: https://codereview.chromium.org/2194743002 | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import unittest
from systrace import decorators
from systrace import update_systrace_trace_viewer
SCRIPT_DIR = os.path.dirname(os.path.abspath(__... | <commit_before><commit_msg>Validate files needed by Android tools
BUG=catapult:#2546
Review-Url: https://codereview.chromium.org/2194743002<commit_after> | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import unittest
from systrace import decorators
from systrace import update_systrace_trace_viewer
SCRIPT_DIR = os.path.dirname(os.path.abspath(__... | Validate files needed by Android tools
BUG=catapult:#2546
Review-Url: https://codereview.chromium.org/2194743002# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import unittest
from systrace im... | <commit_before><commit_msg>Validate files needed by Android tools
BUG=catapult:#2546
Review-Url: https://codereview.chromium.org/2194743002<commit_after># Copyright 2016 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.
im... | |
cc0d1d493a4f9d6d702951f21cce805a5e102a6f | spectral_graph_display.py | spectral_graph_display.py | import numpy as np
from scipy import io, sparse, linalg
# run this from elegant scipy chapter
chem = np.load('chem-network.npy')
gap = np.load('gap-network.npy')
neuron_types = np.load('neuron-types.npy')
neuron_ids = np.load('neurons.npy')
A = chem + gap
n = A.shape[0]
c = (A + A.T) / 2
d = sparse.diags([np.sum(c, ax... | Add spectral graph display script | Add spectral graph display script
| Python | bsd-3-clause | jni/useful-histories | Add spectral graph display script | import numpy as np
from scipy import io, sparse, linalg
# run this from elegant scipy chapter
chem = np.load('chem-network.npy')
gap = np.load('gap-network.npy')
neuron_types = np.load('neuron-types.npy')
neuron_ids = np.load('neurons.npy')
A = chem + gap
n = A.shape[0]
c = (A + A.T) / 2
d = sparse.diags([np.sum(c, ax... | <commit_before><commit_msg>Add spectral graph display script<commit_after> | import numpy as np
from scipy import io, sparse, linalg
# run this from elegant scipy chapter
chem = np.load('chem-network.npy')
gap = np.load('gap-network.npy')
neuron_types = np.load('neuron-types.npy')
neuron_ids = np.load('neurons.npy')
A = chem + gap
n = A.shape[0]
c = (A + A.T) / 2
d = sparse.diags([np.sum(c, ax... | Add spectral graph display scriptimport numpy as np
from scipy import io, sparse, linalg
# run this from elegant scipy chapter
chem = np.load('chem-network.npy')
gap = np.load('gap-network.npy')
neuron_types = np.load('neuron-types.npy')
neuron_ids = np.load('neurons.npy')
A = chem + gap
n = A.shape[0]
c = (A + A.T) /... | <commit_before><commit_msg>Add spectral graph display script<commit_after>import numpy as np
from scipy import io, sparse, linalg
# run this from elegant scipy chapter
chem = np.load('chem-network.npy')
gap = np.load('gap-network.npy')
neuron_types = np.load('neuron-types.npy')
neuron_ids = np.load('neurons.npy')
A = ... | |
53436d9ea71b11c45fb7208c13b626d1b47d1f70 | tools/tests/test_linter_custom_check.py | tools/tests/test_linter_custom_check.py | import os
from itertools import chain
from mock import patch, MagicMock
from unittest import TestCase
from tools.linter_lib.custom_check import build_custom_checkers
ROOT_DIR = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
CHECK_MESSAGE = "Fix the corresponding rule in `tools/linter_lib/custom_check.py`.... | Add test case for custom_check.py | linter: Add test case for custom_check.py
Fixes #5406.
| Python | apache-2.0 | dhcrzf/zulip,jackrzhang/zulip,amanharitsh123/zulip,Galexrt/zulip,Galexrt/zulip,timabbott/zulip,rht/zulip,dhcrzf/zulip,rishig/zulip,zulip/zulip,zulip/zulip,showell/zulip,mahim97/zulip,timabbott/zulip,kou/zulip,kou/zulip,rht/zulip,synicalsyntax/zulip,punchagan/zulip,brainwane/zulip,timabbott/zulip,showell/zulip,synicalsy... | linter: Add test case for custom_check.py
Fixes #5406. | import os
from itertools import chain
from mock import patch, MagicMock
from unittest import TestCase
from tools.linter_lib.custom_check import build_custom_checkers
ROOT_DIR = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
CHECK_MESSAGE = "Fix the corresponding rule in `tools/linter_lib/custom_check.py`.... | <commit_before><commit_msg>linter: Add test case for custom_check.py
Fixes #5406.<commit_after> | import os
from itertools import chain
from mock import patch, MagicMock
from unittest import TestCase
from tools.linter_lib.custom_check import build_custom_checkers
ROOT_DIR = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
CHECK_MESSAGE = "Fix the corresponding rule in `tools/linter_lib/custom_check.py`.... | linter: Add test case for custom_check.py
Fixes #5406.import os
from itertools import chain
from mock import patch, MagicMock
from unittest import TestCase
from tools.linter_lib.custom_check import build_custom_checkers
ROOT_DIR = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
CHECK_MESSAGE = "Fix the co... | <commit_before><commit_msg>linter: Add test case for custom_check.py
Fixes #5406.<commit_after>import os
from itertools import chain
from mock import patch, MagicMock
from unittest import TestCase
from tools.linter_lib.custom_check import build_custom_checkers
ROOT_DIR = os.path.abspath(os.path.join(__file__, '..',... | |
9475f33d5689d348721c3f7409f7bb9ae2f0e639 | solidity/hypothesis/SolidityTest.py | solidity/hypothesis/SolidityTest.py | import json
from hypothesis import given, assume, example
import hypothesis.strategies as st
import unittest
from web3 import Web3, TestRPCProvider, RPCProvider
import os
import sys
sys.path.append(os.path.join(os.path.join(os.path.dirname(__file__),'..'),'python'))
import BancorFormula
class TestFormula(unittest.T... | Add a test which executes the Solidity contract over an Ethereum RPC, and then compares the result with the Python emulation of the Solidity contract. | Add a test which executes the Solidity contract over an Ethereum RPC, and then compares the result with the Python emulation of the Solidity contract.
| Python | apache-2.0 | enjin/contracts | Add a test which executes the Solidity contract over an Ethereum RPC, and then compares the result with the Python emulation of the Solidity contract. | import json
from hypothesis import given, assume, example
import hypothesis.strategies as st
import unittest
from web3 import Web3, TestRPCProvider, RPCProvider
import os
import sys
sys.path.append(os.path.join(os.path.join(os.path.dirname(__file__),'..'),'python'))
import BancorFormula
class TestFormula(unittest.T... | <commit_before><commit_msg>Add a test which executes the Solidity contract over an Ethereum RPC, and then compares the result with the Python emulation of the Solidity contract.<commit_after> | import json
from hypothesis import given, assume, example
import hypothesis.strategies as st
import unittest
from web3 import Web3, TestRPCProvider, RPCProvider
import os
import sys
sys.path.append(os.path.join(os.path.join(os.path.dirname(__file__),'..'),'python'))
import BancorFormula
class TestFormula(unittest.T... | Add a test which executes the Solidity contract over an Ethereum RPC, and then compares the result with the Python emulation of the Solidity contract.import json
from hypothesis import given, assume, example
import hypothesis.strategies as st
import unittest
from web3 import Web3, TestRPCProvider, RPCProvider
import ... | <commit_before><commit_msg>Add a test which executes the Solidity contract over an Ethereum RPC, and then compares the result with the Python emulation of the Solidity contract.<commit_after>import json
from hypothesis import given, assume, example
import hypothesis.strategies as st
import unittest
from web3 import Web... | |
45d7a440067f6c0aed45468863814fa0ee1c9449 | rembed/tests/test_plain_rnn.py | rembed/tests/test_plain_rnn.py | import unittest
import numpy as np
import theano
from theano import tensor as T
from rembed.plain_rnn import RNN
from rembed.util import VariableStore, CropAndPad, IdentityLayer
class RNNTestCase(unittest.TestCase):
"""Basic functional tests for RNN with dummy data."""
def _make_rnn(self, seq_length=4):
... | Check in plain RNN test. | Check in plain RNN test.
| Python | mit | stanfordnlp/spinn,nyu-mll/spinn,stanfordnlp/spinn,nyu-mll/spinn,nyu-mll/spinn,stanfordnlp/spinn | Check in plain RNN test. | import unittest
import numpy as np
import theano
from theano import tensor as T
from rembed.plain_rnn import RNN
from rembed.util import VariableStore, CropAndPad, IdentityLayer
class RNNTestCase(unittest.TestCase):
"""Basic functional tests for RNN with dummy data."""
def _make_rnn(self, seq_length=4):
... | <commit_before><commit_msg>Check in plain RNN test.<commit_after> | import unittest
import numpy as np
import theano
from theano import tensor as T
from rembed.plain_rnn import RNN
from rembed.util import VariableStore, CropAndPad, IdentityLayer
class RNNTestCase(unittest.TestCase):
"""Basic functional tests for RNN with dummy data."""
def _make_rnn(self, seq_length=4):
... | Check in plain RNN test.import unittest
import numpy as np
import theano
from theano import tensor as T
from rembed.plain_rnn import RNN
from rembed.util import VariableStore, CropAndPad, IdentityLayer
class RNNTestCase(unittest.TestCase):
"""Basic functional tests for RNN with dummy data."""
def _make_rn... | <commit_before><commit_msg>Check in plain RNN test.<commit_after>import unittest
import numpy as np
import theano
from theano import tensor as T
from rembed.plain_rnn import RNN
from rembed.util import VariableStore, CropAndPad, IdentityLayer
class RNNTestCase(unittest.TestCase):
"""Basic functional tests for ... | |
5974132232605d27fde2704631e3c8a6d928a723 | src/simple-http-server.py | src/simple-http-server.py | #!/usr/bin/env python3
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
import os, http.server
def main(args):
os.chdir(args.directory)
addr = ('' ,args.port)
httpd = http.server.HTTPServer(addr, http.server.SimpleHTTPRequestHandler)
httpd.serve_forever()
if __name__ == '__main__':
... | Add stupidly simple HTTP server using standard python 3 | Add stupidly simple HTTP server using standard python 3
| Python | unlicense | pastly/python-snippits | Add stupidly simple HTTP server using standard python 3 | #!/usr/bin/env python3
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
import os, http.server
def main(args):
os.chdir(args.directory)
addr = ('' ,args.port)
httpd = http.server.HTTPServer(addr, http.server.SimpleHTTPRequestHandler)
httpd.serve_forever()
if __name__ == '__main__':
... | <commit_before><commit_msg>Add stupidly simple HTTP server using standard python 3<commit_after> | #!/usr/bin/env python3
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
import os, http.server
def main(args):
os.chdir(args.directory)
addr = ('' ,args.port)
httpd = http.server.HTTPServer(addr, http.server.SimpleHTTPRequestHandler)
httpd.serve_forever()
if __name__ == '__main__':
... | Add stupidly simple HTTP server using standard python 3#!/usr/bin/env python3
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
import os, http.server
def main(args):
os.chdir(args.directory)
addr = ('' ,args.port)
httpd = http.server.HTTPServer(addr, http.server.SimpleHTTPRequestHandler)
... | <commit_before><commit_msg>Add stupidly simple HTTP server using standard python 3<commit_after>#!/usr/bin/env python3
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
import os, http.server
def main(args):
os.chdir(args.directory)
addr = ('' ,args.port)
httpd = http.server.HTTPServer(add... | |
82162a334595ad47090dc1a8991d53ab5ece3736 | components/expression_evaluator.py | components/expression_evaluator.py | """A set of utility functions to evaluate expressions.
Sample Usage:
print(SgExpressionEvaluator.EvaluateExpressionInRow(["a", "bb", "ccc"], [1, 2, 3], "bb + 2.0 + ccc / a"))
print(SgExpressionEvaluator.EvaluateExpressionsInRow(["a", "bb", "ccc"], [1, 2, 3], ["bb + 2.0 + ccc / a", "a + bb + ccc"]))
t = tb.... | Add SgExpressionEvaluator - Evaluates expressions given fields and values | Add SgExpressionEvaluator - Evaluates expressions given fields and values
| Python | mit | lnishan/SQLGitHub | Add SgExpressionEvaluator - Evaluates expressions given fields and values | """A set of utility functions to evaluate expressions.
Sample Usage:
print(SgExpressionEvaluator.EvaluateExpressionInRow(["a", "bb", "ccc"], [1, 2, 3], "bb + 2.0 + ccc / a"))
print(SgExpressionEvaluator.EvaluateExpressionsInRow(["a", "bb", "ccc"], [1, 2, 3], ["bb + 2.0 + ccc / a", "a + bb + ccc"]))
t = tb.... | <commit_before><commit_msg>Add SgExpressionEvaluator - Evaluates expressions given fields and values<commit_after> | """A set of utility functions to evaluate expressions.
Sample Usage:
print(SgExpressionEvaluator.EvaluateExpressionInRow(["a", "bb", "ccc"], [1, 2, 3], "bb + 2.0 + ccc / a"))
print(SgExpressionEvaluator.EvaluateExpressionsInRow(["a", "bb", "ccc"], [1, 2, 3], ["bb + 2.0 + ccc / a", "a + bb + ccc"]))
t = tb.... | Add SgExpressionEvaluator - Evaluates expressions given fields and values"""A set of utility functions to evaluate expressions.
Sample Usage:
print(SgExpressionEvaluator.EvaluateExpressionInRow(["a", "bb", "ccc"], [1, 2, 3], "bb + 2.0 + ccc / a"))
print(SgExpressionEvaluator.EvaluateExpressionsInRow(["a", "bb"... | <commit_before><commit_msg>Add SgExpressionEvaluator - Evaluates expressions given fields and values<commit_after>"""A set of utility functions to evaluate expressions.
Sample Usage:
print(SgExpressionEvaluator.EvaluateExpressionInRow(["a", "bb", "ccc"], [1, 2, 3], "bb + 2.0 + ccc / a"))
print(SgExpressionEval... | |
a543e4dd62de6e0dbda0fa43c67d3a3fe2165499 | download_summaries.py | download_summaries.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.summary_downloader import SummaryDownloader
if __name__ == '__main__':
# setting target dir and time interval of interest
tgt_dir = r"D:\nhl\official_and_json\2016-17"
date = "May 20, 2017"
to_date = "May 30, 2017"
downloader = SummaryDow... | Add initial version of download script | Add initial version of download script
| Python | mit | leaffan/pynhldb | Add initial version of download script | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.summary_downloader import SummaryDownloader
if __name__ == '__main__':
# setting target dir and time interval of interest
tgt_dir = r"D:\nhl\official_and_json\2016-17"
date = "May 20, 2017"
to_date = "May 30, 2017"
downloader = SummaryDow... | <commit_before><commit_msg>Add initial version of download script<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.summary_downloader import SummaryDownloader
if __name__ == '__main__':
# setting target dir and time interval of interest
tgt_dir = r"D:\nhl\official_and_json\2016-17"
date = "May 20, 2017"
to_date = "May 30, 2017"
downloader = SummaryDow... | Add initial version of download script#!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.summary_downloader import SummaryDownloader
if __name__ == '__main__':
# setting target dir and time interval of interest
tgt_dir = r"D:\nhl\official_and_json\2016-17"
date = "May 20, 2017"
to_date = "May ... | <commit_before><commit_msg>Add initial version of download script<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils.summary_downloader import SummaryDownloader
if __name__ == '__main__':
# setting target dir and time interval of interest
tgt_dir = r"D:\nhl\official_and_json\2016-17"
... | |
1c270ec827b2cbb2d8ed6077366d2d7d10e17b16 | utilities/foto-files/manage-duplicates.py | utilities/foto-files/manage-duplicates.py | '''
Compare File Contents and remove duplicate files
get sha256 hash for each file found
use dictionary to check for duplicates
delete duplicates
Dave Cuthbert
(C) 2021-02-12
MIT License
'''
import os
from collections import defaultdict
import hashlib
import sys
def get_hash(file_name):
BLOCK_SIZE =... | Replace older dups management script | Replace older dups management script | Python | mit | daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various | Replace older dups management script | '''
Compare File Contents and remove duplicate files
get sha256 hash for each file found
use dictionary to check for duplicates
delete duplicates
Dave Cuthbert
(C) 2021-02-12
MIT License
'''
import os
from collections import defaultdict
import hashlib
import sys
def get_hash(file_name):
BLOCK_SIZE =... | <commit_before><commit_msg>Replace older dups management script<commit_after> | '''
Compare File Contents and remove duplicate files
get sha256 hash for each file found
use dictionary to check for duplicates
delete duplicates
Dave Cuthbert
(C) 2021-02-12
MIT License
'''
import os
from collections import defaultdict
import hashlib
import sys
def get_hash(file_name):
BLOCK_SIZE =... | Replace older dups management script'''
Compare File Contents and remove duplicate files
get sha256 hash for each file found
use dictionary to check for duplicates
delete duplicates
Dave Cuthbert
(C) 2021-02-12
MIT License
'''
import os
from collections import defaultdict
import hashlib
import sys
def g... | <commit_before><commit_msg>Replace older dups management script<commit_after>'''
Compare File Contents and remove duplicate files
get sha256 hash for each file found
use dictionary to check for duplicates
delete duplicates
Dave Cuthbert
(C) 2021-02-12
MIT License
'''
import os
from collections import def... | |
81248594a64d59236c0ab369fb1d5d7eee073568 | tests/test_coefficient.py | tests/test_coefficient.py | # -*- coding: utf-8 -*-
from nose.tools import assert_equal
from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import *
from openfisca_core.periods import *
from openfisca_france import FranceTaxBenefitSystem
def test_coefficient_proratisation_only_contract_pe... | Add failing test for coefficient_proratisation | Add failing test for coefficient_proratisation
| Python | agpl-3.0 | antoinearnoud/openfisca-france,antoinearnoud/openfisca-france,sgmap/openfisca-france,sgmap/openfisca-france | Add failing test for coefficient_proratisation | # -*- coding: utf-8 -*-
from nose.tools import assert_equal
from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import *
from openfisca_core.periods import *
from openfisca_france import FranceTaxBenefitSystem
def test_coefficient_proratisation_only_contract_pe... | <commit_before><commit_msg>Add failing test for coefficient_proratisation<commit_after> | # -*- coding: utf-8 -*-
from nose.tools import assert_equal
from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import *
from openfisca_core.periods import *
from openfisca_france import FranceTaxBenefitSystem
def test_coefficient_proratisation_only_contract_pe... | Add failing test for coefficient_proratisation# -*- coding: utf-8 -*-
from nose.tools import assert_equal
from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import *
from openfisca_core.periods import *
from openfisca_france import FranceTaxBenefitSystem
def t... | <commit_before><commit_msg>Add failing test for coefficient_proratisation<commit_after># -*- coding: utf-8 -*-
from nose.tools import assert_equal
from openfisca_france.model.prelevements_obligatoires.prelevements_sociaux.cotisations_sociales.allegements import *
from openfisca_core.periods import *
from openfisca_fr... | |
608976fb5663adc5cbfa3ebc9af00171e3042a98 | monkey/cpu_profile.py | monkey/cpu_profile.py | from com.android.monkeyrunner import MonkeyRunner as mkr
from com.android.monkeyrunner import MonkeyDevice as mkd
import os, sys
sys.path.append(os.getcwd())
import common
# String Constants
cpucfg_pkg = 'br.ufpe.emilianofirmino.cpunuke'
cpustress_pkg = 'br.ufpe.emilianofirmino.cpujudge'
def config_cpu(device, core... | Add monkeyrunner script of cpu energy usage | Add monkeyrunner script of cpu energy usage
Signed-off-by: Emiliano Firmino <05e638a1dec5cbdb4665208eae603124467a154b@gmail.com>
| Python | mit | Miliox/droid_emc2,Miliox/droid_emc2,Miliox/droid_emc2,Miliox/droid_emc2,Miliox/droid_emc2 | Add monkeyrunner script of cpu energy usage
Signed-off-by: Emiliano Firmino <05e638a1dec5cbdb4665208eae603124467a154b@gmail.com> | from com.android.monkeyrunner import MonkeyRunner as mkr
from com.android.monkeyrunner import MonkeyDevice as mkd
import os, sys
sys.path.append(os.getcwd())
import common
# String Constants
cpucfg_pkg = 'br.ufpe.emilianofirmino.cpunuke'
cpustress_pkg = 'br.ufpe.emilianofirmino.cpujudge'
def config_cpu(device, core... | <commit_before><commit_msg>Add monkeyrunner script of cpu energy usage
Signed-off-by: Emiliano Firmino <05e638a1dec5cbdb4665208eae603124467a154b@gmail.com><commit_after> | from com.android.monkeyrunner import MonkeyRunner as mkr
from com.android.monkeyrunner import MonkeyDevice as mkd
import os, sys
sys.path.append(os.getcwd())
import common
# String Constants
cpucfg_pkg = 'br.ufpe.emilianofirmino.cpunuke'
cpustress_pkg = 'br.ufpe.emilianofirmino.cpujudge'
def config_cpu(device, core... | Add monkeyrunner script of cpu energy usage
Signed-off-by: Emiliano Firmino <05e638a1dec5cbdb4665208eae603124467a154b@gmail.com>from com.android.monkeyrunner import MonkeyRunner as mkr
from com.android.monkeyrunner import MonkeyDevice as mkd
import os, sys
sys.path.append(os.getcwd())
import common
# String Constan... | <commit_before><commit_msg>Add monkeyrunner script of cpu energy usage
Signed-off-by: Emiliano Firmino <05e638a1dec5cbdb4665208eae603124467a154b@gmail.com><commit_after>from com.android.monkeyrunner import MonkeyRunner as mkr
from com.android.monkeyrunner import MonkeyDevice as mkd
import os, sys
sys.path.append(os.g... | |
5ef9ea4fe0c90fad89d5ab772f42c48fd702860c | portal/migrations/versions/91351a73e6e2_.py | portal/migrations/versions/91351a73e6e2_.py | from alembic import op
import sqlalchemy as sa
"""empty message
Revision ID: 91351a73e6e2
Revises: 63262fe95b9c
Create Date: 2018-03-08 15:34:22.391417
"""
# revision identifiers, used by Alembic.
revision = '91351a73e6e2'
down_revision = '63262fe95b9c'
def upgrade():
# ### commands auto generated by Alembic... | Add bitmask for subscribed events to intervention table. | Add bitmask for subscribed events to intervention table.
| Python | bsd-3-clause | uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal | Add bitmask for subscribed events to intervention table. | from alembic import op
import sqlalchemy as sa
"""empty message
Revision ID: 91351a73e6e2
Revises: 63262fe95b9c
Create Date: 2018-03-08 15:34:22.391417
"""
# revision identifiers, used by Alembic.
revision = '91351a73e6e2'
down_revision = '63262fe95b9c'
def upgrade():
# ### commands auto generated by Alembic... | <commit_before><commit_msg>Add bitmask for subscribed events to intervention table.<commit_after> | from alembic import op
import sqlalchemy as sa
"""empty message
Revision ID: 91351a73e6e2
Revises: 63262fe95b9c
Create Date: 2018-03-08 15:34:22.391417
"""
# revision identifiers, used by Alembic.
revision = '91351a73e6e2'
down_revision = '63262fe95b9c'
def upgrade():
# ### commands auto generated by Alembic... | Add bitmask for subscribed events to intervention table.from alembic import op
import sqlalchemy as sa
"""empty message
Revision ID: 91351a73e6e2
Revises: 63262fe95b9c
Create Date: 2018-03-08 15:34:22.391417
"""
# revision identifiers, used by Alembic.
revision = '91351a73e6e2'
down_revision = '63262fe95b9c'
def... | <commit_before><commit_msg>Add bitmask for subscribed events to intervention table.<commit_after>from alembic import op
import sqlalchemy as sa
"""empty message
Revision ID: 91351a73e6e2
Revises: 63262fe95b9c
Create Date: 2018-03-08 15:34:22.391417
"""
# revision identifiers, used by Alembic.
revision = '91351a73e... | |
303152ec2828fe6c709ec17d21910a9b3a369004 | share/migrations/0034_auto_20160830_2102.py | share/migrations/0034_auto_20160830_2102.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-30 21:02
from __future__ import unicode_literals
from django.db import migrations
import share.models.fields
class Migration(migrations.Migration):
dependencies = [
('share', '0033_auto_20160829_1707'),
]
operations = [
migr... | Add migration for Link.url type change | Add migration for Link.url type change
| Python | apache-2.0 | laurenbarker/SHARE,zamattiac/SHARE,CenterForOpenScience/SHARE,laurenbarker/SHARE,laurenbarker/SHARE,aaxelb/SHARE,CenterForOpenScience/SHARE,zamattiac/SHARE,aaxelb/SHARE,zamattiac/SHARE,aaxelb/SHARE,CenterForOpenScience/SHARE | Add migration for Link.url type change | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-30 21:02
from __future__ import unicode_literals
from django.db import migrations
import share.models.fields
class Migration(migrations.Migration):
dependencies = [
('share', '0033_auto_20160829_1707'),
]
operations = [
migr... | <commit_before><commit_msg>Add migration for Link.url type change<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-30 21:02
from __future__ import unicode_literals
from django.db import migrations
import share.models.fields
class Migration(migrations.Migration):
dependencies = [
('share', '0033_auto_20160829_1707'),
]
operations = [
migr... | Add migration for Link.url type change# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-30 21:02
from __future__ import unicode_literals
from django.db import migrations
import share.models.fields
class Migration(migrations.Migration):
dependencies = [
('share', '0033_auto_20160829_1707'),
... | <commit_before><commit_msg>Add migration for Link.url type change<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-30 21:02
from __future__ import unicode_literals
from django.db import migrations
import share.models.fields
class Migration(migrations.Migration):
dependencies = [
... | |
b758d6b1c445093a261e0f2be175181fa57109e4 | math/basic/Greatest_digit_in_number/Greatest_digit_in_number.py | math/basic/Greatest_digit_in_number/Greatest_digit_in_number.py | number = 201328361572
maxDigit = -1
# convert number into unique set of digits and iterate over it
for c in set(str(number)):
# parse back to int and compare vs known max
i = int(c)
if i > maxDigit:
maxDigit = i
print(maxDigit)
# > 8
| Add greatest digit in number with python in math | Add greatest digit in number with python in math
| Python | cc0-1.0 | Deepak345/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms,Deepak345/al-go-rithms,Deepak345/al-go-rithms,Deepak345/al-go-rithms,manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,Cnidarias/al-go-rithms,Cnidarias/al-go-rithms,ZoranPandovski/al-go-... | Add greatest digit in number with python in math | number = 201328361572
maxDigit = -1
# convert number into unique set of digits and iterate over it
for c in set(str(number)):
# parse back to int and compare vs known max
i = int(c)
if i > maxDigit:
maxDigit = i
print(maxDigit)
# > 8
| <commit_before><commit_msg>Add greatest digit in number with python in math<commit_after> | number = 201328361572
maxDigit = -1
# convert number into unique set of digits and iterate over it
for c in set(str(number)):
# parse back to int and compare vs known max
i = int(c)
if i > maxDigit:
maxDigit = i
print(maxDigit)
# > 8
| Add greatest digit in number with python in mathnumber = 201328361572
maxDigit = -1
# convert number into unique set of digits and iterate over it
for c in set(str(number)):
# parse back to int and compare vs known max
i = int(c)
if i > maxDigit:
maxDigit = i
print(maxDigit)
# > 8
| <commit_before><commit_msg>Add greatest digit in number with python in math<commit_after>number = 201328361572
maxDigit = -1
# convert number into unique set of digits and iterate over it
for c in set(str(number)):
# parse back to int and compare vs known max
i = int(c)
if i > maxDigit:
maxDigit = ... | |
12bc92863076c594422f327efc1ba23a321b05a7 | plotly/tests/test_optional/test_matplotlylib/test_date_times.py | plotly/tests/test_optional/test_matplotlylib/test_date_times.py | from __future__ import absolute_import
import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import datetime
from matplotlib.dates import date2num
import plotly.tools as tls
from unittest import TestCase
from plotly.tests.test_optional.optional_util... | Add test for dates in mpl. | Add test for dates in mpl.
| Python | mit | plotly/plotly.py,ee-in/python-api,plotly/python-api,plotly/python-api,plotly/python-api,ee-in/python-api,plotly/plotly.py,plotly/plotly.py,ee-in/python-api | Add test for dates in mpl. | from __future__ import absolute_import
import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import datetime
from matplotlib.dates import date2num
import plotly.tools as tls
from unittest import TestCase
from plotly.tests.test_optional.optional_util... | <commit_before><commit_msg>Add test for dates in mpl.<commit_after> | from __future__ import absolute_import
import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import datetime
from matplotlib.dates import date2num
import plotly.tools as tls
from unittest import TestCase
from plotly.tests.test_optional.optional_util... | Add test for dates in mpl.from __future__ import absolute_import
import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import datetime
from matplotlib.dates import date2num
import plotly.tools as tls
from unittest import TestCase
from plotly.tests.t... | <commit_before><commit_msg>Add test for dates in mpl.<commit_after>from __future__ import absolute_import
import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import datetime
from matplotlib.dates import date2num
import plotly.tools as tls
from unit... | |
0224b1eeeb3db78f5445e413d3c5a3a8c3c4bc57 | tools/wf_generators/generate_parallel_wf.py | tools/wf_generators/generate_parallel_wf.py | #!/usr/bin/env python
import sys
try:
wf_name = str(sys.argv[1])
branch_cnt = int(sys.argv[2])
branch_depth = int(sys.argv[3])
add_join = len(sys.argv) > 4
except:
raise ValueError(
'Usage: <script_name> workflow_name'
' number_of_parallel_branches branch_depth add_join'
)
... | Add a script that generates a test workflow with needed paralellism | Add a script that generates a test workflow with needed paralellism
Change-Id: I6b1087f95b88a881e074a0af4f6f8be6d9413bc7
| Python | apache-2.0 | openstack/mistral,openstack/mistral | Add a script that generates a test workflow with needed paralellism
Change-Id: I6b1087f95b88a881e074a0af4f6f8be6d9413bc7 | #!/usr/bin/env python
import sys
try:
wf_name = str(sys.argv[1])
branch_cnt = int(sys.argv[2])
branch_depth = int(sys.argv[3])
add_join = len(sys.argv) > 4
except:
raise ValueError(
'Usage: <script_name> workflow_name'
' number_of_parallel_branches branch_depth add_join'
)
... | <commit_before><commit_msg>Add a script that generates a test workflow with needed paralellism
Change-Id: I6b1087f95b88a881e074a0af4f6f8be6d9413bc7<commit_after> | #!/usr/bin/env python
import sys
try:
wf_name = str(sys.argv[1])
branch_cnt = int(sys.argv[2])
branch_depth = int(sys.argv[3])
add_join = len(sys.argv) > 4
except:
raise ValueError(
'Usage: <script_name> workflow_name'
' number_of_parallel_branches branch_depth add_join'
)
... | Add a script that generates a test workflow with needed paralellism
Change-Id: I6b1087f95b88a881e074a0af4f6f8be6d9413bc7#!/usr/bin/env python
import sys
try:
wf_name = str(sys.argv[1])
branch_cnt = int(sys.argv[2])
branch_depth = int(sys.argv[3])
add_join = len(sys.argv) > 4
except:
raise Value... | <commit_before><commit_msg>Add a script that generates a test workflow with needed paralellism
Change-Id: I6b1087f95b88a881e074a0af4f6f8be6d9413bc7<commit_after>#!/usr/bin/env python
import sys
try:
wf_name = str(sys.argv[1])
branch_cnt = int(sys.argv[2])
branch_depth = int(sys.argv[3])
add_join = ... | |
65ca8f29f8e24307fb90c26a319f30f5b5ca4bee | scripts/check_run_dir_file_read.py | scripts/check_run_dir_file_read.py | import argparse
import sys
from os import listdir
from os.path import join
from pymagicc.io import read_cfg_file, MAGICCData
def print_summary(cannot_read, ignored, dir_to_check):
if cannot_read:
print(
"Can't read the following files in {}:\n{}".format(
dir_to_check, "\n".jo... | Add check run dir file read in script | Add check run dir file read in script
| Python | agpl-3.0 | openclimatedata/pymagicc,openclimatedata/pymagicc | Add check run dir file read in script | import argparse
import sys
from os import listdir
from os.path import join
from pymagicc.io import read_cfg_file, MAGICCData
def print_summary(cannot_read, ignored, dir_to_check):
if cannot_read:
print(
"Can't read the following files in {}:\n{}".format(
dir_to_check, "\n".jo... | <commit_before><commit_msg>Add check run dir file read in script<commit_after> | import argparse
import sys
from os import listdir
from os.path import join
from pymagicc.io import read_cfg_file, MAGICCData
def print_summary(cannot_read, ignored, dir_to_check):
if cannot_read:
print(
"Can't read the following files in {}:\n{}".format(
dir_to_check, "\n".jo... | Add check run dir file read in scriptimport argparse
import sys
from os import listdir
from os.path import join
from pymagicc.io import read_cfg_file, MAGICCData
def print_summary(cannot_read, ignored, dir_to_check):
if cannot_read:
print(
"Can't read the following files in {}:\n{}".format(
... | <commit_before><commit_msg>Add check run dir file read in script<commit_after>import argparse
import sys
from os import listdir
from os.path import join
from pymagicc.io import read_cfg_file, MAGICCData
def print_summary(cannot_read, ignored, dir_to_check):
if cannot_read:
print(
"Can't read... | |
5f1fc4687e463632049ea889a8fc566839201a8a | crawler/migrations/0002_auto_20160826_1216.py | crawler/migrations/0002_auto_20160826_1216.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-26 12:16
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('crawler', '0001_initial'),
]
operations = [
migrations.RenameModel(
old_... | Add missing migration - that created bug, where table had wrong name | Add missing migration - that created bug, where table had wrong name
| Python | mit | lucasgr7/silverplate,lucasgr7/silverplate,lucasgr7/silverplate | Add missing migration - that created bug, where table had wrong name | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-26 12:16
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('crawler', '0001_initial'),
]
operations = [
migrations.RenameModel(
old_... | <commit_before><commit_msg>Add missing migration - that created bug, where table had wrong name<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-26 12:16
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('crawler', '0001_initial'),
]
operations = [
migrations.RenameModel(
old_... | Add missing migration - that created bug, where table had wrong name# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-26 12:16
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('crawler', '0001_initial'),
]
... | <commit_before><commit_msg>Add missing migration - that created bug, where table had wrong name<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-26 12:16
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
... | |
7bd2df1ebfa02603a660c75cc13adcd35a326b68 | ALE/print_pa_table.py | ALE/print_pa_table.py | #for a directory of FASTA gene family files, compute a gene presence-absence (or Count-type) table
from __future__ import print_function
import os, re
to_check = [file for file in os.listdir("fasta/") if file.endswith(".fa")]
#first obtain a complete list of the species. This is an appalling inefficient "algorithm"
sp... | Print a presence/absence table from a directory of FASTA-formatted sequence files | Print a presence/absence table from a directory of FASTA-formatted sequence files
| Python | mit | Tancata/phylo,Tancata/phylo | Print a presence/absence table from a directory of FASTA-formatted sequence files | #for a directory of FASTA gene family files, compute a gene presence-absence (or Count-type) table
from __future__ import print_function
import os, re
to_check = [file for file in os.listdir("fasta/") if file.endswith(".fa")]
#first obtain a complete list of the species. This is an appalling inefficient "algorithm"
sp... | <commit_before><commit_msg>Print a presence/absence table from a directory of FASTA-formatted sequence files<commit_after> | #for a directory of FASTA gene family files, compute a gene presence-absence (or Count-type) table
from __future__ import print_function
import os, re
to_check = [file for file in os.listdir("fasta/") if file.endswith(".fa")]
#first obtain a complete list of the species. This is an appalling inefficient "algorithm"
sp... | Print a presence/absence table from a directory of FASTA-formatted sequence files#for a directory of FASTA gene family files, compute a gene presence-absence (or Count-type) table
from __future__ import print_function
import os, re
to_check = [file for file in os.listdir("fasta/") if file.endswith(".fa")]
#first obtai... | <commit_before><commit_msg>Print a presence/absence table from a directory of FASTA-formatted sequence files<commit_after>#for a directory of FASTA gene family files, compute a gene presence-absence (or Count-type) table
from __future__ import print_function
import os, re
to_check = [file for file in os.listdir("fasta... | |
bf11946afbac3a10b6a7ae502c81f7016c472719 | social_auth/fields.py | social_auth/fields.py | from django.core.exceptions import ValidationError
from django.db import models
from django.utils import simplejson
class JSONField(models.TextField):
"""Simple JSON field that stores python structures as JSON strings
on database.
"""
__metaclass__ = models.SubfieldBase
def to_python(self, value... | Store extra data in JSON format, also add method to extend extra values to store. Closes gh-30 | Store extra data in JSON format, also add method to extend extra values to store. Closes gh-30
| Python | bsd-3-clause | qas612820704/django-social-auth,sk7/django-social-auth,limdauto/django-social-auth,mayankcu/Django-social,thesealion/django-social-auth,qas612820704/django-social-auth,gustavoam/django-social-auth,getsentry/django-social-auth,lovehhf/django-social-auth,MjAbuz/django-social-auth,MjAbuz/django-social-auth,michael-borisov... | Store extra data in JSON format, also add method to extend extra values to store. Closes gh-30 | from django.core.exceptions import ValidationError
from django.db import models
from django.utils import simplejson
class JSONField(models.TextField):
"""Simple JSON field that stores python structures as JSON strings
on database.
"""
__metaclass__ = models.SubfieldBase
def to_python(self, value... | <commit_before><commit_msg>Store extra data in JSON format, also add method to extend extra values to store. Closes gh-30<commit_after> | from django.core.exceptions import ValidationError
from django.db import models
from django.utils import simplejson
class JSONField(models.TextField):
"""Simple JSON field that stores python structures as JSON strings
on database.
"""
__metaclass__ = models.SubfieldBase
def to_python(self, value... | Store extra data in JSON format, also add method to extend extra values to store. Closes gh-30from django.core.exceptions import ValidationError
from django.db import models
from django.utils import simplejson
class JSONField(models.TextField):
"""Simple JSON field that stores python structures as JSON strings
... | <commit_before><commit_msg>Store extra data in JSON format, also add method to extend extra values to store. Closes gh-30<commit_after>from django.core.exceptions import ValidationError
from django.db import models
from django.utils import simplejson
class JSONField(models.TextField):
"""Simple JSON field that st... | |
4c8216129ee655026e4c0e8c3781645017969614 | etc/wpt_result_analyzer.py | etc/wpt_result_analyzer.py | #!/usr/bin/env python
# Copyright 2019 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/l... | Add script to summarize WPT test directories with failing tests. | Add script to summarize WPT test directories with failing tests. | Python | mpl-2.0 | splav/servo,splav/servo,KiChjang/servo,DominoTree/servo,splav/servo,splav/servo,KiChjang/servo,DominoTree/servo,DominoTree/servo,DominoTree/servo,DominoTree/servo,splav/servo,DominoTree/servo,KiChjang/servo,KiChjang/servo,splav/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,DominoTree/servo,DominoTree/servo,DominoT... | Add script to summarize WPT test directories with failing tests. | #!/usr/bin/env python
# Copyright 2019 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/l... | <commit_before><commit_msg>Add script to summarize WPT test directories with failing tests.<commit_after> | #!/usr/bin/env python
# Copyright 2019 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/l... | Add script to summarize WPT test directories with failing tests.#!/usr/bin/env python
# Copyright 2019 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2... | <commit_before><commit_msg>Add script to summarize WPT test directories with failing tests.<commit_after>#!/usr/bin/env python
# Copyright 2019 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
#... | |
a48774d7279df4148df9dcfdedaefdd0689373ba | scripts/migrate_piwik_derived_nodes.py | scripts/migrate_piwik_derived_nodes.py | """
"""
import logging
import os
import sys
sys.path.insert(0, os.path.abspath(
os.path.join(os.path.dirname(__file__), os.pardir)
))
from modularodm.query.querydialect import DefaultQueryDialect as Q
from website.app import init_app
from website.models import Node
logger = logging.getLogger('root')
app = in... | Add migration script for nodes with incorrect piwik_site_id set. | Add migration script for nodes with incorrect piwik_site_id set.
| Python | apache-2.0 | haoyuchen1992/osf.io,GaryKriebel/osf.io,KAsante95/osf.io,SSJohns/osf.io,kwierman/osf.io,sbt9uc/osf.io,njantrania/osf.io,Johnetordoff/osf.io,chennan47/osf.io,HarryRybacki/osf.io,cslzchen/osf.io,caseyrygt/osf.io,bdyetton/prettychart,amyshi188/osf.io,wearpants/osf.io,Nesiehr/osf.io,caseyrollins/osf.io,jeffreyliu3230/osf.i... | Add migration script for nodes with incorrect piwik_site_id set. | """
"""
import logging
import os
import sys
sys.path.insert(0, os.path.abspath(
os.path.join(os.path.dirname(__file__), os.pardir)
))
from modularodm.query.querydialect import DefaultQueryDialect as Q
from website.app import init_app
from website.models import Node
logger = logging.getLogger('root')
app = in... | <commit_before><commit_msg>Add migration script for nodes with incorrect piwik_site_id set.<commit_after> | """
"""
import logging
import os
import sys
sys.path.insert(0, os.path.abspath(
os.path.join(os.path.dirname(__file__), os.pardir)
))
from modularodm.query.querydialect import DefaultQueryDialect as Q
from website.app import init_app
from website.models import Node
logger = logging.getLogger('root')
app = in... | Add migration script for nodes with incorrect piwik_site_id set."""
"""
import logging
import os
import sys
sys.path.insert(0, os.path.abspath(
os.path.join(os.path.dirname(__file__), os.pardir)
))
from modularodm.query.querydialect import DefaultQueryDialect as Q
from website.app import init_app
from website.m... | <commit_before><commit_msg>Add migration script for nodes with incorrect piwik_site_id set.<commit_after>"""
"""
import logging
import os
import sys
sys.path.insert(0, os.path.abspath(
os.path.join(os.path.dirname(__file__), os.pardir)
))
from modularodm.query.querydialect import DefaultQueryDialect as Q
from w... | |
6ee284adcc30213bc07153a16be475ec3e067d7e | rbtools/api/decode.py | rbtools/api/decode.py | import json
from rbtools.api.utils import parse_mimetype
DECODER_MAP = {}
def DefaultDecoder(payload):
"""Default decoder for API payloads.
The default decoder is used when a decoder is not found in the
DECODER_MAP. This is a last resort which should only be used when
something has gone wrong.
... | import json
from rbtools.api.utils import parse_mimetype
DECODER_MAP = {}
def DefaultDecoder(payload):
"""Default decoder for API payloads.
The default decoder is used when a decoder is not found in the
DECODER_MAP. This is a last resort which should only be used when
something has gone wrong.
... | Fix decoding of empty responses. | Fix decoding of empty responses.
When an empty response was given by the web server, we were
decoding to '{}', which is problematic when you are expecting
an empty response for things like empty text/plain files. This
fixes the problematic assumption we were making.
Reviewed at http://reviews.reviewboard.org/r/3680/
| Python | mit | davidt/rbtools,datjwu/rbtools,halvorlu/rbtools,beol/rbtools,reviewboard/rbtools,datjwu/rbtools,reviewboard/rbtools,halvorlu/rbtools,davidt/rbtools,datjwu/rbtools,davidt/rbtools,1tush/rbtools,beol/rbtools,haosdent/rbtools,beol/rbtools,haosdent/rbtools,reviewboard/rbtools,haosdent/rbtools,halvorlu/rbtools | import json
from rbtools.api.utils import parse_mimetype
DECODER_MAP = {}
def DefaultDecoder(payload):
"""Default decoder for API payloads.
The default decoder is used when a decoder is not found in the
DECODER_MAP. This is a last resort which should only be used when
something has gone wrong.
... | import json
from rbtools.api.utils import parse_mimetype
DECODER_MAP = {}
def DefaultDecoder(payload):
"""Default decoder for API payloads.
The default decoder is used when a decoder is not found in the
DECODER_MAP. This is a last resort which should only be used when
something has gone wrong.
... | <commit_before>import json
from rbtools.api.utils import parse_mimetype
DECODER_MAP = {}
def DefaultDecoder(payload):
"""Default decoder for API payloads.
The default decoder is used when a decoder is not found in the
DECODER_MAP. This is a last resort which should only be used when
something has ... | import json
from rbtools.api.utils import parse_mimetype
DECODER_MAP = {}
def DefaultDecoder(payload):
"""Default decoder for API payloads.
The default decoder is used when a decoder is not found in the
DECODER_MAP. This is a last resort which should only be used when
something has gone wrong.
... | import json
from rbtools.api.utils import parse_mimetype
DECODER_MAP = {}
def DefaultDecoder(payload):
"""Default decoder for API payloads.
The default decoder is used when a decoder is not found in the
DECODER_MAP. This is a last resort which should only be used when
something has gone wrong.
... | <commit_before>import json
from rbtools.api.utils import parse_mimetype
DECODER_MAP = {}
def DefaultDecoder(payload):
"""Default decoder for API payloads.
The default decoder is used when a decoder is not found in the
DECODER_MAP. This is a last resort which should only be used when
something has ... |
b58c85e5105b06ecb5d8598105b4c999287a5a62 | demo/searchJustLtr.py | demo/searchJustLtr.py | from features import formatFeature
baseQuery = {
"query": {
"ltr": {
"model": {
"stored": "" # Model name
},
"features": []# features]
}
}
}
def featureQueries(keywords):
try:
ftrId = 1
while True:
... | Add a script for Search w/ just LTR | Add a script for Search w/ just LTR
| Python | apache-2.0 | o19s/elasticsearch-learning-to-rank,o19s/elasticsearch-learning-to-rank | Add a script for Search w/ just LTR | from features import formatFeature
baseQuery = {
"query": {
"ltr": {
"model": {
"stored": "" # Model name
},
"features": []# features]
}
}
}
def featureQueries(keywords):
try:
ftrId = 1
while True:
... | <commit_before><commit_msg>Add a script for Search w/ just LTR<commit_after> | from features import formatFeature
baseQuery = {
"query": {
"ltr": {
"model": {
"stored": "" # Model name
},
"features": []# features]
}
}
}
def featureQueries(keywords):
try:
ftrId = 1
while True:
... | Add a script for Search w/ just LTRfrom features import formatFeature
baseQuery = {
"query": {
"ltr": {
"model": {
"stored": "" # Model name
},
"features": []# features]
}
}
}
def featureQueries(keywords):
try:
ftrId =... | <commit_before><commit_msg>Add a script for Search w/ just LTR<commit_after>from features import formatFeature
baseQuery = {
"query": {
"ltr": {
"model": {
"stored": "" # Model name
},
"features": []# features]
}
}
}
def featureQu... | |
e5124e51ac716cf47af89fca957acc5623470e45 | 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 = ['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... | Revert "Remove non-existing field from WeightBasedForm" | Revert "Remove non-existing field from WeightBasedForm"
This reverts commit af712fedf4963d66f56f5ab9054318c493572ab1.
| Python | bsd-3-clause | anentropic/django-oscar,okfish/django-oscar,solarissmoke/django-oscar,sonofatailor/django-oscar,django-oscar/django-oscar,django-oscar/django-oscar,john-parton/django-oscar,sasha0/django-oscar,john-parton/django-oscar,okfish/django-oscar,anentropic/django-oscar,sonofatailor/django-oscar,anentropic/django-oscar,solariss... | 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 = ['description', 'default_weight', 'countries']
class WeightBandForm(forms.ModelForm):
def __init__(sel... | 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 = ['description', 'default_weight', 'countries']
class WeightBandForm(forms.ModelForm):
def __init__(sel... |
999481b2c49440f428205a161a2c4ccf5580167e | IPython/core/tests/test_debugger.py | IPython/core/tests/test_debugger.py | """Tests for debugging machinery.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012, The IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----... | Add simple test for modified repr as per review. | Add simple test for modified repr as per review.
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | Add simple test for modified repr as per review. | """Tests for debugging machinery.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012, The IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----... | <commit_before><commit_msg>Add simple test for modified repr as per review.<commit_after> | """Tests for debugging machinery.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012, The IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----... | Add simple test for modified repr as per review."""Tests for debugging machinery.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012, The IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COP... | <commit_before><commit_msg>Add simple test for modified repr as per review.<commit_after>"""Tests for debugging machinery.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012, The IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.... | |
a3eb4602aa5ec87e6f78477c4789ed2fbde1cf93 | stevedore/__init__.py | stevedore/__init__.py | # flake8: noqa
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .driver import DriverManager
import logging
# Configure a NullHandler for our log messages in case
# the app we're used from does not set up ... | # flake8: noqa
__all__ = [
'ExtensionManager',
'EnabledExtensionManager',
'NamedExtensionManager',
'HookManager',
'DriverManager',
]
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .dri... | Update null log handling for py26 | Update null log handling for py26
Python 2.6 does not have a NullHandler in the logging
module, so introduce a little class that does the same
work.
Also add __all__ to the package init so extra names are
not exported.
Resolves issue #2
Change-Id: Id59d394cd02372e2c31de336894f06653cb1e22d
| Python | apache-2.0 | mandeepdhami/stevedore,nelsnelson/stevedore,nelsnelson/stevedore,openstack/stevedore,varunarya10/stevedore,JioCloud/stevedore,JioCloud/stevedore,citrix-openstack-build/stevedore,mandeepdhami/stevedore,citrix-openstack-build/stevedore,varunarya10/stevedore | # flake8: noqa
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .driver import DriverManager
import logging
# Configure a NullHandler for our log messages in case
# the app we're used from does not set up ... | # flake8: noqa
__all__ = [
'ExtensionManager',
'EnabledExtensionManager',
'NamedExtensionManager',
'HookManager',
'DriverManager',
]
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .dri... | <commit_before># flake8: noqa
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .driver import DriverManager
import logging
# Configure a NullHandler for our log messages in case
# the app we're used from d... | # flake8: noqa
__all__ = [
'ExtensionManager',
'EnabledExtensionManager',
'NamedExtensionManager',
'HookManager',
'DriverManager',
]
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .dri... | # flake8: noqa
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .driver import DriverManager
import logging
# Configure a NullHandler for our log messages in case
# the app we're used from does not set up ... | <commit_before># flake8: noqa
from .extension import ExtensionManager
from .enabled import EnabledExtensionManager
from .named import NamedExtensionManager
from .hook import HookManager
from .driver import DriverManager
import logging
# Configure a NullHandler for our log messages in case
# the app we're used from d... |
78b058759eac8239e8b8b377a365cefabcf5c21a | algorithm/dynamic_connectivity/unionfind.py | algorithm/dynamic_connectivity/unionfind.py | #-*- coding:utf-8 -*-
class QuickFind(object):
def __init__(self,objnum):
self.id=[i for i in range(0,objnum)]
def union(self,p,q):
qid=self.id[q]
pid=self.id[p]
j=0
for v in self.id:
if pid==v:
self.id[j]=qid
j=j+1
def connected(self,q,p):
return self.id[q]==self.id[p]
class QuickUnion(objec... | Add QuickUnion algorithm(a better algorithm) | Add QuickUnion algorithm(a better algorithm)
| Python | apache-2.0 | free-free/algorithm,free-free/algorithm | Add QuickUnion algorithm(a better algorithm) | #-*- coding:utf-8 -*-
class QuickFind(object):
def __init__(self,objnum):
self.id=[i for i in range(0,objnum)]
def union(self,p,q):
qid=self.id[q]
pid=self.id[p]
j=0
for v in self.id:
if pid==v:
self.id[j]=qid
j=j+1
def connected(self,q,p):
return self.id[q]==self.id[p]
class QuickUnion(objec... | <commit_before><commit_msg>Add QuickUnion algorithm(a better algorithm)<commit_after> | #-*- coding:utf-8 -*-
class QuickFind(object):
def __init__(self,objnum):
self.id=[i for i in range(0,objnum)]
def union(self,p,q):
qid=self.id[q]
pid=self.id[p]
j=0
for v in self.id:
if pid==v:
self.id[j]=qid
j=j+1
def connected(self,q,p):
return self.id[q]==self.id[p]
class QuickUnion(objec... | Add QuickUnion algorithm(a better algorithm)#-*- coding:utf-8 -*-
class QuickFind(object):
def __init__(self,objnum):
self.id=[i for i in range(0,objnum)]
def union(self,p,q):
qid=self.id[q]
pid=self.id[p]
j=0
for v in self.id:
if pid==v:
self.id[j]=qid
j=j+1
def connected(self,q,p):
return s... | <commit_before><commit_msg>Add QuickUnion algorithm(a better algorithm)<commit_after>#-*- coding:utf-8 -*-
class QuickFind(object):
def __init__(self,objnum):
self.id=[i for i in range(0,objnum)]
def union(self,p,q):
qid=self.id[q]
pid=self.id[p]
j=0
for v in self.id:
if pid==v:
self.id[j]=qid
j... | |
4d2a513794ab61c1a6264807daaac9946cfebd25 | article/migrations/0012_alter_content_field_to_have_verbose_name.py | article/migrations/0012_alter_content_field_to_have_verbose_name.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import wagtail.wagtailcore.fields
class Migration(migrations.Migration):
dependencies = [
('article', '0011_alter_content_and_modular_content_fields'),
]
operations = [
migrations.Al... | Add migration for article content field verbose name introduction | Add migration for article content field verbose name introduction
| Python | bsd-3-clause | PARINetwork/pari,PARINetwork/pari,PARINetwork/pari,PARINetwork/pari | Add migration for article content field verbose name introduction | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import wagtail.wagtailcore.fields
class Migration(migrations.Migration):
dependencies = [
('article', '0011_alter_content_and_modular_content_fields'),
]
operations = [
migrations.Al... | <commit_before><commit_msg>Add migration for article content field verbose name introduction<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import wagtail.wagtailcore.fields
class Migration(migrations.Migration):
dependencies = [
('article', '0011_alter_content_and_modular_content_fields'),
]
operations = [
migrations.Al... | Add migration for article content field verbose name introduction# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import wagtail.wagtailcore.fields
class Migration(migrations.Migration):
dependencies = [
('article', '0011_alter_content_and_modular_... | <commit_before><commit_msg>Add migration for article content field verbose name introduction<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import wagtail.wagtailcore.fields
class Migration(migrations.Migration):
dependencies = [
('a... | |
31e812c2abd7f7e8fd26dc36a87ce17c1ec75f86 | examples/single_frame_datalogger.py | examples/single_frame_datalogger.py | from pymoku import Moku, MokuException, NoDataException
from pymoku.instruments import *
import time, logging, traceback
logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s')
logging.getLogger('pymoku').setLevel(logging.DEBUG)
# Use Moku.get_by_serial() or get_by_name() if you don't know the I... | Add a simple single-frame data acquisition example | Examples: Add a simple single-frame data acquisition example
| Python | mit | liquidinstruments/pymoku,benizl/pymoku | Examples: Add a simple single-frame data acquisition example | from pymoku import Moku, MokuException, NoDataException
from pymoku.instruments import *
import time, logging, traceback
logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s')
logging.getLogger('pymoku').setLevel(logging.DEBUG)
# Use Moku.get_by_serial() or get_by_name() if you don't know the I... | <commit_before><commit_msg>Examples: Add a simple single-frame data acquisition example<commit_after> | from pymoku import Moku, MokuException, NoDataException
from pymoku.instruments import *
import time, logging, traceback
logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s')
logging.getLogger('pymoku').setLevel(logging.DEBUG)
# Use Moku.get_by_serial() or get_by_name() if you don't know the I... | Examples: Add a simple single-frame data acquisition examplefrom pymoku import Moku, MokuException, NoDataException
from pymoku.instruments import *
import time, logging, traceback
logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s')
logging.getLogger('pymoku').setLevel(logging.DEBUG)
# Use M... | <commit_before><commit_msg>Examples: Add a simple single-frame data acquisition example<commit_after>from pymoku import Moku, MokuException, NoDataException
from pymoku.instruments import *
import time, logging, traceback
logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s')
logging.getLogger('... | |
0c6930f1930dbba66ba928dab4ed195e6b6bf2cc | addons/crm/__terp__.py | addons/crm/__terp__.py | {
"name" : "Customer & Supplier Relationship Management",
"version" : "1.0",
"author" : "Tiny",
"website" : "http://tinyerp.com/module_crm.html",
"category" : "Generic Modules/CRM & SRM",
"description": """The Tiny ERP case and request tracker enables a group of
people to intelligently and efficiently manage task... | {
"name" : "Customer & Supplier Relationship Management",
"version" : "1.0",
"author" : "Tiny",
"website" : "http://tinyerp.com/module_crm.html",
"category" : "Generic Modules/CRM & SRM",
"description": """The Tiny ERP case and request tracker enables a group of
people to intelligently and efficiently manage task... | Add crm_security.xml file entry in update_xml section | Add crm_security.xml file entry in update_xml section
bzr revid: mga@tinyerp.com-80638551c5a66adf0a49181f6ff6ae283ced3709 | Python | agpl-3.0 | rahuldhote/odoo,CopeX/odoo,CopeX/odoo,JonathanStein/odoo,colinnewell/odoo,Codefans-fan/odoo,mustafat/odoo-1,shivam1111/odoo,CubicERP/odoo,andreparames/odoo,gdgellatly/OCB1,PongPi/isl-odoo,Nick-OpusVL/odoo,damdam-s/OpenUpgrade,ecosoft-odoo/odoo,andreparames/odoo,grap/OCB,NL66278/OCB,Daniel-CA/odoo,OpusVL/odoo,luistorres... | {
"name" : "Customer & Supplier Relationship Management",
"version" : "1.0",
"author" : "Tiny",
"website" : "http://tinyerp.com/module_crm.html",
"category" : "Generic Modules/CRM & SRM",
"description": """The Tiny ERP case and request tracker enables a group of
people to intelligently and efficiently manage task... | {
"name" : "Customer & Supplier Relationship Management",
"version" : "1.0",
"author" : "Tiny",
"website" : "http://tinyerp.com/module_crm.html",
"category" : "Generic Modules/CRM & SRM",
"description": """The Tiny ERP case and request tracker enables a group of
people to intelligently and efficiently manage task... | <commit_before>{
"name" : "Customer & Supplier Relationship Management",
"version" : "1.0",
"author" : "Tiny",
"website" : "http://tinyerp.com/module_crm.html",
"category" : "Generic Modules/CRM & SRM",
"description": """The Tiny ERP case and request tracker enables a group of
people to intelligently and efficien... | {
"name" : "Customer & Supplier Relationship Management",
"version" : "1.0",
"author" : "Tiny",
"website" : "http://tinyerp.com/module_crm.html",
"category" : "Generic Modules/CRM & SRM",
"description": """The Tiny ERP case and request tracker enables a group of
people to intelligently and efficiently manage task... | {
"name" : "Customer & Supplier Relationship Management",
"version" : "1.0",
"author" : "Tiny",
"website" : "http://tinyerp.com/module_crm.html",
"category" : "Generic Modules/CRM & SRM",
"description": """The Tiny ERP case and request tracker enables a group of
people to intelligently and efficiently manage task... | <commit_before>{
"name" : "Customer & Supplier Relationship Management",
"version" : "1.0",
"author" : "Tiny",
"website" : "http://tinyerp.com/module_crm.html",
"category" : "Generic Modules/CRM & SRM",
"description": """The Tiny ERP case and request tracker enables a group of
people to intelligently and efficien... |
1636e4755d9e0a58b4626750d82102152641068c | projects/DensePose/tests/test_structures.py | projects/DensePose/tests/test_structures.py | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import unittest
from densepose.structures import normalized_coords_transform
class TestStructures(unittest.TestCase):
def test_normalized_coords_transform(self):
bbox = (32, 24, 288, 216)
x0, y0, w, h = bbox
xmin, ym... | Add target for unit tests + basic test | Add target for unit tests + basic test
Summary: Add target for unit tests + basic test
Reviewed By: vkhalidov
Differential Revision: D20429230
fbshipit-source-id: 36bee00d2dd57a350e2a6f3dd58a87f0c9c8227e
| Python | apache-2.0 | facebookresearch/detectron2,facebookresearch/detectron2,facebookresearch/detectron2 | Add target for unit tests + basic test
Summary: Add target for unit tests + basic test
Reviewed By: vkhalidov
Differential Revision: D20429230
fbshipit-source-id: 36bee00d2dd57a350e2a6f3dd58a87f0c9c8227e | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import unittest
from densepose.structures import normalized_coords_transform
class TestStructures(unittest.TestCase):
def test_normalized_coords_transform(self):
bbox = (32, 24, 288, 216)
x0, y0, w, h = bbox
xmin, ym... | <commit_before><commit_msg>Add target for unit tests + basic test
Summary: Add target for unit tests + basic test
Reviewed By: vkhalidov
Differential Revision: D20429230
fbshipit-source-id: 36bee00d2dd57a350e2a6f3dd58a87f0c9c8227e<commit_after> | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import unittest
from densepose.structures import normalized_coords_transform
class TestStructures(unittest.TestCase):
def test_normalized_coords_transform(self):
bbox = (32, 24, 288, 216)
x0, y0, w, h = bbox
xmin, ym... | Add target for unit tests + basic test
Summary: Add target for unit tests + basic test
Reviewed By: vkhalidov
Differential Revision: D20429230
fbshipit-source-id: 36bee00d2dd57a350e2a6f3dd58a87f0c9c8227e# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import unittest
from densepose.structur... | <commit_before><commit_msg>Add target for unit tests + basic test
Summary: Add target for unit tests + basic test
Reviewed By: vkhalidov
Differential Revision: D20429230
fbshipit-source-id: 36bee00d2dd57a350e2a6f3dd58a87f0c9c8227e<commit_after># Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
... | |
b2eb9b8ec3223a359b9c44d5880022d1b48b11f2 | corehq/motech/repeaters/migrations/0003_migrate_connectionsettings.py | corehq/motech/repeaters/migrations/0003_migrate_connectionsettings.py | from django.db import migrations
from corehq.motech.repeaters.models import Repeater
def _migrate_to_connectionsettings(apps, schema_editor):
for repeater in iter_repeaters():
if not repeater.connection_settings_id:
repeater.create_connection_settings()
def iter_repeaters():
for result ... | Create ConnectionSettings for all Repeaters | Create ConnectionSettings for all Repeaters
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | Create ConnectionSettings for all Repeaters | from django.db import migrations
from corehq.motech.repeaters.models import Repeater
def _migrate_to_connectionsettings(apps, schema_editor):
for repeater in iter_repeaters():
if not repeater.connection_settings_id:
repeater.create_connection_settings()
def iter_repeaters():
for result ... | <commit_before><commit_msg>Create ConnectionSettings for all Repeaters<commit_after> | from django.db import migrations
from corehq.motech.repeaters.models import Repeater
def _migrate_to_connectionsettings(apps, schema_editor):
for repeater in iter_repeaters():
if not repeater.connection_settings_id:
repeater.create_connection_settings()
def iter_repeaters():
for result ... | Create ConnectionSettings for all Repeatersfrom django.db import migrations
from corehq.motech.repeaters.models import Repeater
def _migrate_to_connectionsettings(apps, schema_editor):
for repeater in iter_repeaters():
if not repeater.connection_settings_id:
repeater.create_connection_setting... | <commit_before><commit_msg>Create ConnectionSettings for all Repeaters<commit_after>from django.db import migrations
from corehq.motech.repeaters.models import Repeater
def _migrate_to_connectionsettings(apps, schema_editor):
for repeater in iter_repeaters():
if not repeater.connection_settings_id:
... | |
5582556d735da829fe629cc36f9664047997a5bb | src/ggrc_basic_permissions/roles/Auditor.py | src/ggrc_basic_permissions/roles/Auditor.py | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "Audit"
description = """
The permissions required by an auditor to ac... | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "Audit"
description = """
The permissions required by an auditor to ac... | Allow auditor to create relationship in context | Allow auditor to create relationship in context
This allows the auditor to map objects to the audit but not to unmap them while
not giving him edit permissions on the audit.
| Python | apache-2.0 | kr41/ggrc-core,j0gurt/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,prasannav7/ggrc-core,jmakov/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,edofic/ggrc-core,prasannav7/ggrc-core,jmakov/ggrc-core,j0gurt/ggrc-core,josthkko/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak... | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "Audit"
description = """
The permissions required by an auditor to ac... | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "Audit"
description = """
The permissions required by an auditor to ac... | <commit_before># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "Audit"
description = """
The permissions required by a... | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "Audit"
description = """
The permissions required by an auditor to ac... | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "Audit"
description = """
The permissions required by an auditor to ac... | <commit_before># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "Audit"
description = """
The permissions required by a... |
d3a5a3994a47b0b0f31be3951aead595f15dbbd9 | blivet/tasks/fstask.py | blivet/tasks/fstask.py | # fstask.py
# Superclass for filesystem tasks.
#
# Copyright (C) 2015 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This pro... | Add an abstract parent of all filesystem tasks. | Add an abstract parent of all filesystem tasks.
It defines the initializer, which should not vary among filesystem tasks.
Include a convenience class for simple unimplemented filesystem tasks.
Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com>
| Python | lgpl-2.1 | rvykydal/blivet,vojtechtrefny/blivet,AdamWill/blivet,rvykydal/blivet,rhinstaller/blivet,vpodzime/blivet,vojtechtrefny/blivet,jkonecny12/blivet,rhinstaller/blivet,jkonecny12/blivet,vpodzime/blivet,AdamWill/blivet | Add an abstract parent of all filesystem tasks.
It defines the initializer, which should not vary among filesystem tasks.
Include a convenience class for simple unimplemented filesystem tasks.
Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com> | # fstask.py
# Superclass for filesystem tasks.
#
# Copyright (C) 2015 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This pro... | <commit_before><commit_msg>Add an abstract parent of all filesystem tasks.
It defines the initializer, which should not vary among filesystem tasks.
Include a convenience class for simple unimplemented filesystem tasks.
Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com><commit_after> | # fstask.py
# Superclass for filesystem tasks.
#
# Copyright (C) 2015 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This pro... | Add an abstract parent of all filesystem tasks.
It defines the initializer, which should not vary among filesystem tasks.
Include a convenience class for simple unimplemented filesystem tasks.
Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com># fstask.py
# Superclass for filesystem tasks.
#... | <commit_before><commit_msg>Add an abstract parent of all filesystem tasks.
It defines the initializer, which should not vary among filesystem tasks.
Include a convenience class for simple unimplemented filesystem tasks.
Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com><commit_after># fstas... | |
ce96d59cf4b63101c061796ecf3793cc107a74c1 | migrations/versions/0105_opg_letter_org.py | migrations/versions/0105_opg_letter_org.py | """empty message
Revision ID: 0105_opg_letter_org
Revises: 0104_more_letter_orgs
Create Date: 2017-06-29 12:44:16.815039
"""
# revision identifiers, used by Alembic.
revision = '0105_opg_letter_org'
down_revision = '0104_more_letter_orgs'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects impor... | Add OPG to letter organisations | Add OPG to letter organisations
Logo was added here:
https://github.com/alphagov/notifications-template-preview/pull/19
| Python | mit | alphagov/notifications-api,alphagov/notifications-api | Add OPG to letter organisations
Logo was added here:
https://github.com/alphagov/notifications-template-preview/pull/19 | """empty message
Revision ID: 0105_opg_letter_org
Revises: 0104_more_letter_orgs
Create Date: 2017-06-29 12:44:16.815039
"""
# revision identifiers, used by Alembic.
revision = '0105_opg_letter_org'
down_revision = '0104_more_letter_orgs'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects impor... | <commit_before><commit_msg>Add OPG to letter organisations
Logo was added here:
https://github.com/alphagov/notifications-template-preview/pull/19<commit_after> | """empty message
Revision ID: 0105_opg_letter_org
Revises: 0104_more_letter_orgs
Create Date: 2017-06-29 12:44:16.815039
"""
# revision identifiers, used by Alembic.
revision = '0105_opg_letter_org'
down_revision = '0104_more_letter_orgs'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects impor... | Add OPG to letter organisations
Logo was added here:
https://github.com/alphagov/notifications-template-preview/pull/19"""empty message
Revision ID: 0105_opg_letter_org
Revises: 0104_more_letter_orgs
Create Date: 2017-06-29 12:44:16.815039
"""
# revision identifiers, used by Alembic.
revision = '0105_opg_letter_org... | <commit_before><commit_msg>Add OPG to letter organisations
Logo was added here:
https://github.com/alphagov/notifications-template-preview/pull/19<commit_after>"""empty message
Revision ID: 0105_opg_letter_org
Revises: 0104_more_letter_orgs
Create Date: 2017-06-29 12:44:16.815039
"""
# revision identifiers, used by... | |
d1d130ea5d79fa65f9c2f8a2c50ac8b490580d17 | tests/test_mailparsers_security_announce.py | tests/test_mailparsers_security_announce.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import os, sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from DebianChangesBot.mailparsers import SecurityAnnounceParser as p
class TestMailParserSecurityAnnounce(unittest.TestCase):
def setUp(self):
self.h... | Add some tests of SecurityAnnounceParser | Add some tests of SecurityAnnounceParser
Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk>
| Python | agpl-3.0 | xtaran/debian-devel-changes-bot,lamby/debian-devel-changes-bot,sebastinas/debian-devel-changes-bot,xtaran/debian-devel-changes-bot,lamby/debian-devel-changes-bot,lamby/debian-devel-changes-bot | Add some tests of SecurityAnnounceParser
Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import os, sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from DebianChangesBot.mailparsers import SecurityAnnounceParser as p
class TestMailParserSecurityAnnounce(unittest.TestCase):
def setUp(self):
self.h... | <commit_before><commit_msg>Add some tests of SecurityAnnounceParser
Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk><commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import os, sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from DebianChangesBot.mailparsers import SecurityAnnounceParser as p
class TestMailParserSecurityAnnounce(unittest.TestCase):
def setUp(self):
self.h... | Add some tests of SecurityAnnounceParser
Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import os, sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from DebianChangesBot.mailparsers im... | <commit_before><commit_msg>Add some tests of SecurityAnnounceParser
Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk><commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import os, sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)... | |
612ae3adb2636fb3a926cd29d87b4b388ca48476 | scripts/delete_old_user_login_events.py | scripts/delete_old_user_login_events.py | #!/usr/bin/env python
"""Delete login user events older than a given number of days.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime, timedelta
import click
from byceps.database import db
from byceps.services.user.models.event import Use... | Add script to delete user login events older than a number of days | Add script to delete user login events older than a number of days
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | Add script to delete user login events older than a number of days | #!/usr/bin/env python
"""Delete login user events older than a given number of days.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime, timedelta
import click
from byceps.database import db
from byceps.services.user.models.event import Use... | <commit_before><commit_msg>Add script to delete user login events older than a number of days<commit_after> | #!/usr/bin/env python
"""Delete login user events older than a given number of days.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime, timedelta
import click
from byceps.database import db
from byceps.services.user.models.event import Use... | Add script to delete user login events older than a number of days#!/usr/bin/env python
"""Delete login user events older than a given number of days.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime, timedelta
import click
from byceps.da... | <commit_before><commit_msg>Add script to delete user login events older than a number of days<commit_after>#!/usr/bin/env python
"""Delete login user events older than a given number of days.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime... | |
a33685a7a1432b86572c49ac895a7822cf6b58d2 | weathertracking/bin/gather_observations.py | weathertracking/bin/gather_observations.py | from weathertracking.models import WeatherStation, WeatherReport
if __name__ == '__main__': # called as a script
station_list = WeatherStation.objects.auto_poll() # retrieve all stations marked to poll automatically
for station in station_list:
var = station.update()
| Add script usable for cron/queue-ing retrievable of automatically polled stations | Add script usable for cron/queue-ing retrievable of automatically polled stations
git-svn-id: 138413ff556ff9267caefd2d209ba774763e85fb@8 696a86c2-f982-11dd-8259-6defae454439
| Python | bsd-3-clause | adamfast/django-weathertracking | Add script usable for cron/queue-ing retrievable of automatically polled stations
git-svn-id: 138413ff556ff9267caefd2d209ba774763e85fb@8 696a86c2-f982-11dd-8259-6defae454439 | from weathertracking.models import WeatherStation, WeatherReport
if __name__ == '__main__': # called as a script
station_list = WeatherStation.objects.auto_poll() # retrieve all stations marked to poll automatically
for station in station_list:
var = station.update()
| <commit_before><commit_msg>Add script usable for cron/queue-ing retrievable of automatically polled stations
git-svn-id: 138413ff556ff9267caefd2d209ba774763e85fb@8 696a86c2-f982-11dd-8259-6defae454439<commit_after> | from weathertracking.models import WeatherStation, WeatherReport
if __name__ == '__main__': # called as a script
station_list = WeatherStation.objects.auto_poll() # retrieve all stations marked to poll automatically
for station in station_list:
var = station.update()
| Add script usable for cron/queue-ing retrievable of automatically polled stations
git-svn-id: 138413ff556ff9267caefd2d209ba774763e85fb@8 696a86c2-f982-11dd-8259-6defae454439from weathertracking.models import WeatherStation, WeatherReport
if __name__ == '__main__': # called as a script
station_list = WeatherStatio... | <commit_before><commit_msg>Add script usable for cron/queue-ing retrievable of automatically polled stations
git-svn-id: 138413ff556ff9267caefd2d209ba774763e85fb@8 696a86c2-f982-11dd-8259-6defae454439<commit_after>from weathertracking.models import WeatherStation, WeatherReport
if __name__ == '__main__': # called as ... | |
6c339a14170ea77926bc8eb47bd7e61c80db4a42 | tests/test_cookiecutter_generation.py | tests/test_cookiecutter_generation.py | # -*- coding: utf-8 -*-
import pytest
@pytest.fixture
def context():
return {
"project_name": "My Test Project",
"repo_name": "my_test_project",
"author_name": "Test Author",
"email": "test@example.com",
"description": "A short description of the project.",
"domain_... | Implement a basic test with cookies.bake() | Implement a basic test with cookies.bake()
| Python | bsd-3-clause | ovidner/cookiecutter-django,luzfcb/cookiecutter-django,kappataumu/cookiecutter-django,aleprovencio/cookiecutter-django,HandyCodeJob/hcj-django-temp,hairychris/cookiecutter-django,calculuscowboy/cookiecutter-django,webspired/cookiecutter-django,hairychris/cookiecutter-django,schacki/cookiecutter-django,topwebmaster/cook... | Implement a basic test with cookies.bake() | # -*- coding: utf-8 -*-
import pytest
@pytest.fixture
def context():
return {
"project_name": "My Test Project",
"repo_name": "my_test_project",
"author_name": "Test Author",
"email": "test@example.com",
"description": "A short description of the project.",
"domain_... | <commit_before><commit_msg>Implement a basic test with cookies.bake()<commit_after> | # -*- coding: utf-8 -*-
import pytest
@pytest.fixture
def context():
return {
"project_name": "My Test Project",
"repo_name": "my_test_project",
"author_name": "Test Author",
"email": "test@example.com",
"description": "A short description of the project.",
"domain_... | Implement a basic test with cookies.bake()# -*- coding: utf-8 -*-
import pytest
@pytest.fixture
def context():
return {
"project_name": "My Test Project",
"repo_name": "my_test_project",
"author_name": "Test Author",
"email": "test@example.com",
"description": "A short desc... | <commit_before><commit_msg>Implement a basic test with cookies.bake()<commit_after># -*- coding: utf-8 -*-
import pytest
@pytest.fixture
def context():
return {
"project_name": "My Test Project",
"repo_name": "my_test_project",
"author_name": "Test Author",
"email": "test@example.c... | |
20b82906da1ab9601a6525cb14b56cafb91e91e0 | tutorials/graphs/timeSeriesFromCSV.py | tutorials/graphs/timeSeriesFromCSV.py | ## \file
## \ingroup tutorial_graphs
## \notebook -js
## This macro illustrates the use of the time axis on a TGraph
## with data read from a text file containing the SWAN usage
## statistics during July 2017.
##
## \macro_image
## \macro_code
##
## \authors Danilo Piparo, Olivier Couet
import ROOT
# Open the data fi... | Add Python tutorial about time series | Add Python tutorial about time series
| Python | lgpl-2.1 | olifre/root,root-mirror/root,root-mirror/root,root-mirror/root,olifre/root,root-mirror/root,karies/root,root-mirror/root,olifre/root,root-mirror/root,root-mirror/root,karies/root,olifre/root,karies/root,karies/root,olifre/root,olifre/root,karies/root,karies/root,root-mirror/root,karies/root,olifre/root,karies/root,olif... | Add Python tutorial about time series | ## \file
## \ingroup tutorial_graphs
## \notebook -js
## This macro illustrates the use of the time axis on a TGraph
## with data read from a text file containing the SWAN usage
## statistics during July 2017.
##
## \macro_image
## \macro_code
##
## \authors Danilo Piparo, Olivier Couet
import ROOT
# Open the data fi... | <commit_before><commit_msg>Add Python tutorial about time series<commit_after> | ## \file
## \ingroup tutorial_graphs
## \notebook -js
## This macro illustrates the use of the time axis on a TGraph
## with data read from a text file containing the SWAN usage
## statistics during July 2017.
##
## \macro_image
## \macro_code
##
## \authors Danilo Piparo, Olivier Couet
import ROOT
# Open the data fi... | Add Python tutorial about time series## \file
## \ingroup tutorial_graphs
## \notebook -js
## This macro illustrates the use of the time axis on a TGraph
## with data read from a text file containing the SWAN usage
## statistics during July 2017.
##
## \macro_image
## \macro_code
##
## \authors Danilo Piparo, Olivier C... | <commit_before><commit_msg>Add Python tutorial about time series<commit_after>## \file
## \ingroup tutorial_graphs
## \notebook -js
## This macro illustrates the use of the time axis on a TGraph
## with data read from a text file containing the SWAN usage
## statistics during July 2017.
##
## \macro_image
## \macro_cod... | |
b5142de511907167b3c9c7add5d14e6ec799633c | example/NaCl/dynmat.py | example/NaCl/dynmat.py | #!/usr/bin/env python
import yaml
import numpy as np
data = yaml.load(open("qpoints.yaml"))
dynmat = []
dynmat_data = data['phonon'][0]['dynamical_matrix']
for row in dynmat_data:
vals = np.reshape(row, (-1, 2))
dynmat.append(vals[:, 0] + vals[:, 1] * 1j)
dynmat = np.array(dynmat)
eigvals, eigvecs, = np.lina... | Add an example script in NaCle | Add an example script in NaCle
| Python | bsd-3-clause | atztogo/phonopy,atztogo/phonopy,atztogo/phonopy,atztogo/phonopy | Add an example script in NaCle | #!/usr/bin/env python
import yaml
import numpy as np
data = yaml.load(open("qpoints.yaml"))
dynmat = []
dynmat_data = data['phonon'][0]['dynamical_matrix']
for row in dynmat_data:
vals = np.reshape(row, (-1, 2))
dynmat.append(vals[:, 0] + vals[:, 1] * 1j)
dynmat = np.array(dynmat)
eigvals, eigvecs, = np.lina... | <commit_before><commit_msg>Add an example script in NaCle<commit_after> | #!/usr/bin/env python
import yaml
import numpy as np
data = yaml.load(open("qpoints.yaml"))
dynmat = []
dynmat_data = data['phonon'][0]['dynamical_matrix']
for row in dynmat_data:
vals = np.reshape(row, (-1, 2))
dynmat.append(vals[:, 0] + vals[:, 1] * 1j)
dynmat = np.array(dynmat)
eigvals, eigvecs, = np.lina... | Add an example script in NaCle#!/usr/bin/env python
import yaml
import numpy as np
data = yaml.load(open("qpoints.yaml"))
dynmat = []
dynmat_data = data['phonon'][0]['dynamical_matrix']
for row in dynmat_data:
vals = np.reshape(row, (-1, 2))
dynmat.append(vals[:, 0] + vals[:, 1] * 1j)
dynmat = np.array(dynmat... | <commit_before><commit_msg>Add an example script in NaCle<commit_after>#!/usr/bin/env python
import yaml
import numpy as np
data = yaml.load(open("qpoints.yaml"))
dynmat = []
dynmat_data = data['phonon'][0]['dynamical_matrix']
for row in dynmat_data:
vals = np.reshape(row, (-1, 2))
dynmat.append(vals[:, 0] + ... | |
2b0e7e221bcf6b01fa3eccfe6b33bf0763613630 | scripts/add_rtp_process_event.py | scripts/add_rtp_process_event.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2019 the HERA Collaboration
# Licensed under the 2-clause BSD License
"""
Script to add an RTP process event record to M&C.
"""
from __future__ import print_function, division, absolute_import
import numpy as np
import h5py
from astropy.time import Time
impor... | Add script for adding RTP process events | Add script for adding RTP process events
| Python | bsd-2-clause | HERA-Team/Monitor_and_Control,HERA-Team/hera_mc,HERA-Team/hera_mc | Add script for adding RTP process events | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2019 the HERA Collaboration
# Licensed under the 2-clause BSD License
"""
Script to add an RTP process event record to M&C.
"""
from __future__ import print_function, division, absolute_import
import numpy as np
import h5py
from astropy.time import Time
impor... | <commit_before><commit_msg>Add script for adding RTP process events<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2019 the HERA Collaboration
# Licensed under the 2-clause BSD License
"""
Script to add an RTP process event record to M&C.
"""
from __future__ import print_function, division, absolute_import
import numpy as np
import h5py
from astropy.time import Time
impor... | Add script for adding RTP process events#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2019 the HERA Collaboration
# Licensed under the 2-clause BSD License
"""
Script to add an RTP process event record to M&C.
"""
from __future__ import print_function, division, absolute_import
import numpy as np
import h... | <commit_before><commit_msg>Add script for adding RTP process events<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2019 the HERA Collaboration
# Licensed under the 2-clause BSD License
"""
Script to add an RTP process event record to M&C.
"""
from __future__ import print_function, division, abs... | |
c1fe209bde5d7edf95b809ebcb00c2167d74ede5 | quant/demo/demo_DAX.py | quant/demo/demo_DAX.py | #-*-coding:utf-8-*-
#!/usr/bin/python
# coding: UTF-8
import numpy as np
import pandas as pd
import pandas_datareader.data as web
import math
#从雅虎财经获取DAX指数的数据
DAX = web.DataReader(name='^GDAXI', data_source='yahoo',start = '2000-1-1')
#查看一下数据的一些信息 上面这一方法返回的是一个pandas dataframe的数据结构
print (DAX.info())
#绘制收盘价的曲线
DAX['... | Add demo of DAX analysis and MA | Add demo of DAX analysis and MA
| Python | apache-2.0 | yunfeiz/py_learnt | Add demo of DAX analysis and MA | #-*-coding:utf-8-*-
#!/usr/bin/python
# coding: UTF-8
import numpy as np
import pandas as pd
import pandas_datareader.data as web
import math
#从雅虎财经获取DAX指数的数据
DAX = web.DataReader(name='^GDAXI', data_source='yahoo',start = '2000-1-1')
#查看一下数据的一些信息 上面这一方法返回的是一个pandas dataframe的数据结构
print (DAX.info())
#绘制收盘价的曲线
DAX['... | <commit_before><commit_msg>Add demo of DAX analysis and MA<commit_after> | #-*-coding:utf-8-*-
#!/usr/bin/python
# coding: UTF-8
import numpy as np
import pandas as pd
import pandas_datareader.data as web
import math
#从雅虎财经获取DAX指数的数据
DAX = web.DataReader(name='^GDAXI', data_source='yahoo',start = '2000-1-1')
#查看一下数据的一些信息 上面这一方法返回的是一个pandas dataframe的数据结构
print (DAX.info())
#绘制收盘价的曲线
DAX['... | Add demo of DAX analysis and MA#-*-coding:utf-8-*-
#!/usr/bin/python
# coding: UTF-8
import numpy as np
import pandas as pd
import pandas_datareader.data as web
import math
#从雅虎财经获取DAX指数的数据
DAX = web.DataReader(name='^GDAXI', data_source='yahoo',start = '2000-1-1')
#查看一下数据的一些信息 上面这一方法返回的是一个pandas dataframe的数据结构
prin... | <commit_before><commit_msg>Add demo of DAX analysis and MA<commit_after>#-*-coding:utf-8-*-
#!/usr/bin/python
# coding: UTF-8
import numpy as np
import pandas as pd
import pandas_datareader.data as web
import math
#从雅虎财经获取DAX指数的数据
DAX = web.DataReader(name='^GDAXI', data_source='yahoo',start = '2000-1-1')
#查看一下数据的一些... | |
d197fe8140d8d01e7b517fa0a6a5698548a65af8 | scripts/dump_s_file.py | scripts/dump_s_file.py | #!/usr/bin/env python3
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'pccora'))
from pccora import *
import math
def dump_values(obj):
for key in obj:
print("%s -> %s" % (key, obj[key]))
def dump_array_values(obj, elapsed_time):
i = 0
for container in obj:
i... | Add script to dump S-file PC-CORA data | Add script to dump S-file PC-CORA data
| Python | mit | kinow/pccora | Add script to dump S-file PC-CORA data | #!/usr/bin/env python3
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'pccora'))
from pccora import *
import math
def dump_values(obj):
for key in obj:
print("%s -> %s" % (key, obj[key]))
def dump_array_values(obj, elapsed_time):
i = 0
for container in obj:
i... | <commit_before><commit_msg>Add script to dump S-file PC-CORA data<commit_after> | #!/usr/bin/env python3
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'pccora'))
from pccora import *
import math
def dump_values(obj):
for key in obj:
print("%s -> %s" % (key, obj[key]))
def dump_array_values(obj, elapsed_time):
i = 0
for container in obj:
i... | Add script to dump S-file PC-CORA data#!/usr/bin/env python3
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'pccora'))
from pccora import *
import math
def dump_values(obj):
for key in obj:
print("%s -> %s" % (key, obj[key]))
def dump_array_values(obj, elapsed_time):
i =... | <commit_before><commit_msg>Add script to dump S-file PC-CORA data<commit_after>#!/usr/bin/env python3
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'pccora'))
from pccora import *
import math
def dump_values(obj):
for key in obj:
print("%s -> %s" % (key, obj[key]))
def dump... | |
0ea2108f1cb4ab889e780fdff2ad0730290950e0 | tests/basics/gen_yield_from_stopped.py | tests/basics/gen_yield_from_stopped.py | # Yielding from stopped generator is ok and results in None
def gen():
return 1
# This yield is just to make this a generator
yield
f = gen()
def run():
print((yield from f))
print((yield from f))
print((yield from f))
try:
next(run())
except StopIteration:
print("StopIteration")
| Add testcase for yielding from a stopped generator. | tests: Add testcase for yielding from a stopped generator.
| Python | mit | alex-robbins/micropython,cwyark/micropython,MrSurly/micropython-esp32,bvernoux/micropython,selste/micropython,Peetz0r/micropython-esp32,ryannathans/micropython,matthewelse/micropython,pozetroninc/micropython,ryannathans/micropython,PappaPeppar/micropython,hiway/micropython,pozetroninc/micropython,trezor/micropython,chr... | tests: Add testcase for yielding from a stopped generator. | # Yielding from stopped generator is ok and results in None
def gen():
return 1
# This yield is just to make this a generator
yield
f = gen()
def run():
print((yield from f))
print((yield from f))
print((yield from f))
try:
next(run())
except StopIteration:
print("StopIteration")
| <commit_before><commit_msg>tests: Add testcase for yielding from a stopped generator.<commit_after> | # Yielding from stopped generator is ok and results in None
def gen():
return 1
# This yield is just to make this a generator
yield
f = gen()
def run():
print((yield from f))
print((yield from f))
print((yield from f))
try:
next(run())
except StopIteration:
print("StopIteration")
| tests: Add testcase for yielding from a stopped generator.# Yielding from stopped generator is ok and results in None
def gen():
return 1
# This yield is just to make this a generator
yield
f = gen()
def run():
print((yield from f))
print((yield from f))
print((yield from f))
try:
next(r... | <commit_before><commit_msg>tests: Add testcase for yielding from a stopped generator.<commit_after># Yielding from stopped generator is ok and results in None
def gen():
return 1
# This yield is just to make this a generator
yield
f = gen()
def run():
print((yield from f))
print((yield from f))
... | |
264a67f649cab578aaafea4b23bc38b05705a1ac | tests/styles/document_matcher_tests.py | tests/styles/document_matcher_tests.py | from nose.tools import istest, assert_equal
from mammoth import document_matchers
@istest
def equal_to_matcher_is_case_insensitive():
matcher = document_matchers.equal_to("Heading 1")
assert_equal(True, matcher.matches("heaDING 1"))
assert_equal(False, matcher.matches("heaDING 2"))
| Add test for making sure equal_to is case-insensitive | Add test for making sure equal_to is case-insensitive
| Python | bsd-2-clause | mwilliamson/python-mammoth | Add test for making sure equal_to is case-insensitive | from nose.tools import istest, assert_equal
from mammoth import document_matchers
@istest
def equal_to_matcher_is_case_insensitive():
matcher = document_matchers.equal_to("Heading 1")
assert_equal(True, matcher.matches("heaDING 1"))
assert_equal(False, matcher.matches("heaDING 2"))
| <commit_before><commit_msg>Add test for making sure equal_to is case-insensitive<commit_after> | from nose.tools import istest, assert_equal
from mammoth import document_matchers
@istest
def equal_to_matcher_is_case_insensitive():
matcher = document_matchers.equal_to("Heading 1")
assert_equal(True, matcher.matches("heaDING 1"))
assert_equal(False, matcher.matches("heaDING 2"))
| Add test for making sure equal_to is case-insensitivefrom nose.tools import istest, assert_equal
from mammoth import document_matchers
@istest
def equal_to_matcher_is_case_insensitive():
matcher = document_matchers.equal_to("Heading 1")
assert_equal(True, matcher.matches("heaDING 1"))
assert_equal(False,... | <commit_before><commit_msg>Add test for making sure equal_to is case-insensitive<commit_after>from nose.tools import istest, assert_equal
from mammoth import document_matchers
@istest
def equal_to_matcher_is_case_insensitive():
matcher = document_matchers.equal_to("Heading 1")
assert_equal(True, matcher.matc... | |
78821f2df84bbb822e076fb1591dfccc09bcb43c | cpm_data/migrations/0004_add_seasons_data.py | cpm_data/migrations/0004_add_seasons_data.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-08-27 22:21
from __future__ import unicode_literals
from django.db import migrations
def _get_seasons():
return '2012 2013 2014 2015 2016 2017'.split()
def add_seasons(apps, schema_editor):
Season = apps.get_model('cpm_data.Season')
Season.ob... | Add migrations for adding seasons | Add migrations for adding seasons
| Python | unlicense | kinaklub/next.filmfest.by,nott/next.filmfest.by,nott/next.filmfest.by,nott/next.filmfest.by,kinaklub/next.filmfest.by,kinaklub/next.filmfest.by,kinaklub/next.filmfest.by,nott/next.filmfest.by | Add migrations for adding seasons | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-08-27 22:21
from __future__ import unicode_literals
from django.db import migrations
def _get_seasons():
return '2012 2013 2014 2015 2016 2017'.split()
def add_seasons(apps, schema_editor):
Season = apps.get_model('cpm_data.Season')
Season.ob... | <commit_before><commit_msg>Add migrations for adding seasons<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-08-27 22:21
from __future__ import unicode_literals
from django.db import migrations
def _get_seasons():
return '2012 2013 2014 2015 2016 2017'.split()
def add_seasons(apps, schema_editor):
Season = apps.get_model('cpm_data.Season')
Season.ob... | Add migrations for adding seasons# -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-08-27 22:21
from __future__ import unicode_literals
from django.db import migrations
def _get_seasons():
return '2012 2013 2014 2015 2016 2017'.split()
def add_seasons(apps, schema_editor):
Season = apps.get_model(... | <commit_before><commit_msg>Add migrations for adding seasons<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-08-27 22:21
from __future__ import unicode_literals
from django.db import migrations
def _get_seasons():
return '2012 2013 2014 2015 2016 2017'.split()
def add_seasons(apps, sch... | |
e477e7eefb3d562c300b366c0d3c801f2e640f13 | tools/development/slow_query_finder.py | tools/development/slow_query_finder.py | #! /usr/bin/env python
# -.- coding: utf-8 -.-
# Zeitgeist
#
# Copyright © 2011 Collabora Ltd.
# By Trever Fischer <trever.fischer@collabora.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# t... | Add a script that uses a genetic algorithm to find slow queries | Add a script that uses a genetic algorithm to find slow queries
| Python | lgpl-2.1 | freedesktop-unofficial-mirror/zeitgeist__zeitgeist,freedesktop-unofficial-mirror/zeitgeist__zeitgeist,freedesktop-unofficial-mirror/zeitgeist__zeitgeist,freedesktop-unofficial-mirror/zeitgeist__zeitgeist,freedesktop-unofficial-mirror/zeitgeist__zeitgeist | Add a script that uses a genetic algorithm to find slow queries | #! /usr/bin/env python
# -.- coding: utf-8 -.-
# Zeitgeist
#
# Copyright © 2011 Collabora Ltd.
# By Trever Fischer <trever.fischer@collabora.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# t... | <commit_before><commit_msg>Add a script that uses a genetic algorithm to find slow queries<commit_after> | #! /usr/bin/env python
# -.- coding: utf-8 -.-
# Zeitgeist
#
# Copyright © 2011 Collabora Ltd.
# By Trever Fischer <trever.fischer@collabora.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# t... | Add a script that uses a genetic algorithm to find slow queries#! /usr/bin/env python
# -.- coding: utf-8 -.-
# Zeitgeist
#
# Copyright © 2011 Collabora Ltd.
# By Trever Fischer <trever.fischer@collabora.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the ter... | <commit_before><commit_msg>Add a script that uses a genetic algorithm to find slow queries<commit_after>#! /usr/bin/env python
# -.- coding: utf-8 -.-
# Zeitgeist
#
# Copyright © 2011 Collabora Ltd.
# By Trever Fischer <trever.fischer@collabora.co.uk>
#
# This program is free software: you can redistr... | |
6dca5c4564bbd2c8b6546090a646c7c841f1d7be | etc/theory/idealness_experiments/analysis.py | etc/theory/idealness_experiments/analysis.py | # -*- coding: utf-8 -*-
from string import printable
from generate_huffman import get_huffman_tree
def get_ideal_tree(freq_list):
freq_list = sorted(freq_list, reverse=True)
output = []
output.append('Char\t#\tHuff.codelen')
tree = []
for (current_occ, current_char) in freq_list:
if tree:... | Add idealness experiment py script | Add idealness experiment py script
| Python | mit | esarafianou/rupture,dionyziz/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dionyziz/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dionyziz/rupture,esarafianou/rupture,dimriou/rupture,dimriou/rupture,e... | Add idealness experiment py script | # -*- coding: utf-8 -*-
from string import printable
from generate_huffman import get_huffman_tree
def get_ideal_tree(freq_list):
freq_list = sorted(freq_list, reverse=True)
output = []
output.append('Char\t#\tHuff.codelen')
tree = []
for (current_occ, current_char) in freq_list:
if tree:... | <commit_before><commit_msg>Add idealness experiment py script<commit_after> | # -*- coding: utf-8 -*-
from string import printable
from generate_huffman import get_huffman_tree
def get_ideal_tree(freq_list):
freq_list = sorted(freq_list, reverse=True)
output = []
output.append('Char\t#\tHuff.codelen')
tree = []
for (current_occ, current_char) in freq_list:
if tree:... | Add idealness experiment py script# -*- coding: utf-8 -*-
from string import printable
from generate_huffman import get_huffman_tree
def get_ideal_tree(freq_list):
freq_list = sorted(freq_list, reverse=True)
output = []
output.append('Char\t#\tHuff.codelen')
tree = []
for (current_occ, current_ch... | <commit_before><commit_msg>Add idealness experiment py script<commit_after># -*- coding: utf-8 -*-
from string import printable
from generate_huffman import get_huffman_tree
def get_ideal_tree(freq_list):
freq_list = sorted(freq_list, reverse=True)
output = []
output.append('Char\t#\tHuff.codelen')
t... | |
8e59a09b8270af79d2ad3a2564904137a470c628 | events/migrations/0006_auto_20150827_2020.py | events/migrations/0006_auto_20150827_2020.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('events', '0005_auto_20150607_2005'),
]
operations = [
migrations.AlterField(
model_name='event',
nam... | Add migration for previous commit | Add migration for previous commit
| Python | mit | tuomas777/linkedevents,aapris/linkedevents,City-of-Helsinki/linkedevents,kooditiimi/linkedevents,aapris/linkedevents,kooditiimi/linkedevents,kooditiimi/linkedevents,City-of-Helsinki/linkedevents,aapris/linkedevents,kooditiimi/linkedevents,City-of-Helsinki/linkedevents,tuomas777/linkedevents,tuomas777/linkedevents | Add migration for previous commit | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('events', '0005_auto_20150607_2005'),
]
operations = [
migrations.AlterField(
model_name='event',
nam... | <commit_before><commit_msg>Add migration for previous commit<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('events', '0005_auto_20150607_2005'),
]
operations = [
migrations.AlterField(
model_name='event',
nam... | Add migration for previous commit# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('events', '0005_auto_20150607_2005'),
]
operations = [
migrations.AlterField(
mo... | <commit_before><commit_msg>Add migration for previous commit<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('events', '0005_auto_20150607_2005'),
]
operations = [
... | |
03f365579df63f35ccee02fa1e6186f31acdac15 | tests/api/auth_test.py | tests/api/auth_test.py | import base64
from flask import Response
from flask.testing import FlaskClient
import pytest
import config
from skylines.api import auth
from skylines.app import SkyLines
from skylines.database import db
pytestmark = pytest.mark.usefixtures('db')
@pytest.fixture(scope='session')
def app():
app = SkyLines(confi... | Add test for the "auth" module | api: Add test for the "auth" module
| Python | agpl-3.0 | RBE-Avionik/skylines,snip/skylines,kerel-fs/skylines,shadowoneau/skylines,snip/skylines,kerel-fs/skylines,shadowoneau/skylines,Turbo87/skylines,Harry-R/skylines,Harry-R/skylines,skylines-project/skylines,skylines-project/skylines,Turbo87/skylines,TobiasLohner/SkyLines,TobiasLohner/SkyLines,TobiasLohner/SkyLines,RBE-Avi... | api: Add test for the "auth" module | import base64
from flask import Response
from flask.testing import FlaskClient
import pytest
import config
from skylines.api import auth
from skylines.app import SkyLines
from skylines.database import db
pytestmark = pytest.mark.usefixtures('db')
@pytest.fixture(scope='session')
def app():
app = SkyLines(confi... | <commit_before><commit_msg>api: Add test for the "auth" module<commit_after> | import base64
from flask import Response
from flask.testing import FlaskClient
import pytest
import config
from skylines.api import auth
from skylines.app import SkyLines
from skylines.database import db
pytestmark = pytest.mark.usefixtures('db')
@pytest.fixture(scope='session')
def app():
app = SkyLines(confi... | api: Add test for the "auth" moduleimport base64
from flask import Response
from flask.testing import FlaskClient
import pytest
import config
from skylines.api import auth
from skylines.app import SkyLines
from skylines.database import db
pytestmark = pytest.mark.usefixtures('db')
@pytest.fixture(scope='session')
... | <commit_before><commit_msg>api: Add test for the "auth" module<commit_after>import base64
from flask import Response
from flask.testing import FlaskClient
import pytest
import config
from skylines.api import auth
from skylines.app import SkyLines
from skylines.database import db
pytestmark = pytest.mark.usefixtures(... | |
b7c90f17465232f4c49cc1f05c614a9a17f6bece | tests/test_vservice.py | tests/test_vservice.py | from .base import ServiceTestCase
class VServiceTests(ServiceTestCase):
def verifyCustomName(self):
self.assertEquals(self.service.name, 'VService')
self.assertEquals(self.service._name, 'VService')
self.service.name = 'MyService'
self.assertEquals(self.service.name, 'MyService')
... | Add test to verify custom name functionality | Add test to verify custom name functionality
| Python | bsd-3-clause | fmoo/sparts,djipko/sparts,bboozzoo/sparts,pshuff/sparts,djipko/sparts,facebook/sparts,pshuff/sparts,facebook/sparts,bboozzoo/sparts,fmoo/sparts | Add test to verify custom name functionality | from .base import ServiceTestCase
class VServiceTests(ServiceTestCase):
def verifyCustomName(self):
self.assertEquals(self.service.name, 'VService')
self.assertEquals(self.service._name, 'VService')
self.service.name = 'MyService'
self.assertEquals(self.service.name, 'MyService')
... | <commit_before><commit_msg>Add test to verify custom name functionality<commit_after> | from .base import ServiceTestCase
class VServiceTests(ServiceTestCase):
def verifyCustomName(self):
self.assertEquals(self.service.name, 'VService')
self.assertEquals(self.service._name, 'VService')
self.service.name = 'MyService'
self.assertEquals(self.service.name, 'MyService')
... | Add test to verify custom name functionalityfrom .base import ServiceTestCase
class VServiceTests(ServiceTestCase):
def verifyCustomName(self):
self.assertEquals(self.service.name, 'VService')
self.assertEquals(self.service._name, 'VService')
self.service.name = 'MyService'
self.ass... | <commit_before><commit_msg>Add test to verify custom name functionality<commit_after>from .base import ServiceTestCase
class VServiceTests(ServiceTestCase):
def verifyCustomName(self):
self.assertEquals(self.service.name, 'VService')
self.assertEquals(self.service._name, 'VService')
self.se... | |
c5e5e34482730fa50329d513bbe4ccb2ef7d51ff | data_preparation/crawl_bug_page/GetBug.py | data_preparation/crawl_bug_page/GetBug.py | #!/usr/bin/python
import os
import re
import subprocess
bugIds = []
def prepareCookieData():
out = subprocess.call("curl --cookie-jar cookie.data \"https://bugzilla-hostname/index.cgi?Bugzilla_login=name&Bugzilla_password=password&GoAheadAndLogIn=LogIn\" > login.txt", shell=True)
def gerateBugFile(bugid):... | Implement a tool to crawl bug pages. | Implement a tool to crawl bug pages.
| Python | apache-2.0 | bug-analysis/DDVP | Implement a tool to crawl bug pages. | #!/usr/bin/python
import os
import re
import subprocess
bugIds = []
def prepareCookieData():
out = subprocess.call("curl --cookie-jar cookie.data \"https://bugzilla-hostname/index.cgi?Bugzilla_login=name&Bugzilla_password=password&GoAheadAndLogIn=LogIn\" > login.txt", shell=True)
def gerateBugFile(bugid):... | <commit_before><commit_msg>Implement a tool to crawl bug pages.<commit_after> | #!/usr/bin/python
import os
import re
import subprocess
bugIds = []
def prepareCookieData():
out = subprocess.call("curl --cookie-jar cookie.data \"https://bugzilla-hostname/index.cgi?Bugzilla_login=name&Bugzilla_password=password&GoAheadAndLogIn=LogIn\" > login.txt", shell=True)
def gerateBugFile(bugid):... | Implement a tool to crawl bug pages.#!/usr/bin/python
import os
import re
import subprocess
bugIds = []
def prepareCookieData():
out = subprocess.call("curl --cookie-jar cookie.data \"https://bugzilla-hostname/index.cgi?Bugzilla_login=name&Bugzilla_password=password&GoAheadAndLogIn=LogIn\" > login.txt", shell=True... | <commit_before><commit_msg>Implement a tool to crawl bug pages.<commit_after>#!/usr/bin/python
import os
import re
import subprocess
bugIds = []
def prepareCookieData():
out = subprocess.call("curl --cookie-jar cookie.data \"https://bugzilla-hostname/index.cgi?Bugzilla_login=name&Bugzilla_password=password&GoAhead... | |
ad57bd124aea637520696857f0b9897ed28f4a96 | 2018/clone/plot-time.py | 2018/clone/plot-time.py | # Helper script for making run-time plots.
#
# Requires a Python installation with the full numeric stack (Numpy, Matplotlib)
# including Seaborn (for prettier plots).
#
# Eli Bendersky [http://eli.thegreenplace.net]
# This code is in the public domain.
import numpy as np
import matplotlib.pyplot as plt
import seaborn
... | Add plotting of launch times | Add plotting of launch times
| Python | unlicense | eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog | Add plotting of launch times | # Helper script for making run-time plots.
#
# Requires a Python installation with the full numeric stack (Numpy, Matplotlib)
# including Seaborn (for prettier plots).
#
# Eli Bendersky [http://eli.thegreenplace.net]
# This code is in the public domain.
import numpy as np
import matplotlib.pyplot as plt
import seaborn
... | <commit_before><commit_msg>Add plotting of launch times<commit_after> | # Helper script for making run-time plots.
#
# Requires a Python installation with the full numeric stack (Numpy, Matplotlib)
# including Seaborn (for prettier plots).
#
# Eli Bendersky [http://eli.thegreenplace.net]
# This code is in the public domain.
import numpy as np
import matplotlib.pyplot as plt
import seaborn
... | Add plotting of launch times# Helper script for making run-time plots.
#
# Requires a Python installation with the full numeric stack (Numpy, Matplotlib)
# including Seaborn (for prettier plots).
#
# Eli Bendersky [http://eli.thegreenplace.net]
# This code is in the public domain.
import numpy as np
import matplotlib.p... | <commit_before><commit_msg>Add plotting of launch times<commit_after># Helper script for making run-time plots.
#
# Requires a Python installation with the full numeric stack (Numpy, Matplotlib)
# including Seaborn (for prettier plots).
#
# Eli Bendersky [http://eli.thegreenplace.net]
# This code is in the public domai... | |
b8b02b41ee5c5712f90c0621d5fd7130004eafb6 | fil_finder/tests/test_profiles.py | fil_finder/tests/test_profiles.py |
'''
Tests for functions in fil_finder.width_profiles.
'''
import pytest
import numpy as np
import numpy.testing as npt
from ..width_profiles.profile_line_width import walk_through_skeleton, return_ends
def make_test_skeleton(shape=(10, 10)):
skel = np.zeros(shape)
crds = np.array([[3, 3, 4], [4, 5, 6]])
... | Add tests for end finding and walk through a skeleton | Add tests for end finding and walk through a skeleton
| Python | mit | e-koch/FilFinder | Add tests for end finding and walk through a skeleton |
'''
Tests for functions in fil_finder.width_profiles.
'''
import pytest
import numpy as np
import numpy.testing as npt
from ..width_profiles.profile_line_width import walk_through_skeleton, return_ends
def make_test_skeleton(shape=(10, 10)):
skel = np.zeros(shape)
crds = np.array([[3, 3, 4], [4, 5, 6]])
... | <commit_before><commit_msg>Add tests for end finding and walk through a skeleton<commit_after> |
'''
Tests for functions in fil_finder.width_profiles.
'''
import pytest
import numpy as np
import numpy.testing as npt
from ..width_profiles.profile_line_width import walk_through_skeleton, return_ends
def make_test_skeleton(shape=(10, 10)):
skel = np.zeros(shape)
crds = np.array([[3, 3, 4], [4, 5, 6]])
... | Add tests for end finding and walk through a skeleton
'''
Tests for functions in fil_finder.width_profiles.
'''
import pytest
import numpy as np
import numpy.testing as npt
from ..width_profiles.profile_line_width import walk_through_skeleton, return_ends
def make_test_skeleton(shape=(10, 10)):
skel = np.zero... | <commit_before><commit_msg>Add tests for end finding and walk through a skeleton<commit_after>
'''
Tests for functions in fil_finder.width_profiles.
'''
import pytest
import numpy as np
import numpy.testing as npt
from ..width_profiles.profile_line_width import walk_through_skeleton, return_ends
def make_test_ske... | |
9874b911fa04cd5b6883845ee627c7d91c6376a2 | telemetry/telemetry/page/page_test_runner.py | telemetry/telemetry/page/page_test_runner.py | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import sys
from telemetry.core import browser_finder
from telemetry.core import browser_options
from telemetry.page import page_... | Add a telemetry-based gpu_tests folder | Add a telemetry-based gpu_tests folder
BUG=143317
Review URL: https://chromiumcodereview.appspot.com/12252020
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@183915 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | sahiljain/catapult,benschmaus/catapult,benschmaus/catapult,SummerLW/Perf-Insight-Report,sahiljain/catapult,catapult-project/catapult,benschmaus/catapult,catapult-project/catapult-csm,benschmaus/catapult,sahiljain/catapult,catapult-project/catapult,catapult-project/catapult-csm,catapult-project/catapult-csm,SummerLW/Per... | Add a telemetry-based gpu_tests folder
BUG=143317
Review URL: https://chromiumcodereview.appspot.com/12252020
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@183915 0039d316-1c4b-4281-b951-d872f2087c98 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import sys
from telemetry.core import browser_finder
from telemetry.core import browser_options
from telemetry.page import page_... | <commit_before><commit_msg>Add a telemetry-based gpu_tests folder
BUG=143317
Review URL: https://chromiumcodereview.appspot.com/12252020
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@183915 0039d316-1c4b-4281-b951-d872f2087c98<commit_after> | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import sys
from telemetry.core import browser_finder
from telemetry.core import browser_options
from telemetry.page import page_... | Add a telemetry-based gpu_tests folder
BUG=143317
Review URL: https://chromiumcodereview.appspot.com/12252020
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@183915 0039d316-1c4b-4281-b951-d872f2087c98# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD... | <commit_before><commit_msg>Add a telemetry-based gpu_tests folder
BUG=143317
Review URL: https://chromiumcodereview.appspot.com/12252020
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@183915 0039d316-1c4b-4281-b951-d872f2087c98<commit_after># Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use... | |
cd9a26a7ffbe44b89912d7d862b394f4dfc47269 | yithlibraryserver/oauth2/tests/test_utils.py | yithlibraryserver/oauth2/tests/test_utils.py | # Yith Library Server is a password storage server.
# Copyright (C) 2014 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Yith Library Server.
#
# Yith Library Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as publ... | Add tests for oauth2 utils | Add tests for oauth2 utils
| Python | agpl-3.0 | lorenzogil/yith-library-server,lorenzogil/yith-library-server,lorenzogil/yith-library-server | Add tests for oauth2 utils | # Yith Library Server is a password storage server.
# Copyright (C) 2014 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Yith Library Server.
#
# Yith Library Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as publ... | <commit_before><commit_msg>Add tests for oauth2 utils<commit_after> | # Yith Library Server is a password storage server.
# Copyright (C) 2014 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Yith Library Server.
#
# Yith Library Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as publ... | Add tests for oauth2 utils# Yith Library Server is a password storage server.
# Copyright (C) 2014 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Yith Library Server.
#
# Yith Library Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gene... | <commit_before><commit_msg>Add tests for oauth2 utils<commit_after># Yith Library Server is a password storage server.
# Copyright (C) 2014 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# This file is part of Yith Library Server.
#
# Yith Library Server is free software: you can redistribute it and/or modify
# ... | |
c0e9a1a741a16548a466b427338fab5ac8603537 | tests/test_main.py | tests/test_main.py | import copy
import os
from ecs_deplojo import main
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
def test_register_task_definitions(cluster):
task_definitions = {
"service-1": {
"definition": {
"family": "my-task-def",
"volumes": [],
"c... | Add a number of unittests for registering and deregistering task definitions | Add a number of unittests for registering and deregistering task definitions
| Python | mit | LabD/ecs-deplojo | Add a number of unittests for registering and deregistering task definitions | import copy
import os
from ecs_deplojo import main
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
def test_register_task_definitions(cluster):
task_definitions = {
"service-1": {
"definition": {
"family": "my-task-def",
"volumes": [],
"c... | <commit_before><commit_msg>Add a number of unittests for registering and deregistering task definitions<commit_after> | import copy
import os
from ecs_deplojo import main
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
def test_register_task_definitions(cluster):
task_definitions = {
"service-1": {
"definition": {
"family": "my-task-def",
"volumes": [],
"c... | Add a number of unittests for registering and deregistering task definitionsimport copy
import os
from ecs_deplojo import main
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
def test_register_task_definitions(cluster):
task_definitions = {
"service-1": {
"definition": {
... | <commit_before><commit_msg>Add a number of unittests for registering and deregistering task definitions<commit_after>import copy
import os
from ecs_deplojo import main
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
def test_register_task_definitions(cluster):
task_definitions = {
"service-1": {
... | |
5158ecbec55f142e79cd5efa0360e01b50142464 | changes/migrations/0006_auto_20170718_1414.py | changes/migrations/0006_auto_20170718_1414.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2017-07-18 14:14
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('changes', '0005_auto_20170601_1354'),
]
operations = [
migrations.AlterField... | Add migration for admin change | Add migration for admin change
| Python | bsd-3-clause | praekeltfoundation/ndoh-hub,praekeltfoundation/ndoh-hub,praekeltfoundation/ndoh-hub | Add migration for admin change | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2017-07-18 14:14
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('changes', '0005_auto_20170601_1354'),
]
operations = [
migrations.AlterField... | <commit_before><commit_msg>Add migration for admin change<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2017-07-18 14:14
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('changes', '0005_auto_20170601_1354'),
]
operations = [
migrations.AlterField... | Add migration for admin change# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2017-07-18 14:14
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('changes', '0005_auto_20170601_1354'),
]
operations = [... | <commit_before><commit_msg>Add migration for admin change<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2017-07-18 14:14
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('changes', '0005_auto_2... | |
e07e436b461015365b2cbbdb96daa8bfc3ae31a4 | {{cookiecutter.repo_name}}/config/urls.py | {{cookiecutter.repo_name}}/config/urls.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.views.generic import TemplateView
# Comment the next two lines to disable the admin:
from django.contrib import ad... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
urlpatterns = patterns('', # noqa
url(r'^$... | Remove admin.autodiscover() call, it's called automatically in 1.7+ | Remove admin.autodiscover() call, it's called automatically in 1.7+
| Python | bsd-3-clause | interaktiviti/cookiecutter-django,asyncee/cookiecutter-django,kappataumu/cookiecutter-django,Sushantgakhar/cookiecutter-django,hairychris/cookiecutter-django,Sushantgakhar/cookiecutter-django,thornomad/cookiecutter-django,stepmr/cookiecutter-django,javipalanca/cookiecutter-django,wldcordeiro/cookiecutter-django-essenti... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.views.generic import TemplateView
# Comment the next two lines to disable the admin:
from django.contrib import ad... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
urlpatterns = patterns('', # noqa
url(r'^$... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.views.generic import TemplateView
# Comment the next two lines to disable the admin:
from django.co... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
urlpatterns = patterns('', # noqa
url(r'^$... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.views.generic import TemplateView
# Comment the next two lines to disable the admin:
from django.contrib import ad... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.views.generic import TemplateView
# Comment the next two lines to disable the admin:
from django.co... |
7321bb9986ce1836ab65ac82f65576d6412494f2 | auth0/v2/test/test_device_credentials.py | auth0/v2/test/test_device_credentials.py | import unittest
import mock
from ..device_credentials import DeviceCredentials
class TestDeviceCredentials(unittest.TestCase):
@mock.patch('auth0.v2.device_credentials.RestClient')
def test_get(self, mock_rc):
mock_instance = mock_rc.return_value
c = DeviceCredentials(domain='domain', jwt_to... | Add unit tests for DeviceCredentials | Add unit tests for DeviceCredentials
| Python | mit | auth0/auth0-python,auth0/auth0-python | Add unit tests for DeviceCredentials | import unittest
import mock
from ..device_credentials import DeviceCredentials
class TestDeviceCredentials(unittest.TestCase):
@mock.patch('auth0.v2.device_credentials.RestClient')
def test_get(self, mock_rc):
mock_instance = mock_rc.return_value
c = DeviceCredentials(domain='domain', jwt_to... | <commit_before><commit_msg>Add unit tests for DeviceCredentials<commit_after> | import unittest
import mock
from ..device_credentials import DeviceCredentials
class TestDeviceCredentials(unittest.TestCase):
@mock.patch('auth0.v2.device_credentials.RestClient')
def test_get(self, mock_rc):
mock_instance = mock_rc.return_value
c = DeviceCredentials(domain='domain', jwt_to... | Add unit tests for DeviceCredentialsimport unittest
import mock
from ..device_credentials import DeviceCredentials
class TestDeviceCredentials(unittest.TestCase):
@mock.patch('auth0.v2.device_credentials.RestClient')
def test_get(self, mock_rc):
mock_instance = mock_rc.return_value
c = Devic... | <commit_before><commit_msg>Add unit tests for DeviceCredentials<commit_after>import unittest
import mock
from ..device_credentials import DeviceCredentials
class TestDeviceCredentials(unittest.TestCase):
@mock.patch('auth0.v2.device_credentials.RestClient')
def test_get(self, mock_rc):
mock_instance ... | |
274511db02b95c14c19564d1e0b3d30ccf1bf532 | core/migrations/0011_auto_20150602_0128.py | core/migrations/0011_auto_20150602_0128.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0010_currentrate'),
]
operations = [
migrations.AlterModelOptions(
name='price',
options={'o... | Add migration for meta options | Add migration for meta options
| Python | unlicense | kvikshaug/btc.kvikshaug.no,kvikshaug/btc.kvikshaug.no,kvikshaug/btc.kvikshaug.no,kvikshaug/btc.kvikshaug.no | Add migration for meta options | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0010_currentrate'),
]
operations = [
migrations.AlterModelOptions(
name='price',
options={'o... | <commit_before><commit_msg>Add migration for meta options<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0010_currentrate'),
]
operations = [
migrations.AlterModelOptions(
name='price',
options={'o... | Add migration for meta options# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0010_currentrate'),
]
operations = [
migrations.AlterModelOptions(
name='p... | <commit_before><commit_msg>Add migration for meta options<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0010_currentrate'),
]
operations = [
migratio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.