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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12ac8998531922ce0ee863a49e2dfb52fa13b8fd | metpy/plots/tests/test_util.py | metpy/plots/tests/test_util.py | # Copyright (c) 2008-2016 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Tests for the `_util` module."""
from datetime import datetime
import matplotlib.pyplot as plt
import pytest
from metpy.plots import add_logo, add_timestamp
# Fixture to m... | Add tests for _util module | Add tests for _util module
| Python | bsd-3-clause | dopplershift/MetPy,ahaberlie/MetPy,dopplershift/MetPy,ShawnMurd/MetPy,jrleeman/MetPy,Unidata/MetPy,ahaberlie/MetPy,jrleeman/MetPy,Unidata/MetPy | Add tests for _util module | # Copyright (c) 2008-2016 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Tests for the `_util` module."""
from datetime import datetime
import matplotlib.pyplot as plt
import pytest
from metpy.plots import add_logo, add_timestamp
# Fixture to m... | <commit_before><commit_msg>Add tests for _util module<commit_after> | # Copyright (c) 2008-2016 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Tests for the `_util` module."""
from datetime import datetime
import matplotlib.pyplot as plt
import pytest
from metpy.plots import add_logo, add_timestamp
# Fixture to m... | Add tests for _util module# Copyright (c) 2008-2016 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Tests for the `_util` module."""
from datetime import datetime
import matplotlib.pyplot as plt
import pytest
from metpy.plots import add_logo, ad... | <commit_before><commit_msg>Add tests for _util module<commit_after># Copyright (c) 2008-2016 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Tests for the `_util` module."""
from datetime import datetime
import matplotlib.pyplot as plt
import pyt... | |
d59b9389cf295a444ad457ccb952234aa877bb29 | src/ggrc/converters/snapshot_block.py | src/ggrc/converters/snapshot_block.py | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Module for snapshot block converter."""
class SnapshotBlockConverter(object):
"""Block converter for snapshots of a single object type."""
def __init__(self, converter, ids):
self.converter = c... | Add initial snapshot block converter | Add initial snapshot block converter
| Python | apache-2.0 | AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core | Add initial snapshot block converter | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Module for snapshot block converter."""
class SnapshotBlockConverter(object):
"""Block converter for snapshots of a single object type."""
def __init__(self, converter, ids):
self.converter = c... | <commit_before><commit_msg>Add initial snapshot block converter<commit_after> | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Module for snapshot block converter."""
class SnapshotBlockConverter(object):
"""Block converter for snapshots of a single object type."""
def __init__(self, converter, ids):
self.converter = c... | Add initial snapshot block converter# Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Module for snapshot block converter."""
class SnapshotBlockConverter(object):
"""Block converter for snapshots of a single object type."""
def __init__(self, con... | <commit_before><commit_msg>Add initial snapshot block converter<commit_after># Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Module for snapshot block converter."""
class SnapshotBlockConverter(object):
"""Block converter for snapshots of a single ... | |
f14913b76a4f6909130d5bf8eed9577740ff5b15 | artists/migrations/0005_auto_20170120_1802.py | artists/migrations/0005_auto_20170120_1802.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-20 20:02
from __future__ import unicode_literals
import artists.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('artists', '0004_auto_20170120_1647'),
]
operations = [
... | Add artist profile picture path | Add artist profile picture path
| Python | mit | perna/bandhunter,perna/bandhunter | Add artist profile picture path | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-20 20:02
from __future__ import unicode_literals
import artists.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('artists', '0004_auto_20170120_1647'),
]
operations = [
... | <commit_before><commit_msg>Add artist profile picture path<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-20 20:02
from __future__ import unicode_literals
import artists.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('artists', '0004_auto_20170120_1647'),
]
operations = [
... | Add artist profile picture path# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-20 20:02
from __future__ import unicode_literals
import artists.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('artists', '0004_auto_20170120_1647'),
... | <commit_before><commit_msg>Add artist profile picture path<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-20 20:02
from __future__ import unicode_literals
import artists.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
... | |
94ea3abfa29b78bee82150706e9c6d25f2dbfb54 | client/can_bridge_loopback_test.py | client/can_bridge_loopback_test.py | #!/usr/bin/env python3
import utils
import can
import can_bridge
import serial_datagrams
def read_frame(fdesc):
"""
Reads a full CAN datagram from the CAN <-> serial bridge.
"""
buf = bytes()
datagram = None
frame = serial_datagrams.read_datagram(fdesc)
frame = can_bridge.decode_frame(fra... | Add a small program to test CAN loobpack | Add a small program to test CAN loobpack
| Python | bsd-2-clause | cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader | Add a small program to test CAN loobpack | #!/usr/bin/env python3
import utils
import can
import can_bridge
import serial_datagrams
def read_frame(fdesc):
"""
Reads a full CAN datagram from the CAN <-> serial bridge.
"""
buf = bytes()
datagram = None
frame = serial_datagrams.read_datagram(fdesc)
frame = can_bridge.decode_frame(fra... | <commit_before><commit_msg>Add a small program to test CAN loobpack<commit_after> | #!/usr/bin/env python3
import utils
import can
import can_bridge
import serial_datagrams
def read_frame(fdesc):
"""
Reads a full CAN datagram from the CAN <-> serial bridge.
"""
buf = bytes()
datagram = None
frame = serial_datagrams.read_datagram(fdesc)
frame = can_bridge.decode_frame(fra... | Add a small program to test CAN loobpack#!/usr/bin/env python3
import utils
import can
import can_bridge
import serial_datagrams
def read_frame(fdesc):
"""
Reads a full CAN datagram from the CAN <-> serial bridge.
"""
buf = bytes()
datagram = None
frame = serial_datagrams.read_datagram(fdesc)... | <commit_before><commit_msg>Add a small program to test CAN loobpack<commit_after>#!/usr/bin/env python3
import utils
import can
import can_bridge
import serial_datagrams
def read_frame(fdesc):
"""
Reads a full CAN datagram from the CAN <-> serial bridge.
"""
buf = bytes()
datagram = None
fram... | |
0142da418f01dc5540aaf1952852780225baaa17 | testapp/testapp/wsgi.py | testapp/testapp/wsgi.py | """
WSGI config for idf project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_... | Make test app runnable again | Make test app runnable again
Make the test app work with `python manager.py runserver` again, since
we use this for basic testing/debugging.
| Python | isc | hobarrera/django-afip,hobarrera/django-afip | Make test app runnable again
Make the test app work with `python manager.py runserver` again, since
we use this for basic testing/debugging. | """
WSGI config for idf project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_... | <commit_before><commit_msg>Make test app runnable again
Make the test app work with `python manager.py runserver` again, since
we use this for basic testing/debugging.<commit_after> | """
WSGI config for idf project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_... | Make test app runnable again
Make the test app work with `python manager.py runserver` again, since
we use this for basic testing/debugging."""
WSGI config for idf project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject... | <commit_before><commit_msg>Make test app runnable again
Make the test app work with `python manager.py runserver` again, since
we use this for basic testing/debugging.<commit_after>"""
WSGI config for idf project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on ... | |
8e8f3502944295b019f919e703c2f1396153b45e | nettests/example_http.py | nettests/example_http.py | # -*- encoding: utf-8 -*-
#
# :authors: Arturo Filastò
# :licence: see LICENSE
from ooni.templates import http
class Example(http.HTTPTest):
inputs = ['http://google.com/', 'http://wikileaks.org/',
'http://torproject.org/']
def processResponseBody(self, body):
# XXX here shall go your logi... | Add an example of using the HTTP test template. | Add an example of using the HTTP test template.
| Python | bsd-2-clause | kdmurray91/ooni-probe,Karthikeyan-kkk/ooni-probe,Karthikeyan-kkk/ooni-probe,0xPoly/ooni-probe,lordappsec/ooni-probe,lordappsec/ooni-probe,juga0/ooni-probe,0xPoly/ooni-probe,Karthikeyan-kkk/ooni-probe,juga0/ooni-probe,Karthikeyan-kkk/ooni-probe,hackerberry/ooni-probe,kdmurray91/ooni-probe,juga0/ooni-probe,kdmurray91/oon... | Add an example of using the HTTP test template. | # -*- encoding: utf-8 -*-
#
# :authors: Arturo Filastò
# :licence: see LICENSE
from ooni.templates import http
class Example(http.HTTPTest):
inputs = ['http://google.com/', 'http://wikileaks.org/',
'http://torproject.org/']
def processResponseBody(self, body):
# XXX here shall go your logi... | <commit_before><commit_msg>Add an example of using the HTTP test template.<commit_after> | # -*- encoding: utf-8 -*-
#
# :authors: Arturo Filastò
# :licence: see LICENSE
from ooni.templates import http
class Example(http.HTTPTest):
inputs = ['http://google.com/', 'http://wikileaks.org/',
'http://torproject.org/']
def processResponseBody(self, body):
# XXX here shall go your logi... | Add an example of using the HTTP test template.# -*- encoding: utf-8 -*-
#
# :authors: Arturo Filastò
# :licence: see LICENSE
from ooni.templates import http
class Example(http.HTTPTest):
inputs = ['http://google.com/', 'http://wikileaks.org/',
'http://torproject.org/']
def processResponseBody(sel... | <commit_before><commit_msg>Add an example of using the HTTP test template.<commit_after># -*- encoding: utf-8 -*-
#
# :authors: Arturo Filastò
# :licence: see LICENSE
from ooni.templates import http
class Example(http.HTTPTest):
inputs = ['http://google.com/', 'http://wikileaks.org/',
'http://torprojec... | |
bb41a992fbdbac158244869584d5380dddc7f970 | test_examples.py | test_examples.py | import os
import glob
import argparse
import FAUSTPy
parser = argparse.ArgumentParser()
parser.add_argument('-p', '--path',
dest="examples_path",
default="/usr/share/faust-*/examples",
help="The path to the FAUST examples."
)
args = parser.... | Add a test script that compiles the FAUST examples. | Add a test script that compiles the FAUST examples.
| Python | mit | marcecj/faust_python | Add a test script that compiles the FAUST examples. | import os
import glob
import argparse
import FAUSTPy
parser = argparse.ArgumentParser()
parser.add_argument('-p', '--path',
dest="examples_path",
default="/usr/share/faust-*/examples",
help="The path to the FAUST examples."
)
args = parser.... | <commit_before><commit_msg>Add a test script that compiles the FAUST examples.<commit_after> | import os
import glob
import argparse
import FAUSTPy
parser = argparse.ArgumentParser()
parser.add_argument('-p', '--path',
dest="examples_path",
default="/usr/share/faust-*/examples",
help="The path to the FAUST examples."
)
args = parser.... | Add a test script that compiles the FAUST examples.import os
import glob
import argparse
import FAUSTPy
parser = argparse.ArgumentParser()
parser.add_argument('-p', '--path',
dest="examples_path",
default="/usr/share/faust-*/examples",
help="The path to the F... | <commit_before><commit_msg>Add a test script that compiles the FAUST examples.<commit_after>import os
import glob
import argparse
import FAUSTPy
parser = argparse.ArgumentParser()
parser.add_argument('-p', '--path',
dest="examples_path",
default="/usr/share/faust-*/examples",
... | |
56788cc70d3b6f9375f70bd874cf4d31c3f8e3ec | photutils/utils/_parameters.py | photutils/utils/_parameters.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides parameter validation tools.
"""
import numpy as np
def as_pair(name, value, lower_bound=None, upper_bound=None):
"""
Define a pair of integer values as a 1D array.
Parameters
----------
name : str
Th... | Add as_pair helper function for parameter validation | Add as_pair helper function for parameter validation
| Python | bsd-3-clause | astropy/photutils,larrybradley/photutils | Add as_pair helper function for parameter validation | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides parameter validation tools.
"""
import numpy as np
def as_pair(name, value, lower_bound=None, upper_bound=None):
"""
Define a pair of integer values as a 1D array.
Parameters
----------
name : str
Th... | <commit_before><commit_msg>Add as_pair helper function for parameter validation<commit_after> | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides parameter validation tools.
"""
import numpy as np
def as_pair(name, value, lower_bound=None, upper_bound=None):
"""
Define a pair of integer values as a 1D array.
Parameters
----------
name : str
Th... | Add as_pair helper function for parameter validation# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides parameter validation tools.
"""
import numpy as np
def as_pair(name, value, lower_bound=None, upper_bound=None):
"""
Define a pair of integer values as a 1D array.
... | <commit_before><commit_msg>Add as_pair helper function for parameter validation<commit_after># Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides parameter validation tools.
"""
import numpy as np
def as_pair(name, value, lower_bound=None, upper_bound=None):
"""
Define a p... | |
a540a68561db4067b66b4d4d0920b217fea4fda4 | var/spack/packages/openssl/package.py | var/spack/packages/openssl/package.py | from spack import *
class Openssl(Package):
"""The OpenSSL Project is a collaborative effort to develop a
robust, commercial-grade, full-featured, and Open Source
toolkit implementing the Secure Sockets Layer (SSL v2/v3) and
Transport Layer Security (TLS v1) protocols as well as a
full-... | from spack import *
class Openssl(Package):
"""The OpenSSL Project is a collaborative effort to develop a
robust, commercial-grade, full-featured, and Open Source
toolkit implementing the Secure Sockets Layer (SSL v2/v3) and
Transport Layer Security (TLS v1) protocols as well as a
full-... | Make OpenSSL build on Darwin | Make OpenSSL build on Darwin
| Python | lgpl-2.1 | matthiasdiener/spack,EmreAtes/spack,krafczyk/spack,iulian787/spack,matthiasdiener/spack,tmerrick1/spack,krafczyk/spack,lgarren/spack,TheTimmy/spack,iulian787/spack,EmreAtes/spack,EmreAtes/spack,skosukhin/spack,krafczyk/spack,mfherbst/spack,LLNL/spack,mfherbst/spack,skosukhin/spack,krafczyk/spack,mfherbst/spack,tmerrick... | from spack import *
class Openssl(Package):
"""The OpenSSL Project is a collaborative effort to develop a
robust, commercial-grade, full-featured, and Open Source
toolkit implementing the Secure Sockets Layer (SSL v2/v3) and
Transport Layer Security (TLS v1) protocols as well as a
full-... | from spack import *
class Openssl(Package):
"""The OpenSSL Project is a collaborative effort to develop a
robust, commercial-grade, full-featured, and Open Source
toolkit implementing the Secure Sockets Layer (SSL v2/v3) and
Transport Layer Security (TLS v1) protocols as well as a
full-... | <commit_before>from spack import *
class Openssl(Package):
"""The OpenSSL Project is a collaborative effort to develop a
robust, commercial-grade, full-featured, and Open Source
toolkit implementing the Secure Sockets Layer (SSL v2/v3) and
Transport Layer Security (TLS v1) protocols as well as... | from spack import *
class Openssl(Package):
"""The OpenSSL Project is a collaborative effort to develop a
robust, commercial-grade, full-featured, and Open Source
toolkit implementing the Secure Sockets Layer (SSL v2/v3) and
Transport Layer Security (TLS v1) protocols as well as a
full-... | from spack import *
class Openssl(Package):
"""The OpenSSL Project is a collaborative effort to develop a
robust, commercial-grade, full-featured, and Open Source
toolkit implementing the Secure Sockets Layer (SSL v2/v3) and
Transport Layer Security (TLS v1) protocols as well as a
full-... | <commit_before>from spack import *
class Openssl(Package):
"""The OpenSSL Project is a collaborative effort to develop a
robust, commercial-grade, full-featured, and Open Source
toolkit implementing the Secure Sockets Layer (SSL v2/v3) and
Transport Layer Security (TLS v1) protocols as well as... |
302927c95c5c75a1a8c10d2aa939f1a33dcdbdaa | algo_prep/dfs.py | algo_prep/dfs.py | class Node(object):
def __init__(self, value, children=None):
self.value = value
if children is None:
self.children = []
else:
self.children = children
def dfs(tree, value): # Check that value is in tree
if tree.value == value:
return True
else:
... | Add simple DFS in python | Add simple DFS in python
| Python | mit | WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox | Add simple DFS in python | class Node(object):
def __init__(self, value, children=None):
self.value = value
if children is None:
self.children = []
else:
self.children = children
def dfs(tree, value): # Check that value is in tree
if tree.value == value:
return True
else:
... | <commit_before><commit_msg>Add simple DFS in python<commit_after> | class Node(object):
def __init__(self, value, children=None):
self.value = value
if children is None:
self.children = []
else:
self.children = children
def dfs(tree, value): # Check that value is in tree
if tree.value == value:
return True
else:
... | Add simple DFS in pythonclass Node(object):
def __init__(self, value, children=None):
self.value = value
if children is None:
self.children = []
else:
self.children = children
def dfs(tree, value): # Check that value is in tree
if tree.value == value:
ret... | <commit_before><commit_msg>Add simple DFS in python<commit_after>class Node(object):
def __init__(self, value, children=None):
self.value = value
if children is None:
self.children = []
else:
self.children = children
def dfs(tree, value): # Check that value is in tre... | |
5394e71f93fbd3602455217974d3a1777f7967af | cabby/geo/directions.py | cabby/geo/directions.py | # coding=utf-8
# Copyright 2020 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | Add module for enumerating direction types and converting angles into them. | Add module for enumerating direction types and converting angles into them.
| Python | apache-2.0 | googleinterns/cabby,googleinterns/cabby,googleinterns/cabby,googleinterns/cabby | Add module for enumerating direction types and converting angles into them. | # coding=utf-8
# Copyright 2020 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | <commit_before><commit_msg>Add module for enumerating direction types and converting angles into them.<commit_after> | # coding=utf-8
# Copyright 2020 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | Add module for enumerating direction types and converting angles into them.# coding=utf-8
# Copyright 2020 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | <commit_before><commit_msg>Add module for enumerating direction types and converting angles into them.<commit_after># coding=utf-8
# Copyright 2020 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of t... | |
e1c091a4e31b346bbe9b2bffc33ccf4e82ef1beb | pre_commit_hooks/check_yaml.py | pre_commit_hooks/check_yaml.py | from __future__ import print_function
import argparse
import sys
import yaml
def check_yaml(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument('filenames', nargs='*', help='Yaml filenames to check.')
args = parser.parse_args(argv)
retval = 0
for filename in args.filenames:
... | from __future__ import print_function
import argparse
import sys
import yaml
try:
from yaml.cyaml import CLoader as Loader
except ImportError: # pragma: no cover (no libyaml-dev / pypy)
Loader = yaml.Loader
def check_yaml(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument('filenam... | Use the CLoader when present to validate yaml | Use the CLoader when present to validate yaml
| Python | mit | jordant/pre-commit-hooks,Harwood/pre-commit-hooks,chriskuehl/pre-commit-hooks,pre-commit/pre-commit-hooks,bgschiller/pre-commit-hooks,arahayrabedian/pre-commit-hooks,Coverfox/pre-commit-hooks,dupuy/pre-commit-hooks,jordant/pre-commit-hooks | from __future__ import print_function
import argparse
import sys
import yaml
def check_yaml(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument('filenames', nargs='*', help='Yaml filenames to check.')
args = parser.parse_args(argv)
retval = 0
for filename in args.filenames:
... | from __future__ import print_function
import argparse
import sys
import yaml
try:
from yaml.cyaml import CLoader as Loader
except ImportError: # pragma: no cover (no libyaml-dev / pypy)
Loader = yaml.Loader
def check_yaml(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument('filenam... | <commit_before>from __future__ import print_function
import argparse
import sys
import yaml
def check_yaml(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument('filenames', nargs='*', help='Yaml filenames to check.')
args = parser.parse_args(argv)
retval = 0
for filename in args.f... | from __future__ import print_function
import argparse
import sys
import yaml
try:
from yaml.cyaml import CLoader as Loader
except ImportError: # pragma: no cover (no libyaml-dev / pypy)
Loader = yaml.Loader
def check_yaml(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument('filenam... | from __future__ import print_function
import argparse
import sys
import yaml
def check_yaml(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument('filenames', nargs='*', help='Yaml filenames to check.')
args = parser.parse_args(argv)
retval = 0
for filename in args.filenames:
... | <commit_before>from __future__ import print_function
import argparse
import sys
import yaml
def check_yaml(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument('filenames', nargs='*', help='Yaml filenames to check.')
args = parser.parse_args(argv)
retval = 0
for filename in args.f... |
7b629cb8ad631ad10a818638af78e14efaa657a1 | lintcode/Medium/107_Word_Break.py | lintcode/Medium/107_Word_Break.py | class Solution:
# @param s: A string s
# @param dict: A dictionary of words dict
def wordBreak(self, s, dict):
# write your code here
if (not s):
return True
dp = []
for i in range(1, len(s) + 1):
tmp = s[:i]
if (tmp in dict):
... | Add solution to lintcode question 107 | Add solution to lintcode question 107
| Python | mit | Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode | Add solution to lintcode question 107 | class Solution:
# @param s: A string s
# @param dict: A dictionary of words dict
def wordBreak(self, s, dict):
# write your code here
if (not s):
return True
dp = []
for i in range(1, len(s) + 1):
tmp = s[:i]
if (tmp in dict):
... | <commit_before><commit_msg>Add solution to lintcode question 107<commit_after> | class Solution:
# @param s: A string s
# @param dict: A dictionary of words dict
def wordBreak(self, s, dict):
# write your code here
if (not s):
return True
dp = []
for i in range(1, len(s) + 1):
tmp = s[:i]
if (tmp in dict):
... | Add solution to lintcode question 107class Solution:
# @param s: A string s
# @param dict: A dictionary of words dict
def wordBreak(self, s, dict):
# write your code here
if (not s):
return True
dp = []
for i in range(1, len(s) + 1):
tmp = s[:i]
... | <commit_before><commit_msg>Add solution to lintcode question 107<commit_after>class Solution:
# @param s: A string s
# @param dict: A dictionary of words dict
def wordBreak(self, s, dict):
# write your code here
if (not s):
return True
dp = []
for i in range(1, le... | |
719a175c2acc7d5bd4fedae1bd8d9bcd579ea0f4 | angr/procedures/java_jni/GetArrayElements.py | angr/procedures/java_jni/GetArrayElements.py | from . import JNISimProcedure
from ...engines.soot.values.arrayref import SimSootValue_ArrayRef
class GetArrayElements(JNISimProcedure):
return_ty = 'reference'
def run(self, ptr_env, array, ptr_isCopy):
array_ref = self.lookup_local_reference(array)
elements = self.load_java_array(array_ref)... | Add base for JNI function Get*ArrayElements | Add base for JNI function Get*ArrayElements
| Python | bsd-2-clause | iamahuman/angr,angr/angr,schieb/angr,schieb/angr,iamahuman/angr,angr/angr,angr/angr,iamahuman/angr,schieb/angr | Add base for JNI function Get*ArrayElements | from . import JNISimProcedure
from ...engines.soot.values.arrayref import SimSootValue_ArrayRef
class GetArrayElements(JNISimProcedure):
return_ty = 'reference'
def run(self, ptr_env, array, ptr_isCopy):
array_ref = self.lookup_local_reference(array)
elements = self.load_java_array(array_ref)... | <commit_before><commit_msg>Add base for JNI function Get*ArrayElements<commit_after> | from . import JNISimProcedure
from ...engines.soot.values.arrayref import SimSootValue_ArrayRef
class GetArrayElements(JNISimProcedure):
return_ty = 'reference'
def run(self, ptr_env, array, ptr_isCopy):
array_ref = self.lookup_local_reference(array)
elements = self.load_java_array(array_ref)... | Add base for JNI function Get*ArrayElementsfrom . import JNISimProcedure
from ...engines.soot.values.arrayref import SimSootValue_ArrayRef
class GetArrayElements(JNISimProcedure):
return_ty = 'reference'
def run(self, ptr_env, array, ptr_isCopy):
array_ref = self.lookup_local_reference(array)
... | <commit_before><commit_msg>Add base for JNI function Get*ArrayElements<commit_after>from . import JNISimProcedure
from ...engines.soot.values.arrayref import SimSootValue_ArrayRef
class GetArrayElements(JNISimProcedure):
return_ty = 'reference'
def run(self, ptr_env, array, ptr_isCopy):
array_ref = s... | |
f06b8964188e534f148c6fd19cddea4bad410e25 | herders/migrations/0003_auto_20150705_0103.py | herders/migrations/0003_auto_20150705_0103.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('herders', '0002_team_leader'),
]
operations = [
migrations.AlterModelOptions(
name='team',
options={... | Add migrations from previous model changes | Add migrations from previous model changes
| Python | apache-2.0 | porksmash/swarfarm,porksmash/swarfarm,PeteAndersen/swarfarm,PeteAndersen/swarfarm,PeteAndersen/swarfarm,PeteAndersen/swarfarm,porksmash/swarfarm,porksmash/swarfarm | Add migrations from previous model changes | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('herders', '0002_team_leader'),
]
operations = [
migrations.AlterModelOptions(
name='team',
options={... | <commit_before><commit_msg>Add migrations from previous model changes<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('herders', '0002_team_leader'),
]
operations = [
migrations.AlterModelOptions(
name='team',
options={... | Add migrations from previous model changes# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('herders', '0002_team_leader'),
]
operations = [
migrations.AlterModelOptions(
... | <commit_before><commit_msg>Add migrations from previous model changes<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('herders', '0002_team_leader'),
]
operations = [
... | |
586fc2f07dfb75a1f844eac96750c558e93a30f7 | hs_core/migrations/0054_auto_20201028_1432.py | hs_core/migrations/0054_auto_20201028_1432.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-10-28 14:32
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hs_core', '0053_auto_20200826_1629'),
]
operations = [
migrations.AlterFie... | Add migration for task notifications | Add migration for task notifications
| Python | bsd-3-clause | hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare | Add migration for task notifications | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-10-28 14:32
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hs_core', '0053_auto_20200826_1629'),
]
operations = [
migrations.AlterFie... | <commit_before><commit_msg>Add migration for task notifications<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-10-28 14:32
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hs_core', '0053_auto_20200826_1629'),
]
operations = [
migrations.AlterFie... | Add migration for task notifications# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-10-28 14:32
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hs_core', '0053_auto_20200826_1629'),
]
operat... | <commit_before><commit_msg>Add migration for task notifications<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-10-28 14:32
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hs_core', '005... | |
ab09236b02ac3623d0f5f9cdc680a9bb5f641bdf | lib/windspharm/tests/test_coding_standards.py | lib/windspharm/tests/test_coding_standards.py | """Tests coding standards compliance."""
# Copyright (c) 2016 Andrew Dawson
#
# 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... | Add a test for coding standards. | Add a test for coding standards.
| Python | mit | ajdawson/windspharm | Add a test for coding standards. | """Tests coding standards compliance."""
# Copyright (c) 2016 Andrew Dawson
#
# 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... | <commit_before><commit_msg>Add a test for coding standards.<commit_after> | """Tests coding standards compliance."""
# Copyright (c) 2016 Andrew Dawson
#
# 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... | Add a test for coding standards."""Tests coding standards compliance."""
# Copyright (c) 2016 Andrew Dawson
#
# 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 wi... | <commit_before><commit_msg>Add a test for coding standards.<commit_after>"""Tests coding standards compliance."""
# Copyright (c) 2016 Andrew Dawson
#
# 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 S... | |
d70eb3aa6aeebd35e3753151281d558618eb76ee | i18n/tests/test_compiled_messages.py | i18n/tests/test_compiled_messages.py | """
Test that the compiled .mo files match the translations in the
uncompiled .po files.
This is required because we are checking in the .mo files into
the repo, but compiling them is a manual process. We want to make
sure that we find out if someone forgets the compilation step.
"""
import ddt
import polib
from unit... | Add a test that validates that the .po and .mo files match for all active languages | Add a test that validates that the .po and .mo files match for all active languages
| Python | agpl-3.0 | jzoldak/edx-platform,jazkarta/edx-platform,Shrhawk/edx-platform,don-github/edx-platform,vismartltd/edx-platform,RPI-OPENEDX/edx-platform,dkarakats/edx-platform,jswope00/griffinx,ovnicraft/edx-platform,zerobatu/edx-platform,chrisndodge/edx-platform,rhndg/openedx,pepeportela/edx-platform,wwj718/ANALYSE,ahmadiga/min_edx,d... | Add a test that validates that the .po and .mo files match for all active languages | """
Test that the compiled .mo files match the translations in the
uncompiled .po files.
This is required because we are checking in the .mo files into
the repo, but compiling them is a manual process. We want to make
sure that we find out if someone forgets the compilation step.
"""
import ddt
import polib
from unit... | <commit_before><commit_msg>Add a test that validates that the .po and .mo files match for all active languages<commit_after> | """
Test that the compiled .mo files match the translations in the
uncompiled .po files.
This is required because we are checking in the .mo files into
the repo, but compiling them is a manual process. We want to make
sure that we find out if someone forgets the compilation step.
"""
import ddt
import polib
from unit... | Add a test that validates that the .po and .mo files match for all active languages"""
Test that the compiled .mo files match the translations in the
uncompiled .po files.
This is required because we are checking in the .mo files into
the repo, but compiling them is a manual process. We want to make
sure that we find ... | <commit_before><commit_msg>Add a test that validates that the .po and .mo files match for all active languages<commit_after>"""
Test that the compiled .mo files match the translations in the
uncompiled .po files.
This is required because we are checking in the .mo files into
the repo, but compiling them is a manual pr... | |
528107bad66cc2eb9e56a7964e16eb66b4beddf7 | fabfile.py | fabfile.py | from fabric.api import (
local,
settings,
task
)
from fabric.state import env
SWARM101_NETWORK = 'swarm101'
@task
def localhost():
env.run = local
@task
def swarm_init(subnet='192.168.0.0/24'):
env.run('docker swarm init')
command = 'docker network create -d overlay ' + \
'--subne... | Use fabric to start/end a swarm | Use fabric to start/end a swarm
| Python | mit | zkan/microservices-with-swarm-101,zkan/microservices-with-swarm-101,zkan/microservices-with-swarm-101,zkan/microservices-with-swarm-101 | Use fabric to start/end a swarm | from fabric.api import (
local,
settings,
task
)
from fabric.state import env
SWARM101_NETWORK = 'swarm101'
@task
def localhost():
env.run = local
@task
def swarm_init(subnet='192.168.0.0/24'):
env.run('docker swarm init')
command = 'docker network create -d overlay ' + \
'--subne... | <commit_before><commit_msg>Use fabric to start/end a swarm<commit_after> | from fabric.api import (
local,
settings,
task
)
from fabric.state import env
SWARM101_NETWORK = 'swarm101'
@task
def localhost():
env.run = local
@task
def swarm_init(subnet='192.168.0.0/24'):
env.run('docker swarm init')
command = 'docker network create -d overlay ' + \
'--subne... | Use fabric to start/end a swarmfrom fabric.api import (
local,
settings,
task
)
from fabric.state import env
SWARM101_NETWORK = 'swarm101'
@task
def localhost():
env.run = local
@task
def swarm_init(subnet='192.168.0.0/24'):
env.run('docker swarm init')
command = 'docker network create -d... | <commit_before><commit_msg>Use fabric to start/end a swarm<commit_after>from fabric.api import (
local,
settings,
task
)
from fabric.state import env
SWARM101_NETWORK = 'swarm101'
@task
def localhost():
env.run = local
@task
def swarm_init(subnet='192.168.0.0/24'):
env.run('docker swarm init')... | |
635d7beaff06d76bcdeddb386875f29fe132fb91 | Applications/SegmentVesselsCNNSeeds/SegmentVesselsCNNSeeds.py | Applications/SegmentVesselsCNNSeeds/SegmentVesselsCNNSeeds.py | #!/usr/bin/env python
import os.path
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.preprocessed is None... | #!/usr/bin/env python
import errno
import os
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.preprocessed... | Create the output directory as necessary | Create the output directory as necessary
| Python | apache-2.0 | aylward/ITKTubeTK,KitwareMedical/TubeTK,KitwareMedical/ITKTubeTK,KitwareMedical/TubeTK,aylward/ITKTubeTK,KitwareMedical/ITKTubeTK,thewtex/TubeTK,thewtex/TubeTK,aylward/ITKTubeTK,KitwareMedical/TubeTK,KitwareMedical/ITKTubeTK,thewtex/TubeTK,thewtex/TubeTK,KitwareMedical/ITKTubeTK,KitwareMedical/TubeTK,aylward/ITKTubeTK | #!/usr/bin/env python
import os.path
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.preprocessed is None... | #!/usr/bin/env python
import errno
import os
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.preprocessed... | <commit_before>#!/usr/bin/env python
import os.path
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.prepr... | #!/usr/bin/env python
import errno
import os
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.preprocessed... | #!/usr/bin/env python
import os.path
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.preprocessed is None... | <commit_before>#!/usr/bin/env python
import os.path
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.prepr... |
87f14e78e649487776585c0bb6f8253a12985ac5 | Applications/SegmentVesselsCNNSeeds/SegmentVesselsCNNSeeds.py | Applications/SegmentVesselsCNNSeeds/SegmentVesselsCNNSeeds.py | #!/usr/bin/env python
import errno
import os
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.preprocessed... | #!/usr/bin/env python
import errno
import os
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.preprocessed... | Create directory, if necessary, before preprocessing files as well | Create directory, if necessary, before preprocessing files as well
| Python | apache-2.0 | KitwareMedical/ITKTubeTK,KitwareMedical/TubeTK,thewtex/TubeTK,thewtex/TubeTK,KitwareMedical/TubeTK,thewtex/TubeTK,aylward/ITKTubeTK,aylward/ITKTubeTK,KitwareMedical/TubeTK,KitwareMedical/ITKTubeTK,KitwareMedical/ITKTubeTK,thewtex/TubeTK,KitwareMedical/TubeTK,KitwareMedical/ITKTubeTK,aylward/ITKTubeTK,aylward/ITKTubeTK | #!/usr/bin/env python
import errno
import os
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.preprocessed... | #!/usr/bin/env python
import errno
import os
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.preprocessed... | <commit_before>#!/usr/bin/env python
import errno
import os
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or ar... | #!/usr/bin/env python
import errno
import os
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.preprocessed... | #!/usr/bin/env python
import errno
import os
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or args.preprocessed... | <commit_before>#!/usr/bin/env python
import errno
import os
import ctk_cli
import keras.models as M
from tubetk.vseg.cnn import deploy, utils
script_params = utils.script_params
def main(args):
utils.set_params_path(args.params)
if (args.resampled is None) ^ (script_params['RESAMPLE_SPACING'] is None or ar... |
fe98703f789976df76a3275c8449d53f89a58ec1 | behave_django/testcase.py | behave_django/testcase.py | from django.contrib.staticfiles.testing import StaticLiveServerTestCase
class BehaviorDrivenTestCase(StaticLiveServerTestCase):
"""
Test case attached to the context during behave execution
This test case prevents the regular tests from running.
"""
def runTest(*args, **kwargs):
pass
c... | from django.contrib.staticfiles.testing import StaticLiveServerTestCase
class BehaviorDrivenTestCase(StaticLiveServerTestCase):
"""
Test case attached to the context during behave execution
This test case prevents the regular tests from running.
"""
def runTest(self):
pass
class Existi... | Fix Landscape complaint "Method has no argument" | Fix Landscape complaint "Method has no argument"
| Python | mit | behave/behave-django,bittner/behave-django,bittner/behave-django,behave/behave-django | from django.contrib.staticfiles.testing import StaticLiveServerTestCase
class BehaviorDrivenTestCase(StaticLiveServerTestCase):
"""
Test case attached to the context during behave execution
This test case prevents the regular tests from running.
"""
def runTest(*args, **kwargs):
pass
c... | from django.contrib.staticfiles.testing import StaticLiveServerTestCase
class BehaviorDrivenTestCase(StaticLiveServerTestCase):
"""
Test case attached to the context during behave execution
This test case prevents the regular tests from running.
"""
def runTest(self):
pass
class Existi... | <commit_before>from django.contrib.staticfiles.testing import StaticLiveServerTestCase
class BehaviorDrivenTestCase(StaticLiveServerTestCase):
"""
Test case attached to the context during behave execution
This test case prevents the regular tests from running.
"""
def runTest(*args, **kwargs):
... | from django.contrib.staticfiles.testing import StaticLiveServerTestCase
class BehaviorDrivenTestCase(StaticLiveServerTestCase):
"""
Test case attached to the context during behave execution
This test case prevents the regular tests from running.
"""
def runTest(self):
pass
class Existi... | from django.contrib.staticfiles.testing import StaticLiveServerTestCase
class BehaviorDrivenTestCase(StaticLiveServerTestCase):
"""
Test case attached to the context during behave execution
This test case prevents the regular tests from running.
"""
def runTest(*args, **kwargs):
pass
c... | <commit_before>from django.contrib.staticfiles.testing import StaticLiveServerTestCase
class BehaviorDrivenTestCase(StaticLiveServerTestCase):
"""
Test case attached to the context during behave execution
This test case prevents the regular tests from running.
"""
def runTest(*args, **kwargs):
... |
47ca83aae45ac4d71c10f4a93c644d5df7e8e0e3 | models/a3c/test_data_generator.py | models/a3c/test_data_generator.py | # Generate test data in FDAX datafile format
# Hack as needed
from math import sin, pi
price_anchor = 9000.0
price_swing = 200.0
period = 1000
with open('FDAX_19700101.csv', 'w') as f:
for i in range(10000):
price = price_anchor + price_swing * sin(2*pi*i/period)
f.write('{} {} {} {} {} {} {} {}\... | Add test data generator (to be hacked as needed) | Add test data generator (to be hacked as needed)
| Python | mit | lukovkin/ufcnn-keras,lukovkin/ufcnn-keras | Add test data generator (to be hacked as needed) | # Generate test data in FDAX datafile format
# Hack as needed
from math import sin, pi
price_anchor = 9000.0
price_swing = 200.0
period = 1000
with open('FDAX_19700101.csv', 'w') as f:
for i in range(10000):
price = price_anchor + price_swing * sin(2*pi*i/period)
f.write('{} {} {} {} {} {} {} {}\... | <commit_before><commit_msg>Add test data generator (to be hacked as needed)<commit_after> | # Generate test data in FDAX datafile format
# Hack as needed
from math import sin, pi
price_anchor = 9000.0
price_swing = 200.0
period = 1000
with open('FDAX_19700101.csv', 'w') as f:
for i in range(10000):
price = price_anchor + price_swing * sin(2*pi*i/period)
f.write('{} {} {} {} {} {} {} {}\... | Add test data generator (to be hacked as needed)# Generate test data in FDAX datafile format
# Hack as needed
from math import sin, pi
price_anchor = 9000.0
price_swing = 200.0
period = 1000
with open('FDAX_19700101.csv', 'w') as f:
for i in range(10000):
price = price_anchor + price_swing * sin(2*pi*i/p... | <commit_before><commit_msg>Add test data generator (to be hacked as needed)<commit_after># Generate test data in FDAX datafile format
# Hack as needed
from math import sin, pi
price_anchor = 9000.0
price_swing = 200.0
period = 1000
with open('FDAX_19700101.csv', 'w') as f:
for i in range(10000):
price = ... | |
03634f90e95c1c218e9060aa531da2c4a77fe52d | oidc_provider/tests/test_userinfo_endpoint.py | oidc_provider/tests/test_userinfo_endpoint.py | from datetime import timedelta
from django.core.urlresolvers import reverse
from django.test import RequestFactory
from django.test import TestCase
from django.utils import timezone
from oidc_provider.lib.utils.token import *
from oidc_provider.models import *
from oidc_provider.tests.utils import *
from oidc_provide... | Add tests for userinfo endpoint. | Add tests for userinfo endpoint.
| Python | mit | wojtek-fliposports/django-oidc-provider,bunnyinc/django-oidc-provider,juanifioren/django-oidc-provider,django-py/django-openid-provider,wayward710/django-oidc-provider,Sjord/django-oidc-provider,Sjord/django-oidc-provider,ByteInternet/django-oidc-provider,torreco/django-oidc-provider,bunnyinc/django-oidc-provider,djang... | Add tests for userinfo endpoint. | from datetime import timedelta
from django.core.urlresolvers import reverse
from django.test import RequestFactory
from django.test import TestCase
from django.utils import timezone
from oidc_provider.lib.utils.token import *
from oidc_provider.models import *
from oidc_provider.tests.utils import *
from oidc_provide... | <commit_before><commit_msg>Add tests for userinfo endpoint.<commit_after> | from datetime import timedelta
from django.core.urlresolvers import reverse
from django.test import RequestFactory
from django.test import TestCase
from django.utils import timezone
from oidc_provider.lib.utils.token import *
from oidc_provider.models import *
from oidc_provider.tests.utils import *
from oidc_provide... | Add tests for userinfo endpoint.from datetime import timedelta
from django.core.urlresolvers import reverse
from django.test import RequestFactory
from django.test import TestCase
from django.utils import timezone
from oidc_provider.lib.utils.token import *
from oidc_provider.models import *
from oidc_provider.tests.... | <commit_before><commit_msg>Add tests for userinfo endpoint.<commit_after>from datetime import timedelta
from django.core.urlresolvers import reverse
from django.test import RequestFactory
from django.test import TestCase
from django.utils import timezone
from oidc_provider.lib.utils.token import *
from oidc_provider.... | |
7ed56fcbe3c4a9c465bf3b67260fc5e326339ba1 | statsmodels/graphics/tests/test_factorplots.py | statsmodels/graphics/tests/test_factorplots.py | import numpy as np
from pandas import Series
import matplotlib.pyplot as plt
from statsmodels.graphics.factorplots import interaction_plot
class TestInteractionPlot(object):
@classmethod
def setupClass(cls):
np.random.seed(12345)
cls.weight = np.random.randint(1,4,size=60)
cls.duration... | Add smoke tests for interaction_plot | ENH: Add smoke tests for interaction_plot
| Python | bsd-3-clause | bsipocz/statsmodels,hlin117/statsmodels,wzbozon/statsmodels,bashtage/statsmodels,DonBeo/statsmodels,statsmodels/statsmodels,ChadFulton/statsmodels,gef756/statsmodels,astocko/statsmodels,josef-pkt/statsmodels,wwf5067/statsmodels,statsmodels/statsmodels,yl565/statsmodels,phobson/statsmodels,hlin117/statsmodels,bert9bert/... | ENH: Add smoke tests for interaction_plot | import numpy as np
from pandas import Series
import matplotlib.pyplot as plt
from statsmodels.graphics.factorplots import interaction_plot
class TestInteractionPlot(object):
@classmethod
def setupClass(cls):
np.random.seed(12345)
cls.weight = np.random.randint(1,4,size=60)
cls.duration... | <commit_before><commit_msg>ENH: Add smoke tests for interaction_plot<commit_after> | import numpy as np
from pandas import Series
import matplotlib.pyplot as plt
from statsmodels.graphics.factorplots import interaction_plot
class TestInteractionPlot(object):
@classmethod
def setupClass(cls):
np.random.seed(12345)
cls.weight = np.random.randint(1,4,size=60)
cls.duration... | ENH: Add smoke tests for interaction_plotimport numpy as np
from pandas import Series
import matplotlib.pyplot as plt
from statsmodels.graphics.factorplots import interaction_plot
class TestInteractionPlot(object):
@classmethod
def setupClass(cls):
np.random.seed(12345)
cls.weight = np.random.... | <commit_before><commit_msg>ENH: Add smoke tests for interaction_plot<commit_after>import numpy as np
from pandas import Series
import matplotlib.pyplot as plt
from statsmodels.graphics.factorplots import interaction_plot
class TestInteractionPlot(object):
@classmethod
def setupClass(cls):
np.random.se... | |
778713a632e10fa63e7ff653f1e1300d0f4fcaed | main.py | main.py | #ODB2 datalogger
import odb
connection = obd.OBD()
while true:
request = connection.query(obd.commands.RPM)
if not r.is_null():
print(r.value) | Test script for obd library | Test script for obd library
| Python | mit | ProtaconSolutions/iot-hackday-2015-obd2 | Test script for obd library | #ODB2 datalogger
import odb
connection = obd.OBD()
while true:
request = connection.query(obd.commands.RPM)
if not r.is_null():
print(r.value) | <commit_before><commit_msg>Test script for obd library<commit_after> | #ODB2 datalogger
import odb
connection = obd.OBD()
while true:
request = connection.query(obd.commands.RPM)
if not r.is_null():
print(r.value) | Test script for obd library#ODB2 datalogger
import odb
connection = obd.OBD()
while true:
request = connection.query(obd.commands.RPM)
if not r.is_null():
print(r.value) | <commit_before><commit_msg>Test script for obd library<commit_after>#ODB2 datalogger
import odb
connection = obd.OBD()
while true:
request = connection.query(obd.commands.RPM)
if not r.is_null():
print(r.value) | |
00d957a2dbfe6a0e15ce609a3994d4065daf0f0d | tests/test_playplaylist.py | tests/test_playplaylist.py | #!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, unicode_literals
import os
import os.path
import nose.tools as nose
from tests.utils import run_filter
def test_query_ignore_case():
"""should ignore case when querying playlists"""
results = run_filter('playplaylist', 'GuARDians'... | Add tests for playplaylist filter | Add tests for playplaylist filter
| Python | mit | caleb531/play-song,caleb531/play-song | Add tests for playplaylist filter | #!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, unicode_literals
import os
import os.path
import nose.tools as nose
from tests.utils import run_filter
def test_query_ignore_case():
"""should ignore case when querying playlists"""
results = run_filter('playplaylist', 'GuARDians'... | <commit_before><commit_msg>Add tests for playplaylist filter<commit_after> | #!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, unicode_literals
import os
import os.path
import nose.tools as nose
from tests.utils import run_filter
def test_query_ignore_case():
"""should ignore case when querying playlists"""
results = run_filter('playplaylist', 'GuARDians'... | Add tests for playplaylist filter#!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, unicode_literals
import os
import os.path
import nose.tools as nose
from tests.utils import run_filter
def test_query_ignore_case():
"""should ignore case when querying playlists"""
results = run_f... | <commit_before><commit_msg>Add tests for playplaylist filter<commit_after>#!/usr/bin/env python
# coding=utf-8
from __future__ import print_function, unicode_literals
import os
import os.path
import nose.tools as nose
from tests.utils import run_filter
def test_query_ignore_case():
"""should ignore case when ... | |
be9426b353013c19a8b158032486ad08f9a33e5f | tests/tests_imagemagick.py | tests/tests_imagemagick.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import shutil
import unittest
class TestBinariesInPath(unittest.TestCase):
"""
TODO: Docstring
"""
def setUp(self):
pass
def tearDown(self):
pass
def test_identify_binary_in_path(self):
self.assertIsNotNone(shutil.whic... | Test if identify binary is in PATH | Test if identify binary is in PATH
| Python | bsd-2-clause | sjktje/sjkscan,sjktje/sjkscan | Test if identify binary is in PATH | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import shutil
import unittest
class TestBinariesInPath(unittest.TestCase):
"""
TODO: Docstring
"""
def setUp(self):
pass
def tearDown(self):
pass
def test_identify_binary_in_path(self):
self.assertIsNotNone(shutil.whic... | <commit_before><commit_msg>Test if identify binary is in PATH<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import shutil
import unittest
class TestBinariesInPath(unittest.TestCase):
"""
TODO: Docstring
"""
def setUp(self):
pass
def tearDown(self):
pass
def test_identify_binary_in_path(self):
self.assertIsNotNone(shutil.whic... | Test if identify binary is in PATH#!/usr/bin/env python
# -*- coding: utf-8 -*-
import shutil
import unittest
class TestBinariesInPath(unittest.TestCase):
"""
TODO: Docstring
"""
def setUp(self):
pass
def tearDown(self):
pass
def test_identify_binary_in_path(self):
... | <commit_before><commit_msg>Test if identify binary is in PATH<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import shutil
import unittest
class TestBinariesInPath(unittest.TestCase):
"""
TODO: Docstring
"""
def setUp(self):
pass
def tearDown(self):
pass
def t... | |
f64bb3ffb8840986bc5fc6d0a85c3ec9fb375e22 | vlog_to_pbtype.py | vlog_to_pbtype.py | #!/usr/bin/python3
import yosys_exec
import lxml.etree as ET
import argparse, re
import os, tempfile
from yosys_json import YosysJson
"""
Convert a Verilog simulation model to a VPR `pb_type.xml`
The following Verilog attributes are allowed on instances:
- (* PB_PATH="../path/to/pb_type.xml" *) : import the pb_ty... | Add a specification for the pb_type.xml generator | Add a specification for the pb_type.xml generator
Signed-off-by: David Shah <[email protected]>
| Python | isc | SymbiFlow/python-symbiflow-v2x,SymbiFlow/python-symbiflow-v2x | Add a specification for the pb_type.xml generator
Signed-off-by: David Shah <[email protected]> | #!/usr/bin/python3
import yosys_exec
import lxml.etree as ET
import argparse, re
import os, tempfile
from yosys_json import YosysJson
"""
Convert a Verilog simulation model to a VPR `pb_type.xml`
The following Verilog attributes are allowed on instances:
- (* PB_PATH="../path/to/pb_type.xml" *) : import the pb_ty... | <commit_before><commit_msg>Add a specification for the pb_type.xml generator
Signed-off-by: David Shah <[email protected]><commit_after> | #!/usr/bin/python3
import yosys_exec
import lxml.etree as ET
import argparse, re
import os, tempfile
from yosys_json import YosysJson
"""
Convert a Verilog simulation model to a VPR `pb_type.xml`
The following Verilog attributes are allowed on instances:
- (* PB_PATH="../path/to/pb_type.xml" *) : import the pb_ty... | Add a specification for the pb_type.xml generator
Signed-off-by: David Shah <[email protected]>#!/usr/bin/python3
import yosys_exec
import lxml.etree as ET
import argparse, re
import os, tempfile
from yosys_json import YosysJson
"""
Convert a Verilog simulation model to a VPR `pb_type... | <commit_before><commit_msg>Add a specification for the pb_type.xml generator
Signed-off-by: David Shah <[email protected]><commit_after>#!/usr/bin/python3
import yosys_exec
import lxml.etree as ET
import argparse, re
import os, tempfile
from yosys_json import YosysJson
"""
Convert a V... | |
d8d2f54ef8d75003dd6da9e936647af81479f6e1 | ulc.py | ulc.py | import wx
from wx.lib.agw import ultimatelistctrl as ULC
class TestUltimateListCtrl(ULC.UltimateListCtrl):
def __init__(self, parent, log):
ULC.UltimateListCtrl.__init__(self, parent, -1,
agwStyle=wx.LC_REPORT |
wx.LC_VIRTUAL |
... | Add UltimateListCtrl sample for virtual | Add UltimateListCtrl sample for virtual
| Python | mit | kosystem/Outliner | Add UltimateListCtrl sample for virtual | import wx
from wx.lib.agw import ultimatelistctrl as ULC
class TestUltimateListCtrl(ULC.UltimateListCtrl):
def __init__(self, parent, log):
ULC.UltimateListCtrl.__init__(self, parent, -1,
agwStyle=wx.LC_REPORT |
wx.LC_VIRTUAL |
... | <commit_before><commit_msg>Add UltimateListCtrl sample for virtual<commit_after> | import wx
from wx.lib.agw import ultimatelistctrl as ULC
class TestUltimateListCtrl(ULC.UltimateListCtrl):
def __init__(self, parent, log):
ULC.UltimateListCtrl.__init__(self, parent, -1,
agwStyle=wx.LC_REPORT |
wx.LC_VIRTUAL |
... | Add UltimateListCtrl sample for virtualimport wx
from wx.lib.agw import ultimatelistctrl as ULC
class TestUltimateListCtrl(ULC.UltimateListCtrl):
def __init__(self, parent, log):
ULC.UltimateListCtrl.__init__(self, parent, -1,
agwStyle=wx.LC_REPORT |
... | <commit_before><commit_msg>Add UltimateListCtrl sample for virtual<commit_after>import wx
from wx.lib.agw import ultimatelistctrl as ULC
class TestUltimateListCtrl(ULC.UltimateListCtrl):
def __init__(self, parent, log):
ULC.UltimateListCtrl.__init__(self, parent, -1,
... | |
eca6c15957e1ae3718ca2f258c09d53db0308a54 | bathy/extract_UTM.py | bathy/extract_UTM.py | #!/usr/bin/env python
import numpy
import matplotlib.pyplot as plt
import mpl_toolkits.basemap.pyproj as pyproj
import extract_bathy
import bathy
def convert_UTM2longlat(file_path, zone=14, out_path=None):
data = numpy.loadtxt(file_path)
projector = pyproj.Proj(proj='utm',zone='14')
longitude, latitude ... | Add UTM bathy extraction function | Add UTM bathy extraction function
| Python | mit | mandli/compsyn-geoclaw | Add UTM bathy extraction function | #!/usr/bin/env python
import numpy
import matplotlib.pyplot as plt
import mpl_toolkits.basemap.pyproj as pyproj
import extract_bathy
import bathy
def convert_UTM2longlat(file_path, zone=14, out_path=None):
data = numpy.loadtxt(file_path)
projector = pyproj.Proj(proj='utm',zone='14')
longitude, latitude ... | <commit_before><commit_msg>Add UTM bathy extraction function<commit_after> | #!/usr/bin/env python
import numpy
import matplotlib.pyplot as plt
import mpl_toolkits.basemap.pyproj as pyproj
import extract_bathy
import bathy
def convert_UTM2longlat(file_path, zone=14, out_path=None):
data = numpy.loadtxt(file_path)
projector = pyproj.Proj(proj='utm',zone='14')
longitude, latitude ... | Add UTM bathy extraction function#!/usr/bin/env python
import numpy
import matplotlib.pyplot as plt
import mpl_toolkits.basemap.pyproj as pyproj
import extract_bathy
import bathy
def convert_UTM2longlat(file_path, zone=14, out_path=None):
data = numpy.loadtxt(file_path)
projector = pyproj.Proj(proj='utm',zo... | <commit_before><commit_msg>Add UTM bathy extraction function<commit_after>#!/usr/bin/env python
import numpy
import matplotlib.pyplot as plt
import mpl_toolkits.basemap.pyproj as pyproj
import extract_bathy
import bathy
def convert_UTM2longlat(file_path, zone=14, out_path=None):
data = numpy.loadtxt(file_path)
... | |
1db62b97364d530efe6bc641029ed716bfd7a45f | saleor/userprofile/test_userprofile.py | saleor/userprofile/test_userprofile.py | import i18naddress
import pytest
from . import forms
@pytest.mark.parametrize('country', ['CN', 'PL', 'US'])
def test_address_form_for_country(country):
data = {
'first_name': 'John',
'last_name': 'Doe',
'country': country}
form = forms.AddressForm(data)
errors = form.errors
r... | Add basic tests for address validation | Add basic tests for address validation
| Python | bsd-3-clause | maferelo/saleor,maferelo/saleor,itbabu/saleor,mociepka/saleor,tfroehlich82/saleor,UITools/saleor,UITools/saleor,rodrigozn/CW-Shop,car3oon/saleor,KenMutemi/saleor,HyperManTT/ECommerceSaleor,UITools/saleor,rodrigozn/CW-Shop,KenMutemi/saleor,HyperManTT/ECommerceSaleor,itbabu/saleor,laosunhust/saleor,car3oon/saleor,tfroehl... | Add basic tests for address validation | import i18naddress
import pytest
from . import forms
@pytest.mark.parametrize('country', ['CN', 'PL', 'US'])
def test_address_form_for_country(country):
data = {
'first_name': 'John',
'last_name': 'Doe',
'country': country}
form = forms.AddressForm(data)
errors = form.errors
r... | <commit_before><commit_msg>Add basic tests for address validation<commit_after> | import i18naddress
import pytest
from . import forms
@pytest.mark.parametrize('country', ['CN', 'PL', 'US'])
def test_address_form_for_country(country):
data = {
'first_name': 'John',
'last_name': 'Doe',
'country': country}
form = forms.AddressForm(data)
errors = form.errors
r... | Add basic tests for address validationimport i18naddress
import pytest
from . import forms
@pytest.mark.parametrize('country', ['CN', 'PL', 'US'])
def test_address_form_for_country(country):
data = {
'first_name': 'John',
'last_name': 'Doe',
'country': country}
form = forms.AddressFor... | <commit_before><commit_msg>Add basic tests for address validation<commit_after>import i18naddress
import pytest
from . import forms
@pytest.mark.parametrize('country', ['CN', 'PL', 'US'])
def test_address_form_for_country(country):
data = {
'first_name': 'John',
'last_name': 'Doe',
'count... | |
3965effea3a251d69141e4ef4df6de8a2d5a5089 | shuup_tests/browser/admin/test_menu.py | shuup_tests/browser/admin/test_menu.py | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
import os
import pytest
from shuup.testing.browser_utils import w... | Add browser test for admin menu | Add browser test for admin menu
Refs SH-435
| Python | agpl-3.0 | suutari-ai/shoop,suutari/shoop,suutari/shoop,shoopio/shoop,shoopio/shoop,shoopio/shoop,suutari-ai/shoop,suutari-ai/shoop,suutari/shoop | Add browser test for admin menu
Refs SH-435 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
import os
import pytest
from shuup.testing.browser_utils import w... | <commit_before><commit_msg>Add browser test for admin menu
Refs SH-435<commit_after> | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
import os
import pytest
from shuup.testing.browser_utils import w... | Add browser test for admin menu
Refs SH-435# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
import os
import pytes... | <commit_before><commit_msg>Add browser test for admin menu
Refs SH-435<commit_after># -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of ... | |
f92ab83f4f8d9df627492af6b6f52bb08822485a | server/ntb/macros/en_to_no_macro.py | server/ntb/macros/en_to_no_macro.py | """
En to NO Metadata Macro will perform the following changes to current content item:
- change the byline to "(NPK-NTB)"
- change the signoff to "[email protected]"
- change the body footer to "(©NPK)" - NB: copyrightsign, not @
- change the service to "NPKSisteNytt"
"""
def en_to_no_metadata_... | Add translate example macro for NTB | feat(macro): Add translate example macro for NTB
| Python | agpl-3.0 | petrjasek/superdesk-ntb,petrjasek/superdesk-ntb,superdesk/superdesk-ntb,ioanpocol/superdesk-ntb,ioanpocol/superdesk-ntb,petrjasek/superdesk-ntb,superdesk/superdesk-ntb,superdesk/superdesk-ntb,ioanpocol/superdesk-ntb,superdesk/superdesk-ntb,petrjasek/superdesk-ntb | feat(macro): Add translate example macro for NTB | """
En to NO Metadata Macro will perform the following changes to current content item:
- change the byline to "(NPK-NTB)"
- change the signoff to "[email protected]"
- change the body footer to "(©NPK)" - NB: copyrightsign, not @
- change the service to "NPKSisteNytt"
"""
def en_to_no_metadata_... | <commit_before><commit_msg>feat(macro): Add translate example macro for NTB<commit_after> | """
En to NO Metadata Macro will perform the following changes to current content item:
- change the byline to "(NPK-NTB)"
- change the signoff to "[email protected]"
- change the body footer to "(©NPK)" - NB: copyrightsign, not @
- change the service to "NPKSisteNytt"
"""
def en_to_no_metadata_... | feat(macro): Add translate example macro for NTB"""
En to NO Metadata Macro will perform the following changes to current content item:
- change the byline to "(NPK-NTB)"
- change the signoff to "[email protected]"
- change the body footer to "(©NPK)" - NB: copyrightsign, not @
- change the service to... | <commit_before><commit_msg>feat(macro): Add translate example macro for NTB<commit_after>"""
En to NO Metadata Macro will perform the following changes to current content item:
- change the byline to "(NPK-NTB)"
- change the signoff to "[email protected]"
- change the body footer to "(©NPK)" - NB: copyrigh... | |
83b82b873224c601ca7efbec96e8fa26a9a284f4 | skan/test/test_vendored_correlate.py | skan/test/test_vendored_correlate.py | from contextlib import contextmanager
from time import time
import numpy as np
from skan.vendored import thresholding as th
@contextmanager
def timer():
result = [0.]
t = time()
yield result
result[0] = time() - t
def test_fast_sauvola():
image = np.random.rand(512, 512)
w0 = 25
w1 = 251... | Add test for new fast correlate | Add test for new fast correlate
| Python | bsd-3-clause | jni/skan | Add test for new fast correlate | from contextlib import contextmanager
from time import time
import numpy as np
from skan.vendored import thresholding as th
@contextmanager
def timer():
result = [0.]
t = time()
yield result
result[0] = time() - t
def test_fast_sauvola():
image = np.random.rand(512, 512)
w0 = 25
w1 = 251... | <commit_before><commit_msg>Add test for new fast correlate<commit_after> | from contextlib import contextmanager
from time import time
import numpy as np
from skan.vendored import thresholding as th
@contextmanager
def timer():
result = [0.]
t = time()
yield result
result[0] = time() - t
def test_fast_sauvola():
image = np.random.rand(512, 512)
w0 = 25
w1 = 251... | Add test for new fast correlatefrom contextlib import contextmanager
from time import time
import numpy as np
from skan.vendored import thresholding as th
@contextmanager
def timer():
result = [0.]
t = time()
yield result
result[0] = time() - t
def test_fast_sauvola():
image = np.random.rand(512... | <commit_before><commit_msg>Add test for new fast correlate<commit_after>from contextlib import contextmanager
from time import time
import numpy as np
from skan.vendored import thresholding as th
@contextmanager
def timer():
result = [0.]
t = time()
yield result
result[0] = time() - t
def test_fast_... | |
17d1a9f41f91c03b640a112313c9afb068a4ead4 | auth_mac/tools.py | auth_mac/tools.py |
import datetime
import hmac, hashlib, base64
def _build_authheader(method, data):
datastr = ", ".join(['{0}="{1}"'.format(x, y) for x, y in data.iteritems()])
return "{0} {1}".format(method, datastr)
class Signature(object):
"A class to ease the creation of MAC signatures"
MAC = None
def __init__(self, cr... | Move the signature class into it's own tool .py | Move the signature class into it's own tool .py
| Python | mit | ndevenish/auth_mac | Move the signature class into it's own tool .py |
import datetime
import hmac, hashlib, base64
def _build_authheader(method, data):
datastr = ", ".join(['{0}="{1}"'.format(x, y) for x, y in data.iteritems()])
return "{0} {1}".format(method, datastr)
class Signature(object):
"A class to ease the creation of MAC signatures"
MAC = None
def __init__(self, cr... | <commit_before><commit_msg>Move the signature class into it's own tool .py<commit_after> |
import datetime
import hmac, hashlib, base64
def _build_authheader(method, data):
datastr = ", ".join(['{0}="{1}"'.format(x, y) for x, y in data.iteritems()])
return "{0} {1}".format(method, datastr)
class Signature(object):
"A class to ease the creation of MAC signatures"
MAC = None
def __init__(self, cr... | Move the signature class into it's own tool .py
import datetime
import hmac, hashlib, base64
def _build_authheader(method, data):
datastr = ", ".join(['{0}="{1}"'.format(x, y) for x, y in data.iteritems()])
return "{0} {1}".format(method, datastr)
class Signature(object):
"A class to ease the creation of MAC si... | <commit_before><commit_msg>Move the signature class into it's own tool .py<commit_after>
import datetime
import hmac, hashlib, base64
def _build_authheader(method, data):
datastr = ", ".join(['{0}="{1}"'.format(x, y) for x, y in data.iteritems()])
return "{0} {1}".format(method, datastr)
class Signature(object):
... | |
6b7b83ce2d54b43ae3b5bd5fa67ee34e603ccacb | gene.py | gene.py | import random
HUMAN_DNA_ELEMENTS = set(["A","C","G","T"])
def clone_gene(g):
return Gene(g.dna, g.elements, g.name)
class Gene:
# Gene - a sequence of DNAs.
# dna - a list which contains items from elements.
# elements - a set of element which is the basic component of dna.
def __init__(self, dna,... | Add a basic Gene class to contain a sequence of dna and support mutation. | Add a basic Gene class to contain a sequence of dna and support mutation.
| Python | mit | PyOCL/TSP,PyOCL/OpenCLGA,PyOCL/OpenCLGA,PyOCL/oclGA,PyOCL/oclGA,PyOCL/TSP,PyOCL/oclGA,PyOCL/OpenCLGA,PyOCL/oclGA | Add a basic Gene class to contain a sequence of dna and support mutation. | import random
HUMAN_DNA_ELEMENTS = set(["A","C","G","T"])
def clone_gene(g):
return Gene(g.dna, g.elements, g.name)
class Gene:
# Gene - a sequence of DNAs.
# dna - a list which contains items from elements.
# elements - a set of element which is the basic component of dna.
def __init__(self, dna,... | <commit_before><commit_msg>Add a basic Gene class to contain a sequence of dna and support mutation.<commit_after> | import random
HUMAN_DNA_ELEMENTS = set(["A","C","G","T"])
def clone_gene(g):
return Gene(g.dna, g.elements, g.name)
class Gene:
# Gene - a sequence of DNAs.
# dna - a list which contains items from elements.
# elements - a set of element which is the basic component of dna.
def __init__(self, dna,... | Add a basic Gene class to contain a sequence of dna and support mutation.import random
HUMAN_DNA_ELEMENTS = set(["A","C","G","T"])
def clone_gene(g):
return Gene(g.dna, g.elements, g.name)
class Gene:
# Gene - a sequence of DNAs.
# dna - a list which contains items from elements.
# elements - a set of... | <commit_before><commit_msg>Add a basic Gene class to contain a sequence of dna and support mutation.<commit_after>import random
HUMAN_DNA_ELEMENTS = set(["A","C","G","T"])
def clone_gene(g):
return Gene(g.dna, g.elements, g.name)
class Gene:
# Gene - a sequence of DNAs.
# dna - a list which contains items... | |
df8239b846b2f61b59751071c402f5d6b626abb1 | scripts/mbedtls_dev/bignum_mod_raw.py | scripts/mbedtls_dev/bignum_mod_raw.py | """Framework classes for generation of bignum mod_raw test cases."""
# Copyright The Mbed TLS Contributors
# SPDX-License-Identifier: Apache-2.0
#
# 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 a... | Add script for generating mod_raw test cases | Add script for generating mod_raw test cases
This commit only adds the boilerplate, no actual tests are added.
Signed-off-by: Janos Follath <[email protected]>
| Python | apache-2.0 | Mbed-TLS/mbedtls,ARMmbed/mbedtls,Mbed-TLS/mbedtls,Mbed-TLS/mbedtls,ARMmbed/mbedtls,ARMmbed/mbedtls,Mbed-TLS/mbedtls,ARMmbed/mbedtls | Add script for generating mod_raw test cases
This commit only adds the boilerplate, no actual tests are added.
Signed-off-by: Janos Follath <[email protected]> | """Framework classes for generation of bignum mod_raw test cases."""
# Copyright The Mbed TLS Contributors
# SPDX-License-Identifier: Apache-2.0
#
# 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 a... | <commit_before><commit_msg>Add script for generating mod_raw test cases
This commit only adds the boilerplate, no actual tests are added.
Signed-off-by: Janos Follath <[email protected]><commit_after> | """Framework classes for generation of bignum mod_raw test cases."""
# Copyright The Mbed TLS Contributors
# SPDX-License-Identifier: Apache-2.0
#
# 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 a... | Add script for generating mod_raw test cases
This commit only adds the boilerplate, no actual tests are added.
Signed-off-by: Janos Follath <[email protected]>"""Framework classes for generation of bignum mod_raw test cases."""
# Copyright The Mbed TLS Contributors
# SPDX-License-Identi... | <commit_before><commit_msg>Add script for generating mod_raw test cases
This commit only adds the boilerplate, no actual tests are added.
Signed-off-by: Janos Follath <[email protected]><commit_after>"""Framework classes for generation of bignum mod_raw test cases."""
# Copyright The Mb... | |
ef6d88b1caa830a2b095d80dff7d32f624517149 | src/Scripts/endtoend-constants.py | src/Scripts/endtoend-constants.py | from num2words import num2words
# Generate BitFunnel chunk data, with documents consisting of:
# {'one'}, {'one', 'two'}, {'one', 'two', 'three'}, ...
def print_numbers(num):
all_numbers = ""
for i in range(1, num+1):
english_number = num2words(i).replace(' ','-')
all_numbers += english_number... | Add script for generating simple chunk data. | Add script for generating simple chunk data.
| Python | mit | danluu/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,danluu/BitFunnel | Add script for generating simple chunk data. | from num2words import num2words
# Generate BitFunnel chunk data, with documents consisting of:
# {'one'}, {'one', 'two'}, {'one', 'two', 'three'}, ...
def print_numbers(num):
all_numbers = ""
for i in range(1, num+1):
english_number = num2words(i).replace(' ','-')
all_numbers += english_number... | <commit_before><commit_msg>Add script for generating simple chunk data.<commit_after> | from num2words import num2words
# Generate BitFunnel chunk data, with documents consisting of:
# {'one'}, {'one', 'two'}, {'one', 'two', 'three'}, ...
def print_numbers(num):
all_numbers = ""
for i in range(1, num+1):
english_number = num2words(i).replace(' ','-')
all_numbers += english_number... | Add script for generating simple chunk data.from num2words import num2words
# Generate BitFunnel chunk data, with documents consisting of:
# {'one'}, {'one', 'two'}, {'one', 'two', 'three'}, ...
def print_numbers(num):
all_numbers = ""
for i in range(1, num+1):
english_number = num2words(i).replace(' ... | <commit_before><commit_msg>Add script for generating simple chunk data.<commit_after>from num2words import num2words
# Generate BitFunnel chunk data, with documents consisting of:
# {'one'}, {'one', 'two'}, {'one', 'two', 'three'}, ...
def print_numbers(num):
all_numbers = ""
for i in range(1, num+1):
... | |
dad3a70d6fe3677f8324c1f177831d7eedd3fac5 | tests/processes/test_command.py | tests/processes/test_command.py | # Built-in module #
# Internal modules #
from plumbing.processes import prll_map
def add(xy):
x,y = xy
return x+y
inputs = [(5,5), (2,2), (20,30)]
results = prll_map(add, inputs)
print results | Test file for parallel map | Test file for parallel map
| Python | mit | xapple/plumbing | Test file for parallel map | # Built-in module #
# Internal modules #
from plumbing.processes import prll_map
def add(xy):
x,y = xy
return x+y
inputs = [(5,5), (2,2), (20,30)]
results = prll_map(add, inputs)
print results | <commit_before><commit_msg>Test file for parallel map<commit_after> | # Built-in module #
# Internal modules #
from plumbing.processes import prll_map
def add(xy):
x,y = xy
return x+y
inputs = [(5,5), (2,2), (20,30)]
results = prll_map(add, inputs)
print results | Test file for parallel map# Built-in module #
# Internal modules #
from plumbing.processes import prll_map
def add(xy):
x,y = xy
return x+y
inputs = [(5,5), (2,2), (20,30)]
results = prll_map(add, inputs)
print results | <commit_before><commit_msg>Test file for parallel map<commit_after># Built-in module #
# Internal modules #
from plumbing.processes import prll_map
def add(xy):
x,y = xy
return x+y
inputs = [(5,5), (2,2), (20,30)]
results = prll_map(add, inputs)
print results | |
e8baa80d9e958ce59c46c0cf4c43bdadac2707cd | joommf/minimisation_example.py | joommf/minimisation_example.py | def main():
from sim import Sim
from mesh import Mesh
from energies.exchange import Exchange
from energies.demag import Demag
from energies.zeeman import Zeeman
from drivers import evolver
# Mesh specification.
lx = ly = lz = 50e-9 # x, y, and z dimensions (m)
dx = dy = dz = 5e-9 #... | def main():
from sim import Sim
from mesh import Mesh
from energies.exchange import Exchange
from energies.demag import Demag
from energies.zeeman import Zeeman
from drivers import evolver
# Mesh specification.
lx = ly = lz = 50e-9 # x, y, and z dimensions (m)
dx = dy = dz = 5e-9 #... | Change minimisation example mif name | Change minimisation example mif name
| Python | bsd-2-clause | ryanpepper/oommf-python,fangohr/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,ryanpepper/oommf-python | def main():
from sim import Sim
from mesh import Mesh
from energies.exchange import Exchange
from energies.demag import Demag
from energies.zeeman import Zeeman
from drivers import evolver
# Mesh specification.
lx = ly = lz = 50e-9 # x, y, and z dimensions (m)
dx = dy = dz = 5e-9 #... | def main():
from sim import Sim
from mesh import Mesh
from energies.exchange import Exchange
from energies.demag import Demag
from energies.zeeman import Zeeman
from drivers import evolver
# Mesh specification.
lx = ly = lz = 50e-9 # x, y, and z dimensions (m)
dx = dy = dz = 5e-9 #... | <commit_before>def main():
from sim import Sim
from mesh import Mesh
from energies.exchange import Exchange
from energies.demag import Demag
from energies.zeeman import Zeeman
from drivers import evolver
# Mesh specification.
lx = ly = lz = 50e-9 # x, y, and z dimensions (m)
dx = dy... | def main():
from sim import Sim
from mesh import Mesh
from energies.exchange import Exchange
from energies.demag import Demag
from energies.zeeman import Zeeman
from drivers import evolver
# Mesh specification.
lx = ly = lz = 50e-9 # x, y, and z dimensions (m)
dx = dy = dz = 5e-9 #... | def main():
from sim import Sim
from mesh import Mesh
from energies.exchange import Exchange
from energies.demag import Demag
from energies.zeeman import Zeeman
from drivers import evolver
# Mesh specification.
lx = ly = lz = 50e-9 # x, y, and z dimensions (m)
dx = dy = dz = 5e-9 #... | <commit_before>def main():
from sim import Sim
from mesh import Mesh
from energies.exchange import Exchange
from energies.demag import Demag
from energies.zeeman import Zeeman
from drivers import evolver
# Mesh specification.
lx = ly = lz = 50e-9 # x, y, and z dimensions (m)
dx = dy... |
800beaf2cbff9fe42fe8879d5fbeaa650cb23980 | tools/humann2/transform_json_to_pkl.py | tools/humann2/transform_json_to_pkl.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import cPickle as pickle
import bz2
import json
import argparse
def transform_json_to_pkl(args):
with open(args.json_input, 'r') as json_file:
json_str = json_file.read()
metadata = json.loads(json_str)
for marker in metadata["markers"]:
... | Add python script to manage custom metaphlan2 db | Add python script to manage custom metaphlan2 db
| Python | apache-2.0 | ASaiM/galaxytools,ASaiM/galaxytools | Add python script to manage custom metaphlan2 db | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import cPickle as pickle
import bz2
import json
import argparse
def transform_json_to_pkl(args):
with open(args.json_input, 'r') as json_file:
json_str = json_file.read()
metadata = json.loads(json_str)
for marker in metadata["markers"]:
... | <commit_before><commit_msg>Add python script to manage custom metaphlan2 db<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import cPickle as pickle
import bz2
import json
import argparse
def transform_json_to_pkl(args):
with open(args.json_input, 'r') as json_file:
json_str = json_file.read()
metadata = json.loads(json_str)
for marker in metadata["markers"]:
... | Add python script to manage custom metaphlan2 db#!/usr/bin/env python
# -*- coding: utf-8 -*-
import cPickle as pickle
import bz2
import json
import argparse
def transform_json_to_pkl(args):
with open(args.json_input, 'r') as json_file:
json_str = json_file.read()
metadata = json.loads(json_str)
... | <commit_before><commit_msg>Add python script to manage custom metaphlan2 db<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import cPickle as pickle
import bz2
import json
import argparse
def transform_json_to_pkl(args):
with open(args.json_input, 'r') as json_file:
json_str = json_file.read()
... | |
027c107df3deb0a3d6c7b913eb6841f43adeb3e1 | wagtail/wagtaildocs/migrations/0006_copy_document_permissions_to_collections.py | wagtail/wagtaildocs/migrations/0006_copy_document_permissions_to_collections.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def get_document_permissions(apps):
# return a queryset of the 'add_document' and 'change_document' permissions
Permission = apps.get_model('auth.Permission')
ContentType = apps.get_model('contenttypes.Conten... | Add migration to copy global document permissions to the default collection | Add migration to copy global document permissions to the default collection
| Python | bsd-3-clause | rsalmaso/wagtail,timorieber/wagtail,kurtrwall/wagtail,rsalmaso/wagtail,FlipperPA/wagtail,torchbox/wagtail,gasman/wagtail,Toshakins/wagtail,mikedingjan/wagtail,iansprice/wagtail,mikedingjan/wagtail,thenewguy/wagtail,hamsterbacke23/wagtail,kurtw/wagtail,zerolab/wagtail,chrxr/wagtail,quru/wagtail,quru/wagtail,zerolab/wagt... | Add migration to copy global document permissions to the default collection | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def get_document_permissions(apps):
# return a queryset of the 'add_document' and 'change_document' permissions
Permission = apps.get_model('auth.Permission')
ContentType = apps.get_model('contenttypes.Conten... | <commit_before><commit_msg>Add migration to copy global document permissions to the default collection<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def get_document_permissions(apps):
# return a queryset of the 'add_document' and 'change_document' permissions
Permission = apps.get_model('auth.Permission')
ContentType = apps.get_model('contenttypes.Conten... | Add migration to copy global document permissions to the default collection# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def get_document_permissions(apps):
# return a queryset of the 'add_document' and 'change_document' permissions
Permission = apps.get_mod... | <commit_before><commit_msg>Add migration to copy global document permissions to the default collection<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def get_document_permissions(apps):
# return a queryset of the 'add_document' and 'change_document' ... | |
c796603748c1382688293d7df2947942f1c0b157 | wsgi.py | wsgi.py | #!/usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/grand-bargain-monitoring/")
from src.app import app as application
application.secret_key = 'Add your secret key'
| Add WSGI file for deployment with apache | Add WSGI file for deployment with apache
Note using this means that the Apache config files (typically in /etc/apache2/sites-available)
should be congifured to point to this WSGI file. See Digital Ocean tutorial for reference:
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubu... | Python | mit | devinit/grand-bargain-monitoring,devinit/grand-bargain-monitoring,devinit/grand-bargain-monitoring | Add WSGI file for deployment with apache
Note using this means that the Apache config files (typically in /etc/apache2/sites-available)
should be congifured to point to this WSGI file. See Digital Ocean tutorial for reference:
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubu... | #!/usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/grand-bargain-monitoring/")
from src.app import app as application
application.secret_key = 'Add your secret key'
| <commit_before><commit_msg>Add WSGI file for deployment with apache
Note using this means that the Apache config files (typically in /etc/apache2/sites-available)
should be congifured to point to this WSGI file. See Digital Ocean tutorial for reference:
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-... | #!/usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,"/var/www/grand-bargain-monitoring/")
from src.app import app as application
application.secret_key = 'Add your secret key'
| Add WSGI file for deployment with apache
Note using this means that the Apache config files (typically in /etc/apache2/sites-available)
should be congifured to point to this WSGI file. See Digital Ocean tutorial for reference:
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubu... | <commit_before><commit_msg>Add WSGI file for deployment with apache
Note using this means that the Apache config files (typically in /etc/apache2/sites-available)
should be congifured to point to this WSGI file. See Digital Ocean tutorial for reference:
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-... | |
a730bb6d273dcc4355ae783af96a2368098c366f | tests/sentry/receivers/test_core.py | tests/sentry/receivers/test_core.py | # coding: utf-8
from __future__ import absolute_import
from django.conf import settings
from sentry.models import Project, Team, User
from sentry.receivers.core import create_default_project
from sentry.testutils import TestCase
class CreateDefaultProjectTest(TestCase):
def test_simple(self):
user, _ =... | # coding: utf-8
from __future__ import absolute_import
from django.conf import settings
from sentry.models import Project, ProjectKey, User
from sentry.receivers.core import create_default_project
from sentry.testutils import TestCase
class CreateDefaultProjectTest(TestCase):
def test_simple(self):
use... | Add tests to confirm store/not api is default | Add tests to confirm store/not api is default
| Python | bsd-3-clause | boneyao/sentry,wujuguang/sentry,mitsuhiko/sentry,imankulov/sentry,gg7/sentry,imankulov/sentry,beeftornado/sentry,zenefits/sentry,JamesMura/sentry,JamesMura/sentry,looker/sentry,fuziontech/sentry,songyi199111/sentry,wong2/sentry,argonemyth/sentry,boneyao/sentry,ewdurbin/sentry,wujuguang/sentry,camilonova/sentry,mvaled/s... | # coding: utf-8
from __future__ import absolute_import
from django.conf import settings
from sentry.models import Project, Team, User
from sentry.receivers.core import create_default_project
from sentry.testutils import TestCase
class CreateDefaultProjectTest(TestCase):
def test_simple(self):
user, _ =... | # coding: utf-8
from __future__ import absolute_import
from django.conf import settings
from sentry.models import Project, ProjectKey, User
from sentry.receivers.core import create_default_project
from sentry.testutils import TestCase
class CreateDefaultProjectTest(TestCase):
def test_simple(self):
use... | <commit_before># coding: utf-8
from __future__ import absolute_import
from django.conf import settings
from sentry.models import Project, Team, User
from sentry.receivers.core import create_default_project
from sentry.testutils import TestCase
class CreateDefaultProjectTest(TestCase):
def test_simple(self):
... | # coding: utf-8
from __future__ import absolute_import
from django.conf import settings
from sentry.models import Project, ProjectKey, User
from sentry.receivers.core import create_default_project
from sentry.testutils import TestCase
class CreateDefaultProjectTest(TestCase):
def test_simple(self):
use... | # coding: utf-8
from __future__ import absolute_import
from django.conf import settings
from sentry.models import Project, Team, User
from sentry.receivers.core import create_default_project
from sentry.testutils import TestCase
class CreateDefaultProjectTest(TestCase):
def test_simple(self):
user, _ =... | <commit_before># coding: utf-8
from __future__ import absolute_import
from django.conf import settings
from sentry.models import Project, Team, User
from sentry.receivers.core import create_default_project
from sentry.testutils import TestCase
class CreateDefaultProjectTest(TestCase):
def test_simple(self):
... |
5257f0531dcb95f1520950a3ab54e384dcfe888e | tests/wrappers_tests/test_render.py | tests/wrappers_tests/test_render.py | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import unittest
from chainer import testing
import mock
im... | Add tests for Render wrapper | Add tests for Render wrapper
| Python | mit | toslunar/chainerrl,toslunar/chainerrl | Add tests for Render wrapper | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import unittest
from chainer import testing
import mock
im... | <commit_before><commit_msg>Add tests for Render wrapper<commit_after> | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import unittest
from chainer import testing
import mock
im... | Add tests for Render wrapperfrom __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
import unittest
from chainer im... | <commit_before><commit_msg>Add tests for Render wrapper<commit_after>from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() ... | |
4c6ee099aa06278d974ebe557e81f04885a1cf4e | glanerbeard/default_settings.py | glanerbeard/default_settings.py | DEV_LISTEN_HOST = '127.0.0.1'
DEV_LISTEN_PORT = 5000
SERVERS = {}
API_KEYS = {}
LOGLEVEL = 'info'
| Add a file to hold default settings. | Add a file to hold default settings.
| Python | apache-2.0 | daenney/glanerbeard | Add a file to hold default settings. | DEV_LISTEN_HOST = '127.0.0.1'
DEV_LISTEN_PORT = 5000
SERVERS = {}
API_KEYS = {}
LOGLEVEL = 'info'
| <commit_before><commit_msg>Add a file to hold default settings.<commit_after> | DEV_LISTEN_HOST = '127.0.0.1'
DEV_LISTEN_PORT = 5000
SERVERS = {}
API_KEYS = {}
LOGLEVEL = 'info'
| Add a file to hold default settings.DEV_LISTEN_HOST = '127.0.0.1'
DEV_LISTEN_PORT = 5000
SERVERS = {}
API_KEYS = {}
LOGLEVEL = 'info'
| <commit_before><commit_msg>Add a file to hold default settings.<commit_after>DEV_LISTEN_HOST = '127.0.0.1'
DEV_LISTEN_PORT = 5000
SERVERS = {}
API_KEYS = {}
LOGLEVEL = 'info'
| |
93be4fe47f01c0a02baefc39502af87b1d276bcc | download_data.py | download_data.py | import argparse
import subprocess as sp
import os
"""
Script for downloading the data sets from Kaggle
Usage:
python download_data.py
Run
python download_data.py --help
for help on the usage of command line arguments
Note: Kaggle requires a user to accept the rules of a competition
before they can downloa... | Add script for downloading data sets | Add script for downloading data sets
| Python | mit | priyathamkat/digit-recognizer | Add script for downloading data sets | import argparse
import subprocess as sp
import os
"""
Script for downloading the data sets from Kaggle
Usage:
python download_data.py
Run
python download_data.py --help
for help on the usage of command line arguments
Note: Kaggle requires a user to accept the rules of a competition
before they can downloa... | <commit_before><commit_msg>Add script for downloading data sets<commit_after> | import argparse
import subprocess as sp
import os
"""
Script for downloading the data sets from Kaggle
Usage:
python download_data.py
Run
python download_data.py --help
for help on the usage of command line arguments
Note: Kaggle requires a user to accept the rules of a competition
before they can downloa... | Add script for downloading data setsimport argparse
import subprocess as sp
import os
"""
Script for downloading the data sets from Kaggle
Usage:
python download_data.py
Run
python download_data.py --help
for help on the usage of command line arguments
Note: Kaggle requires a user to accept the rules of a... | <commit_before><commit_msg>Add script for downloading data sets<commit_after>import argparse
import subprocess as sp
import os
"""
Script for downloading the data sets from Kaggle
Usage:
python download_data.py
Run
python download_data.py --help
for help on the usage of command line arguments
Note: Kaggle... | |
1160fc4f645ad36b106ddba6e248c81601f2cb26 | lc0042_trapping_rain_water.py | lc0042_trapping_rain_water.py | """Leetcode 42. Trapping Rain Water
Hard
URL: https://leetcode.com/problems/trapping-rain-water/
Given n non-negative integers representing an elevation map where the width of each
bar is 1, compute how much water it is able to trap after raining.
The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1... | Complete two pointers w/ leftmax/rightmax heights sol | Complete two pointers w/ leftmax/rightmax heights sol
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | Complete two pointers w/ leftmax/rightmax heights sol | """Leetcode 42. Trapping Rain Water
Hard
URL: https://leetcode.com/problems/trapping-rain-water/
Given n non-negative integers representing an elevation map where the width of each
bar is 1, compute how much water it is able to trap after raining.
The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1... | <commit_before><commit_msg>Complete two pointers w/ leftmax/rightmax heights sol<commit_after> | """Leetcode 42. Trapping Rain Water
Hard
URL: https://leetcode.com/problems/trapping-rain-water/
Given n non-negative integers representing an elevation map where the width of each
bar is 1, compute how much water it is able to trap after raining.
The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1... | Complete two pointers w/ leftmax/rightmax heights sol"""Leetcode 42. Trapping Rain Water
Hard
URL: https://leetcode.com/problems/trapping-rain-water/
Given n non-negative integers representing an elevation map where the width of each
bar is 1, compute how much water it is able to trap after raining.
The above eleva... | <commit_before><commit_msg>Complete two pointers w/ leftmax/rightmax heights sol<commit_after>"""Leetcode 42. Trapping Rain Water
Hard
URL: https://leetcode.com/problems/trapping-rain-water/
Given n non-negative integers representing an elevation map where the width of each
bar is 1, compute how much water it is able... | |
1bb610bdbb83586dc499c29934959db1feb39853 | tests/unit/utils/test_jinja.py | tests/unit/utils/test_jinja.py | # -*- coding: utf-8 -*-
'''
Tests for salt.utils.jinja
'''
# Import Python libs
from __future__ import absolute_import, unicode_literals, print_function
# Import Salt libs
import salt.utils.jinja
from tests.support.unit import TestCase
class JinjaTestCase(TestCase):
def test_tojson(self):
'''
Tes... | Add unit test for tojson filter | Add unit test for tojson filter
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | Add unit test for tojson filter | # -*- coding: utf-8 -*-
'''
Tests for salt.utils.jinja
'''
# Import Python libs
from __future__ import absolute_import, unicode_literals, print_function
# Import Salt libs
import salt.utils.jinja
from tests.support.unit import TestCase
class JinjaTestCase(TestCase):
def test_tojson(self):
'''
Tes... | <commit_before><commit_msg>Add unit test for tojson filter<commit_after> | # -*- coding: utf-8 -*-
'''
Tests for salt.utils.jinja
'''
# Import Python libs
from __future__ import absolute_import, unicode_literals, print_function
# Import Salt libs
import salt.utils.jinja
from tests.support.unit import TestCase
class JinjaTestCase(TestCase):
def test_tojson(self):
'''
Tes... | Add unit test for tojson filter# -*- coding: utf-8 -*-
'''
Tests for salt.utils.jinja
'''
# Import Python libs
from __future__ import absolute_import, unicode_literals, print_function
# Import Salt libs
import salt.utils.jinja
from tests.support.unit import TestCase
class JinjaTestCase(TestCase):
def test_tojson... | <commit_before><commit_msg>Add unit test for tojson filter<commit_after># -*- coding: utf-8 -*-
'''
Tests for salt.utils.jinja
'''
# Import Python libs
from __future__ import absolute_import, unicode_literals, print_function
# Import Salt libs
import salt.utils.jinja
from tests.support.unit import TestCase
class Jin... | |
e4975030f82a79632e73810de3bcad8d68abd8a9 | braid/dumper.py | braid/dumper.py | import os
from fabric.api import run, get
from braid import utils
from pipes import quote
def dump(spec, localfile):
"""
C{spec} is a dictionary of filenames/dirnames in the tarball to locations
on the disk from where the contents have to be retrieved.
Home relative (~/...) file names are not suppo... | Support for creating tarballs of arbitrary locations on disk and download them locally. | Support for creating tarballs of arbitrary locations on disk and download them locally.
| Python | mit | alex/braid,alex/braid | Support for creating tarballs of arbitrary locations on disk and download them locally. | import os
from fabric.api import run, get
from braid import utils
from pipes import quote
def dump(spec, localfile):
"""
C{spec} is a dictionary of filenames/dirnames in the tarball to locations
on the disk from where the contents have to be retrieved.
Home relative (~/...) file names are not suppo... | <commit_before><commit_msg>Support for creating tarballs of arbitrary locations on disk and download them locally.<commit_after> | import os
from fabric.api import run, get
from braid import utils
from pipes import quote
def dump(spec, localfile):
"""
C{spec} is a dictionary of filenames/dirnames in the tarball to locations
on the disk from where the contents have to be retrieved.
Home relative (~/...) file names are not suppo... | Support for creating tarballs of arbitrary locations on disk and download them locally.import os
from fabric.api import run, get
from braid import utils
from pipes import quote
def dump(spec, localfile):
"""
C{spec} is a dictionary of filenames/dirnames in the tarball to locations
on the disk from where... | <commit_before><commit_msg>Support for creating tarballs of arbitrary locations on disk and download them locally.<commit_after>import os
from fabric.api import run, get
from braid import utils
from pipes import quote
def dump(spec, localfile):
"""
C{spec} is a dictionary of filenames/dirnames in the tarbal... | |
a39d02f0b42b99403171e929eca97eaa6293de4f | examples/dump_machine_status.py | examples/dump_machine_status.py | """
Read some statistics from a connected machine, and dump them to the console.
Requires these modules:
* pySerial: http://pypi.python.org/pypi/pyserial
"""
# To use this example without installing s3g, we need this hack:
import os, sys
lib_path = os.path.abspath('../')
sys.path.append(lib_path)
import s3g
import se... | Add stats dump example (used as a sanity check of the protocol against the machine) | Add stats dump example (used as a sanity check of the protocol against the machine)
| Python | agpl-3.0 | makerbot/s3g,makerbot/s3g,Jnesselr/s3g,makerbot/s3g,makerbot/s3g,Jnesselr/s3g | Add stats dump example (used as a sanity check of the protocol against the machine) | """
Read some statistics from a connected machine, and dump them to the console.
Requires these modules:
* pySerial: http://pypi.python.org/pypi/pyserial
"""
# To use this example without installing s3g, we need this hack:
import os, sys
lib_path = os.path.abspath('../')
sys.path.append(lib_path)
import s3g
import se... | <commit_before><commit_msg>Add stats dump example (used as a sanity check of the protocol against the machine)<commit_after> | """
Read some statistics from a connected machine, and dump them to the console.
Requires these modules:
* pySerial: http://pypi.python.org/pypi/pyserial
"""
# To use this example without installing s3g, we need this hack:
import os, sys
lib_path = os.path.abspath('../')
sys.path.append(lib_path)
import s3g
import se... | Add stats dump example (used as a sanity check of the protocol against the machine)"""
Read some statistics from a connected machine, and dump them to the console.
Requires these modules:
* pySerial: http://pypi.python.org/pypi/pyserial
"""
# To use this example without installing s3g, we need this hack:
import os, sy... | <commit_before><commit_msg>Add stats dump example (used as a sanity check of the protocol against the machine)<commit_after>"""
Read some statistics from a connected machine, and dump them to the console.
Requires these modules:
* pySerial: http://pypi.python.org/pypi/pyserial
"""
# To use this example without install... | |
335d2fe16ca3402785f4b51b2dcc8195fe8a2906 | kerastuner/engine/hypermodel.py | kerastuner/engine/hypermodel.py | # Copyright 2019 The Keras Tuner Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | Add base HyperModel class and DefaultHyperModel. | Add base HyperModel class and DefaultHyperModel.
| Python | apache-2.0 | keras-team/keras-tuner,keras-team/keras-tuner | Add base HyperModel class and DefaultHyperModel. | # Copyright 2019 The Keras Tuner Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | <commit_before><commit_msg>Add base HyperModel class and DefaultHyperModel.<commit_after> | # Copyright 2019 The Keras Tuner Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | Add base HyperModel class and DefaultHyperModel.# Copyright 2019 The Keras Tuner Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
... | <commit_before><commit_msg>Add base HyperModel class and DefaultHyperModel.<commit_after># Copyright 2019 The Keras Tuner Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https... | |
c95b1d7be730f4f4dc39f73f0adb4574c99861fb | gpi/cdf97_GPI.py | gpi/cdf97_GPI.py | from __future__ import absolute_import, division, print_function
import os
# gpi, future
import gpi
from bart.gpi.borg import IFilePath, OFilePath, Command
# bart
import bart
base_path = bart.__path__[0] # library base for executables
import bart.python.cfl as cfl
class ExternalNode(gpi.NodeAPI):
"""Usage: cdf9... | Add wavelet transform node from Andrew Li | Add wavelet transform node from Andrew Li
| Python | bsd-3-clause | nckz/bart,nckz/bart,nckz/bart,nckz/bart,nckz/bart | Add wavelet transform node from Andrew Li | from __future__ import absolute_import, division, print_function
import os
# gpi, future
import gpi
from bart.gpi.borg import IFilePath, OFilePath, Command
# bart
import bart
base_path = bart.__path__[0] # library base for executables
import bart.python.cfl as cfl
class ExternalNode(gpi.NodeAPI):
"""Usage: cdf9... | <commit_before><commit_msg>Add wavelet transform node from Andrew Li<commit_after> | from __future__ import absolute_import, division, print_function
import os
# gpi, future
import gpi
from bart.gpi.borg import IFilePath, OFilePath, Command
# bart
import bart
base_path = bart.__path__[0] # library base for executables
import bart.python.cfl as cfl
class ExternalNode(gpi.NodeAPI):
"""Usage: cdf9... | Add wavelet transform node from Andrew Lifrom __future__ import absolute_import, division, print_function
import os
# gpi, future
import gpi
from bart.gpi.borg import IFilePath, OFilePath, Command
# bart
import bart
base_path = bart.__path__[0] # library base for executables
import bart.python.cfl as cfl
class Exte... | <commit_before><commit_msg>Add wavelet transform node from Andrew Li<commit_after>from __future__ import absolute_import, division, print_function
import os
# gpi, future
import gpi
from bart.gpi.borg import IFilePath, OFilePath, Command
# bart
import bart
base_path = bart.__path__[0] # library base for executables
... | |
681fdb7d94d662cfae7040df6960739cdff41ab6 | firecares/firestation/management/commands/departments_to_es.py | firecares/firestation/management/commands/departments_to_es.py | import json
import elasticsearch
from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
from elasticsearch import Elasticsearch, RequestsHttpConnection
from requests_aws4auth import AWS4Auth
from django.conf import settings
class Command(BaseCommand):
help = 'Lo... | Add script that exports departments to elastic search. | Add script that exports departments to elastic search.
| Python | mit | FireCARES/firecares,HunterConnelly/firecares,FireCARES/firecares,FireCARES/firecares,HunterConnelly/firecares,HunterConnelly/firecares,HunterConnelly/firecares,FireCARES/firecares,FireCARES/firecares | Add script that exports departments to elastic search. | import json
import elasticsearch
from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
from elasticsearch import Elasticsearch, RequestsHttpConnection
from requests_aws4auth import AWS4Auth
from django.conf import settings
class Command(BaseCommand):
help = 'Lo... | <commit_before><commit_msg>Add script that exports departments to elastic search.<commit_after> | import json
import elasticsearch
from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
from elasticsearch import Elasticsearch, RequestsHttpConnection
from requests_aws4auth import AWS4Auth
from django.conf import settings
class Command(BaseCommand):
help = 'Lo... | Add script that exports departments to elastic search.import json
import elasticsearch
from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
from elasticsearch import Elasticsearch, RequestsHttpConnection
from requests_aws4auth import AWS4Auth
from django.conf impor... | <commit_before><commit_msg>Add script that exports departments to elastic search.<commit_after>import json
import elasticsearch
from django.core.management.base import BaseCommand
from firecares.firestation.models import FireDepartment
from elasticsearch import Elasticsearch, RequestsHttpConnection
from requests_aws4au... | |
4230c72fd66fde18b2d697206a60c0346f3df797 | tests/visual_tests/test_python.py | tests/visual_tests/test_python.py | #!/usr/bin/env python
import mapnik
import sys
class MyText(mapnik.FormatingNode):
def __init__(self):
mapnik.FormatingNode.__init__(self)
self.expr = mapnik.Expression("[name]")
def apply(self, properties, feature, output):
colors = [mapnik.Color('red'),
mapnik.Colo... | Test case for python bindings. | Test case for python bindings.
| Python | lgpl-2.1 | davenquinn/python-mapnik,rouault/mapnik,qianwenming/mapnik,Mappy/mapnik,davenquinn/python-mapnik,qianwenming/mapnik,yohanboniface/python-mapnik,stefanklug/mapnik,Airphrame/mapnik,rouault/mapnik,garnertb/python-mapnik,jwomeara/mapnik,mbrukman/mapnik,Airphrame/mapnik,pnorman/mapnik,lightmare/mapnik,mbrukman/mapnik,CartoD... | Test case for python bindings. | #!/usr/bin/env python
import mapnik
import sys
class MyText(mapnik.FormatingNode):
def __init__(self):
mapnik.FormatingNode.__init__(self)
self.expr = mapnik.Expression("[name]")
def apply(self, properties, feature, output):
colors = [mapnik.Color('red'),
mapnik.Colo... | <commit_before><commit_msg>Test case for python bindings.<commit_after> | #!/usr/bin/env python
import mapnik
import sys
class MyText(mapnik.FormatingNode):
def __init__(self):
mapnik.FormatingNode.__init__(self)
self.expr = mapnik.Expression("[name]")
def apply(self, properties, feature, output):
colors = [mapnik.Color('red'),
mapnik.Colo... | Test case for python bindings.#!/usr/bin/env python
import mapnik
import sys
class MyText(mapnik.FormatingNode):
def __init__(self):
mapnik.FormatingNode.__init__(self)
self.expr = mapnik.Expression("[name]")
def apply(self, properties, feature, output):
colors = [mapnik.Color('red'), ... | <commit_before><commit_msg>Test case for python bindings.<commit_after>#!/usr/bin/env python
import mapnik
import sys
class MyText(mapnik.FormatingNode):
def __init__(self):
mapnik.FormatingNode.__init__(self)
self.expr = mapnik.Expression("[name]")
def apply(self, properties, feature, output)... | |
7cb08c04277a5d764d542e0718ad0e9ade1312e7 | filterkeys.py | filterkeys.py | #!/usr/bin/env python
import pprint
import sys
import redis
import yajl
def main():
lines = [l.strip() for l in sys.stdin.xreadlines()]
r = redis.Redis()
keys = r.keys().split(' ')
assert r.dbsize() == len(keys), (len(keys), 'Not enough keys!')
print '>>> Exactly %d keys to iterate through' % l... | Add a really expensive script to iterate and obliterate spammy domains from the data store | Add a really expensive script to iterate and obliterate spammy domains from the data store
| Python | mit | rtyler/urlenco.de | Add a really expensive script to iterate and obliterate spammy domains from the data store | #!/usr/bin/env python
import pprint
import sys
import redis
import yajl
def main():
lines = [l.strip() for l in sys.stdin.xreadlines()]
r = redis.Redis()
keys = r.keys().split(' ')
assert r.dbsize() == len(keys), (len(keys), 'Not enough keys!')
print '>>> Exactly %d keys to iterate through' % l... | <commit_before><commit_msg>Add a really expensive script to iterate and obliterate spammy domains from the data store<commit_after> | #!/usr/bin/env python
import pprint
import sys
import redis
import yajl
def main():
lines = [l.strip() for l in sys.stdin.xreadlines()]
r = redis.Redis()
keys = r.keys().split(' ')
assert r.dbsize() == len(keys), (len(keys), 'Not enough keys!')
print '>>> Exactly %d keys to iterate through' % l... | Add a really expensive script to iterate and obliterate spammy domains from the data store#!/usr/bin/env python
import pprint
import sys
import redis
import yajl
def main():
lines = [l.strip() for l in sys.stdin.xreadlines()]
r = redis.Redis()
keys = r.keys().split(' ')
assert r.dbsize() == len(keys... | <commit_before><commit_msg>Add a really expensive script to iterate and obliterate spammy domains from the data store<commit_after>#!/usr/bin/env python
import pprint
import sys
import redis
import yajl
def main():
lines = [l.strip() for l in sys.stdin.xreadlines()]
r = redis.Redis()
keys = r.keys().spli... | |
dd697f34c5f1877f91447397dc0f4d78472573a2 | tests/test_runner.py | tests/test_runner.py | import unittest
from mo.runner import Variable
class TestVariable(unittest.TestCase):
def test_default(self):
v = Variable('name', {'default': 'default'})
self.assertEqual(v.value, 'default')
self.assertEqual(str(v), 'default')
def test_value(self):
v = Variable('name', {'def... | Add some tests for variables | Add some tests for variables
| Python | mit | thomasleese/mo | Add some tests for variables | import unittest
from mo.runner import Variable
class TestVariable(unittest.TestCase):
def test_default(self):
v = Variable('name', {'default': 'default'})
self.assertEqual(v.value, 'default')
self.assertEqual(str(v), 'default')
def test_value(self):
v = Variable('name', {'def... | <commit_before><commit_msg>Add some tests for variables<commit_after> | import unittest
from mo.runner import Variable
class TestVariable(unittest.TestCase):
def test_default(self):
v = Variable('name', {'default': 'default'})
self.assertEqual(v.value, 'default')
self.assertEqual(str(v), 'default')
def test_value(self):
v = Variable('name', {'def... | Add some tests for variablesimport unittest
from mo.runner import Variable
class TestVariable(unittest.TestCase):
def test_default(self):
v = Variable('name', {'default': 'default'})
self.assertEqual(v.value, 'default')
self.assertEqual(str(v), 'default')
def test_value(self):
... | <commit_before><commit_msg>Add some tests for variables<commit_after>import unittest
from mo.runner import Variable
class TestVariable(unittest.TestCase):
def test_default(self):
v = Variable('name', {'default': 'default'})
self.assertEqual(v.value, 'default')
self.assertEqual(str(v), 'de... | |
1033fec3742160262be49652ae85ecbcd5e4c4f6 | c_major_7.py | c_major_7.py | from s4ils import *
s = Session()
with s[INIT]:
s.engine = c.Engine() | s
s.fm = s.engine.new_module(rv.m.Fm) | s
s.engine.output << s.fm | s
s.track1 = s.engine.track(1)
s.track2 = s.engine.track(2)
s.halfnote = (2, 0)
with s[0, 0]:
note = s.fm.note_on(n.C4, 10) | s.track1 | s
note.o... | Add a s4ils example that uses more math | Add a s4ils example that uses more math
| Python | unlicense | metrasynth/gallery,metrasynth/gallery,metrasynth/gallery | Add a s4ils example that uses more math | from s4ils import *
s = Session()
with s[INIT]:
s.engine = c.Engine() | s
s.fm = s.engine.new_module(rv.m.Fm) | s
s.engine.output << s.fm | s
s.track1 = s.engine.track(1)
s.track2 = s.engine.track(2)
s.halfnote = (2, 0)
with s[0, 0]:
note = s.fm.note_on(n.C4, 10) | s.track1 | s
note.o... | <commit_before><commit_msg>Add a s4ils example that uses more math<commit_after> | from s4ils import *
s = Session()
with s[INIT]:
s.engine = c.Engine() | s
s.fm = s.engine.new_module(rv.m.Fm) | s
s.engine.output << s.fm | s
s.track1 = s.engine.track(1)
s.track2 = s.engine.track(2)
s.halfnote = (2, 0)
with s[0, 0]:
note = s.fm.note_on(n.C4, 10) | s.track1 | s
note.o... | Add a s4ils example that uses more mathfrom s4ils import *
s = Session()
with s[INIT]:
s.engine = c.Engine() | s
s.fm = s.engine.new_module(rv.m.Fm) | s
s.engine.output << s.fm | s
s.track1 = s.engine.track(1)
s.track2 = s.engine.track(2)
s.halfnote = (2, 0)
with s[0, 0]:
note = s.fm.note... | <commit_before><commit_msg>Add a s4ils example that uses more math<commit_after>from s4ils import *
s = Session()
with s[INIT]:
s.engine = c.Engine() | s
s.fm = s.engine.new_module(rv.m.Fm) | s
s.engine.output << s.fm | s
s.track1 = s.engine.track(1)
s.track2 = s.engine.track(2)
s.halfnote = (... | |
0844ab636761b7fa47c63c15333546404466ac03 | gevent_tools/tests/test_util.py | gevent_tools/tests/test_util.py | from nose.tools import with_setup, raises
from gevent_tools import util
from unittest import TestCase
class TestUtil(TestCase):
def setUp(self):
class Foo(object):
bar = util.defaultproperty(set)
def baz(self):
ret = []
for item in self.... | Remove the need to call super.__init__ by lazily instatiating instance variables. | Remove the need to call super.__init__ by lazily instatiating instance variables.
| Python | mit | progrium/ginkgo | Remove the need to call super.__init__ by lazily instatiating instance variables. | from nose.tools import with_setup, raises
from gevent_tools import util
from unittest import TestCase
class TestUtil(TestCase):
def setUp(self):
class Foo(object):
bar = util.defaultproperty(set)
def baz(self):
ret = []
for item in self.... | <commit_before><commit_msg>Remove the need to call super.__init__ by lazily instatiating instance variables.<commit_after> | from nose.tools import with_setup, raises
from gevent_tools import util
from unittest import TestCase
class TestUtil(TestCase):
def setUp(self):
class Foo(object):
bar = util.defaultproperty(set)
def baz(self):
ret = []
for item in self.... | Remove the need to call super.__init__ by lazily instatiating instance variables.from nose.tools import with_setup, raises
from gevent_tools import util
from unittest import TestCase
class TestUtil(TestCase):
def setUp(self):
class Foo(object):
bar = util.defaultproperty(set)
... | <commit_before><commit_msg>Remove the need to call super.__init__ by lazily instatiating instance variables.<commit_after>from nose.tools import with_setup, raises
from gevent_tools import util
from unittest import TestCase
class TestUtil(TestCase):
def setUp(self):
class Foo(object):
bar = ut... | |
56b6d98f0ad7cd9d074a9b372913dcbed693757b | scripts/migration/ensure_bookmark_uniqueness_legacy.py | scripts/migration/ensure_bookmark_uniqueness_legacy.py | import argparse
import logging
from modularodm import Q
from framework.auth.core import User
from framework.transactions.context import TokuTransaction
from scripts import utils as script_utils
from website.app import init_app
from website.project import Node
logger = logging.getLogger(__name__)
def get_targets():... | Add script from master to ensure bookmark uniqueness in modm | Add script from master to ensure bookmark uniqueness in modm
| Python | apache-2.0 | mattclark/osf.io,chrisseto/osf.io,crcresearch/osf.io,cslzchen/osf.io,erinspace/osf.io,binoculars/osf.io,leb2dg/osf.io,chennan47/osf.io,baylee-d/osf.io,laurenrevere/osf.io,laurenrevere/osf.io,aaxelb/osf.io,mattclark/osf.io,Nesiehr/osf.io,felliott/osf.io,Nesiehr/osf.io,felliott/osf.io,saradbowman/osf.io,cwisecarver/osf.i... | Add script from master to ensure bookmark uniqueness in modm | import argparse
import logging
from modularodm import Q
from framework.auth.core import User
from framework.transactions.context import TokuTransaction
from scripts import utils as script_utils
from website.app import init_app
from website.project import Node
logger = logging.getLogger(__name__)
def get_targets():... | <commit_before><commit_msg>Add script from master to ensure bookmark uniqueness in modm<commit_after> | import argparse
import logging
from modularodm import Q
from framework.auth.core import User
from framework.transactions.context import TokuTransaction
from scripts import utils as script_utils
from website.app import init_app
from website.project import Node
logger = logging.getLogger(__name__)
def get_targets():... | Add script from master to ensure bookmark uniqueness in modmimport argparse
import logging
from modularodm import Q
from framework.auth.core import User
from framework.transactions.context import TokuTransaction
from scripts import utils as script_utils
from website.app import init_app
from website.project import Nod... | <commit_before><commit_msg>Add script from master to ensure bookmark uniqueness in modm<commit_after>import argparse
import logging
from modularodm import Q
from framework.auth.core import User
from framework.transactions.context import TokuTransaction
from scripts import utils as script_utils
from website.app import... | |
afb09aa0c95c21f286ce6cecbb49e06e9aed4bbf | benchmark/profile_efm32_fast.py | benchmark/profile_efm32_fast.py | # Boards to test.
BOARDS = [
"stk3200",
"slstk3401a",
"stk3600",
"stk3700",
"stk3800",
"slwstk6220a",
]
# Applications to compile (relative to RIOT-OS root).
APPLICATIONS = [
"examples/default",
"examples/hello-world",
"tests/minimal",
"tests/periph_adc",
"tests/periph_cpuid... | Add quick benchmark profile for EFM32 targets. | Add quick benchmark profile for EFM32 targets.
| Python | mit | basilfx/EFM2Riot,basilfx/EFM2Riot,basilfx/EFM2Riot,basilfx/EFM2Riot,basilfx/EFM2Riot | Add quick benchmark profile for EFM32 targets. | # Boards to test.
BOARDS = [
"stk3200",
"slstk3401a",
"stk3600",
"stk3700",
"stk3800",
"slwstk6220a",
]
# Applications to compile (relative to RIOT-OS root).
APPLICATIONS = [
"examples/default",
"examples/hello-world",
"tests/minimal",
"tests/periph_adc",
"tests/periph_cpuid... | <commit_before><commit_msg>Add quick benchmark profile for EFM32 targets.<commit_after> | # Boards to test.
BOARDS = [
"stk3200",
"slstk3401a",
"stk3600",
"stk3700",
"stk3800",
"slwstk6220a",
]
# Applications to compile (relative to RIOT-OS root).
APPLICATIONS = [
"examples/default",
"examples/hello-world",
"tests/minimal",
"tests/periph_adc",
"tests/periph_cpuid... | Add quick benchmark profile for EFM32 targets.# Boards to test.
BOARDS = [
"stk3200",
"slstk3401a",
"stk3600",
"stk3700",
"stk3800",
"slwstk6220a",
]
# Applications to compile (relative to RIOT-OS root).
APPLICATIONS = [
"examples/default",
"examples/hello-world",
"tests/minimal",
... | <commit_before><commit_msg>Add quick benchmark profile for EFM32 targets.<commit_after># Boards to test.
BOARDS = [
"stk3200",
"slstk3401a",
"stk3600",
"stk3700",
"stk3800",
"slwstk6220a",
]
# Applications to compile (relative to RIOT-OS root).
APPLICATIONS = [
"examples/default",
"exam... | |
6a5c2714a6d120c75ed65ae8d8d686ae692f7cb7 | gnocchi/indexer/alembic/versions/ffc7bbeec0b0_migrate_legacy_resources_to_db2.py | gnocchi/indexer/alembic/versions/ffc7bbeec0b0_migrate_legacy_resources_to_db2.py | # Copyright 2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | Fix broken ceilometer resources migration script | Fix broken ceilometer resources migration script
Migration script 828c16f70cce have a bug, the following command doesn't
insert anything:
op.execute(resource_type.insert().from_select(
['name'], sa.select([resource.c.type]).distinct()))
So all migration scripts that manipulates resource_type next, do ... | Python | apache-2.0 | leandroreox/gnocchi,gnocchixyz/gnocchi,gnocchixyz/gnocchi,sileht/gnocchi,sileht/gnocchi,leandroreox/gnocchi | Fix broken ceilometer resources migration script
Migration script 828c16f70cce have a bug, the following command doesn't
insert anything:
op.execute(resource_type.insert().from_select(
['name'], sa.select([resource.c.type]).distinct()))
So all migration scripts that manipulates resource_type next, do ... | # Copyright 2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | <commit_before><commit_msg>Fix broken ceilometer resources migration script
Migration script 828c16f70cce have a bug, the following command doesn't
insert anything:
op.execute(resource_type.insert().from_select(
['name'], sa.select([resource.c.type]).distinct()))
So all migration scripts that manipula... | # Copyright 2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | Fix broken ceilometer resources migration script
Migration script 828c16f70cce have a bug, the following command doesn't
insert anything:
op.execute(resource_type.insert().from_select(
['name'], sa.select([resource.c.type]).distinct()))
So all migration scripts that manipulates resource_type next, do ... | <commit_before><commit_msg>Fix broken ceilometer resources migration script
Migration script 828c16f70cce have a bug, the following command doesn't
insert anything:
op.execute(resource_type.insert().from_select(
['name'], sa.select([resource.c.type]).distinct()))
So all migration scripts that manipula... | |
64d6e641351580a88663b3a31b965e2a31910c57 | crust/api.py | crust/api.py | from . import requests
class Api(object):
def __init__(self, url, session=None, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
if session is None:
session = requests.session()
self.url = url
self.session = session
| Create the starts of an Api object | Create the starts of an Api object
| Python | bsd-2-clause | dstufft/crust | Create the starts of an Api object | from . import requests
class Api(object):
def __init__(self, url, session=None, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
if session is None:
session = requests.session()
self.url = url
self.session = session
| <commit_before><commit_msg>Create the starts of an Api object<commit_after> | from . import requests
class Api(object):
def __init__(self, url, session=None, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
if session is None:
session = requests.session()
self.url = url
self.session = session
| Create the starts of an Api objectfrom . import requests
class Api(object):
def __init__(self, url, session=None, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
if session is None:
session = requests.session()
self.url = url
self.session = session
| <commit_before><commit_msg>Create the starts of an Api object<commit_after>from . import requests
class Api(object):
def __init__(self, url, session=None, *args, **kwargs):
super(Api, self).__init__(*args, **kwargs)
if session is None:
session = requests.session()
self.url =... | |
11f29a3c01d3e9174ce977dd4b6e735e6ae5206f | web/premises/migrations/0008_auto_20141023_0133.py | web/premises/migrations/0008_auto_20141023_0133.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('premises', '0007_auto_20141020_2215'),
]
operations = [
migrations.AddField(
model_name='content... | Add migration file for modification date | Add migration file for modification date
| Python | mit | Arthur2e5/arguman.org,bahattincinic/arguman.org,Arthur2e5/arguman.org,donkawechico/arguman.org,arguman/arguman.org,donkawechico/arguman.org,bahattincinic/arguman.org,bahattincinic/arguman.org,Arthur2e5/arguman.org,beratdogan/arguman.org,taiansu/arguman.org,donkawechico/arguman.org,arguman/arguman.org,omeripek/arguman.o... | Add migration file for modification date | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('premises', '0007_auto_20141020_2215'),
]
operations = [
migrations.AddField(
model_name='content... | <commit_before><commit_msg>Add migration file for modification date<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('premises', '0007_auto_20141020_2215'),
]
operations = [
migrations.AddField(
model_name='content... | Add migration file for modification date# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('premises', '0007_auto_20141020_2215'),
]
operations = [
migrations.A... | <commit_before><commit_msg>Add migration file for modification date<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('premises', '0007_auto_20141020_2215'),
]... | |
f0d32fbd369be3c0109059cdf2cdb8ca6291320f | pull.py | pull.py | import gdata.youtube
import gdata.youtube.service
yt_service = gdata.youtube.service.YouTubeService()
yt_service.ssl = True
baseURL = "http://gdata.youtube.com/feeds/api/playlists/"
list_ids = ['RDrVqAdIMQZlk']
videos = []
#iterates through all playlist ids
for pid in list_ids:
#fetches the playlist
videoF... | Set up to take a list of playlist ids and return all urls | Set up to take a list of playlist ids and return all urls
| Python | mit | dgriff03/playlist_puller | Set up to take a list of playlist ids and return all urls | import gdata.youtube
import gdata.youtube.service
yt_service = gdata.youtube.service.YouTubeService()
yt_service.ssl = True
baseURL = "http://gdata.youtube.com/feeds/api/playlists/"
list_ids = ['RDrVqAdIMQZlk']
videos = []
#iterates through all playlist ids
for pid in list_ids:
#fetches the playlist
videoF... | <commit_before><commit_msg>Set up to take a list of playlist ids and return all urls<commit_after> | import gdata.youtube
import gdata.youtube.service
yt_service = gdata.youtube.service.YouTubeService()
yt_service.ssl = True
baseURL = "http://gdata.youtube.com/feeds/api/playlists/"
list_ids = ['RDrVqAdIMQZlk']
videos = []
#iterates through all playlist ids
for pid in list_ids:
#fetches the playlist
videoF... | Set up to take a list of playlist ids and return all urlsimport gdata.youtube
import gdata.youtube.service
yt_service = gdata.youtube.service.YouTubeService()
yt_service.ssl = True
baseURL = "http://gdata.youtube.com/feeds/api/playlists/"
list_ids = ['RDrVqAdIMQZlk']
videos = []
#iterates through all playlist ids
... | <commit_before><commit_msg>Set up to take a list of playlist ids and return all urls<commit_after>import gdata.youtube
import gdata.youtube.service
yt_service = gdata.youtube.service.YouTubeService()
yt_service.ssl = True
baseURL = "http://gdata.youtube.com/feeds/api/playlists/"
list_ids = ['RDrVqAdIMQZlk']
videos ... | |
4cab8d8de1d72e662bb1116773b4196ffb44dac5 | sample-code/examples/python/android_web_view.py | sample-code/examples/python/android_web_view.py | import os
import glob
import unittest
from time import sleep
from selenium import webdriver
class TestAndroidWebView(unittest.TestCase):
def setUp(self):
app = os.path.abspath(
glob.glob(os.path.join(os.path.dirname(__file__),
'../../apps/WebViewDemo/target'... | Add new test for android web view. | Add new test for android web view.
| Python | apache-2.0 | appium/appium,appium/appium,appium/appium,appium/appium,Sw0rdstream/appium,appium/appium,appium/appium | Add new test for android web view. | import os
import glob
import unittest
from time import sleep
from selenium import webdriver
class TestAndroidWebView(unittest.TestCase):
def setUp(self):
app = os.path.abspath(
glob.glob(os.path.join(os.path.dirname(__file__),
'../../apps/WebViewDemo/target'... | <commit_before><commit_msg>Add new test for android web view.<commit_after> | import os
import glob
import unittest
from time import sleep
from selenium import webdriver
class TestAndroidWebView(unittest.TestCase):
def setUp(self):
app = os.path.abspath(
glob.glob(os.path.join(os.path.dirname(__file__),
'../../apps/WebViewDemo/target'... | Add new test for android web view.import os
import glob
import unittest
from time import sleep
from selenium import webdriver
class TestAndroidWebView(unittest.TestCase):
def setUp(self):
app = os.path.abspath(
glob.glob(os.path.join(os.path.dirname(__file__),
... | <commit_before><commit_msg>Add new test for android web view.<commit_after>import os
import glob
import unittest
from time import sleep
from selenium import webdriver
class TestAndroidWebView(unittest.TestCase):
def setUp(self):
app = os.path.abspath(
glob.glob(os.path.join(os.path.dirname(__f... | |
48de6e68b6c869f9249388f4c4a15eb29dcb1a47 | scripts/migration/repoint_bad_googledoc_sfns.py | scripts/migration/repoint_bad_googledoc_sfns.py | # -*- coding: utf-8 -*-
"""Migrates GoogleDrive files that have unescaped paths and have a counterpart StoredFileNode. This repoints
the Guid for the unescaped StoredFileNode to the corrct StoredFileNode.
This is a one-off script, run as a prerequisite to scripts.migration.migrate_googledoc_paths.
"""
import sys
impor... | Add prerequisite script for gdrive migration | Add prerequisite script for gdrive migration
| Python | apache-2.0 | sloria/osf.io,caseyrollins/osf.io,mfraezz/osf.io,icereval/osf.io,chrisseto/osf.io,adlius/osf.io,TomBaxter/osf.io,chennan47/osf.io,acshi/osf.io,erinspace/osf.io,HalcyonChimera/osf.io,chennan47/osf.io,pattisdr/osf.io,mfraezz/osf.io,alexschiller/osf.io,sloria/osf.io,CenterForOpenScience/osf.io,aaxelb/osf.io,saradbowman/os... | Add prerequisite script for gdrive migration | # -*- coding: utf-8 -*-
"""Migrates GoogleDrive files that have unescaped paths and have a counterpart StoredFileNode. This repoints
the Guid for the unescaped StoredFileNode to the corrct StoredFileNode.
This is a one-off script, run as a prerequisite to scripts.migration.migrate_googledoc_paths.
"""
import sys
impor... | <commit_before><commit_msg>Add prerequisite script for gdrive migration<commit_after> | # -*- coding: utf-8 -*-
"""Migrates GoogleDrive files that have unescaped paths and have a counterpart StoredFileNode. This repoints
the Guid for the unescaped StoredFileNode to the corrct StoredFileNode.
This is a one-off script, run as a prerequisite to scripts.migration.migrate_googledoc_paths.
"""
import sys
impor... | Add prerequisite script for gdrive migration# -*- coding: utf-8 -*-
"""Migrates GoogleDrive files that have unescaped paths and have a counterpart StoredFileNode. This repoints
the Guid for the unescaped StoredFileNode to the corrct StoredFileNode.
This is a one-off script, run as a prerequisite to scripts.migration.m... | <commit_before><commit_msg>Add prerequisite script for gdrive migration<commit_after># -*- coding: utf-8 -*-
"""Migrates GoogleDrive files that have unescaped paths and have a counterpart StoredFileNode. This repoints
the Guid for the unescaped StoredFileNode to the corrct StoredFileNode.
This is a one-off script, run... | |
a596781889a3991d14440dbf889767200e9d6681 | examples/players/fish_player.py | examples/players/fish_player.py | from pypokerengine.players import BasePokerPlayer
class FishPlayer(BasePokerPlayer): # Do not forget to make parent class as "BasePokerPlayer"
# we define the logic to make an action through this method. (so this method would be the core of your AI)
def declare_action(self, valid_actions, hole_card, round_s... | Add simple example player for README tutorial | Add simple example player for README tutorial
| Python | mit | ishikota/PyPokerEngine | Add simple example player for README tutorial | from pypokerengine.players import BasePokerPlayer
class FishPlayer(BasePokerPlayer): # Do not forget to make parent class as "BasePokerPlayer"
# we define the logic to make an action through this method. (so this method would be the core of your AI)
def declare_action(self, valid_actions, hole_card, round_s... | <commit_before><commit_msg>Add simple example player for README tutorial<commit_after> | from pypokerengine.players import BasePokerPlayer
class FishPlayer(BasePokerPlayer): # Do not forget to make parent class as "BasePokerPlayer"
# we define the logic to make an action through this method. (so this method would be the core of your AI)
def declare_action(self, valid_actions, hole_card, round_s... | Add simple example player for README tutorialfrom pypokerengine.players import BasePokerPlayer
class FishPlayer(BasePokerPlayer): # Do not forget to make parent class as "BasePokerPlayer"
# we define the logic to make an action through this method. (so this method would be the core of your AI)
def declare_a... | <commit_before><commit_msg>Add simple example player for README tutorial<commit_after>from pypokerengine.players import BasePokerPlayer
class FishPlayer(BasePokerPlayer): # Do not forget to make parent class as "BasePokerPlayer"
# we define the logic to make an action through this method. (so this method would ... | |
5b434ae55d39075dad6c62ef48f8a133636d3f1e | robot-vision/findbin.py | robot-vision/findbin.py | #!/usr/bin/env python3
from networktables import NetworkTable
from optparse import OptionParser
import time
import logging
logging.basicConfig(level=logging.DEBUG)
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('--on', action='store_true', default=False)
parser.add_option... | Add utility to turn findBin variable on/off | Add utility to turn findBin variable on/off
| Python | apache-2.0 | frc1418/2015-vision,frc1418/2015-vision,CarterFendley/2015-vision,CarterFendley/2015-vision | Add utility to turn findBin variable on/off | #!/usr/bin/env python3
from networktables import NetworkTable
from optparse import OptionParser
import time
import logging
logging.basicConfig(level=logging.DEBUG)
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('--on', action='store_true', default=False)
parser.add_option... | <commit_before><commit_msg>Add utility to turn findBin variable on/off<commit_after> | #!/usr/bin/env python3
from networktables import NetworkTable
from optparse import OptionParser
import time
import logging
logging.basicConfig(level=logging.DEBUG)
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('--on', action='store_true', default=False)
parser.add_option... | Add utility to turn findBin variable on/off#!/usr/bin/env python3
from networktables import NetworkTable
from optparse import OptionParser
import time
import logging
logging.basicConfig(level=logging.DEBUG)
if __name__ == '__main__':
parser = OptionParser()
parser.add_option('--on', action='store_... | <commit_before><commit_msg>Add utility to turn findBin variable on/off<commit_after>#!/usr/bin/env python3
from networktables import NetworkTable
from optparse import OptionParser
import time
import logging
logging.basicConfig(level=logging.DEBUG)
if __name__ == '__main__':
parser = OptionParser()
... | |
97bffbb336dbf71132171346fa948e5b9f59c60d | setup.py | setup.py | from setuptools import setup
setup(
name = "django-redis-cache",
url = "http://github.com/sebleier/django-redis-cache/",
author = "Sean Bleier",
author_email = "[email protected]",
version = "0.9.7",
packages = ["redis_cache"],
description = "Redis Cache Backend for Django",
install_re... | from setuptools import setup
setup(
name = "django-redis-cache",
url = "http://github.com/sebleier/django-redis-cache/",
author = "Sean Bleier",
author_email = "[email protected]",
version = "0.9.7",
packages = ["redis_cache"],
description = "Redis Cache Backend for Django",
install_re... | Add Python version trove classifiers. | Add Python version trove classifiers.
| Python | bsd-3-clause | maikelwever/django-redis-cache,carltongibson/django-redis-cache,carltongibson/django-redis-cache,chripede/django-redis-cache,chripede/django-redis-cache,maikelwever/django-redis-cache | from setuptools import setup
setup(
name = "django-redis-cache",
url = "http://github.com/sebleier/django-redis-cache/",
author = "Sean Bleier",
author_email = "[email protected]",
version = "0.9.7",
packages = ["redis_cache"],
description = "Redis Cache Backend for Django",
install_re... | from setuptools import setup
setup(
name = "django-redis-cache",
url = "http://github.com/sebleier/django-redis-cache/",
author = "Sean Bleier",
author_email = "[email protected]",
version = "0.9.7",
packages = ["redis_cache"],
description = "Redis Cache Backend for Django",
install_re... | <commit_before>from setuptools import setup
setup(
name = "django-redis-cache",
url = "http://github.com/sebleier/django-redis-cache/",
author = "Sean Bleier",
author_email = "[email protected]",
version = "0.9.7",
packages = ["redis_cache"],
description = "Redis Cache Backend for Django",... | from setuptools import setup
setup(
name = "django-redis-cache",
url = "http://github.com/sebleier/django-redis-cache/",
author = "Sean Bleier",
author_email = "[email protected]",
version = "0.9.7",
packages = ["redis_cache"],
description = "Redis Cache Backend for Django",
install_re... | from setuptools import setup
setup(
name = "django-redis-cache",
url = "http://github.com/sebleier/django-redis-cache/",
author = "Sean Bleier",
author_email = "[email protected]",
version = "0.9.7",
packages = ["redis_cache"],
description = "Redis Cache Backend for Django",
install_re... | <commit_before>from setuptools import setup
setup(
name = "django-redis-cache",
url = "http://github.com/sebleier/django-redis-cache/",
author = "Sean Bleier",
author_email = "[email protected]",
version = "0.9.7",
packages = ["redis_cache"],
description = "Redis Cache Backend for Django",... |
ffdfa7729c865c8e999bdfd4af49e3beb6899970 | test.py | test.py | import pdb
import time
import collections
import random
import itertools
import xmlrpclib
import dis
server_url = 'http://127.0.0.1:20738/RPC2'
server = xmlrpclib.Server(server_url)
G = server.ubigraph
def erdos ():
vert_ids = range(0,1000)
p = 0.001
G.clear()
pdb.set_trace()
for id in vert_ids:... | Add code to generate Erdos and preferential attachment graphs | Add code to generate Erdos and preferential attachment graphs
| Python | mit | hausdorff/python-api-breakin | Add code to generate Erdos and preferential attachment graphs | import pdb
import time
import collections
import random
import itertools
import xmlrpclib
import dis
server_url = 'http://127.0.0.1:20738/RPC2'
server = xmlrpclib.Server(server_url)
G = server.ubigraph
def erdos ():
vert_ids = range(0,1000)
p = 0.001
G.clear()
pdb.set_trace()
for id in vert_ids:... | <commit_before><commit_msg>Add code to generate Erdos and preferential attachment graphs<commit_after> | import pdb
import time
import collections
import random
import itertools
import xmlrpclib
import dis
server_url = 'http://127.0.0.1:20738/RPC2'
server = xmlrpclib.Server(server_url)
G = server.ubigraph
def erdos ():
vert_ids = range(0,1000)
p = 0.001
G.clear()
pdb.set_trace()
for id in vert_ids:... | Add code to generate Erdos and preferential attachment graphsimport pdb
import time
import collections
import random
import itertools
import xmlrpclib
import dis
server_url = 'http://127.0.0.1:20738/RPC2'
server = xmlrpclib.Server(server_url)
G = server.ubigraph
def erdos ():
vert_ids = range(0,1000)
p = 0.00... | <commit_before><commit_msg>Add code to generate Erdos and preferential attachment graphs<commit_after>import pdb
import time
import collections
import random
import itertools
import xmlrpclib
import dis
server_url = 'http://127.0.0.1:20738/RPC2'
server = xmlrpclib.Server(server_url)
G = server.ubigraph
def erdos ():
... | |
a08b469c50557803bad6f5f7b432f8b332b49421 | raiden/tests/unit/test_utils.py | raiden/tests/unit/test_utils.py | # -*- coding: utf-8 -*-
from raiden.utils import safe_equal_attributes
class Slotted(object):
__slots__ = (
'a',
'b',
)
def __eq__(self, other):
if isinstance(other, Slotted):
return (
safe_equal_attributes('a', self, other) and
safe_equ... | Add unit test for safe_equal_attributes | Add unit test for safe_equal_attributes
| Python | mit | tomashaber/raiden,hackaugusto/raiden,hackaugusto/raiden,tomashaber/raiden,tomashaber/raiden,tomashaber/raiden,tomashaber/raiden | Add unit test for safe_equal_attributes | # -*- coding: utf-8 -*-
from raiden.utils import safe_equal_attributes
class Slotted(object):
__slots__ = (
'a',
'b',
)
def __eq__(self, other):
if isinstance(other, Slotted):
return (
safe_equal_attributes('a', self, other) and
safe_equ... | <commit_before><commit_msg>Add unit test for safe_equal_attributes<commit_after> | # -*- coding: utf-8 -*-
from raiden.utils import safe_equal_attributes
class Slotted(object):
__slots__ = (
'a',
'b',
)
def __eq__(self, other):
if isinstance(other, Slotted):
return (
safe_equal_attributes('a', self, other) and
safe_equ... | Add unit test for safe_equal_attributes# -*- coding: utf-8 -*-
from raiden.utils import safe_equal_attributes
class Slotted(object):
__slots__ = (
'a',
'b',
)
def __eq__(self, other):
if isinstance(other, Slotted):
return (
safe_equal_attributes('a', se... | <commit_before><commit_msg>Add unit test for safe_equal_attributes<commit_after># -*- coding: utf-8 -*-
from raiden.utils import safe_equal_attributes
class Slotted(object):
__slots__ = (
'a',
'b',
)
def __eq__(self, other):
if isinstance(other, Slotted):
return (
... | |
40adfc3aa00fddd55d138d5af8fd77e2347879c1 | testrunner.py | testrunner.py |
def run_tests(name, globals_dict):
import sys
RED = '\033[91m'
BOLD = '\033[1m'
END = '\033[0m'
print (BOLD + 'Running tests for ' + name + ' ...' + END)
tests = [globals_dict.get(fn) for fn in globals_dict if fn.startswith('test_')]
for each in tests:
if callable(each):
... | Add basic unit testing functionality | Add basic unit testing functionality
| Python | mit | kashifrazzaqui/again | Add basic unit testing functionality |
def run_tests(name, globals_dict):
import sys
RED = '\033[91m'
BOLD = '\033[1m'
END = '\033[0m'
print (BOLD + 'Running tests for ' + name + ' ...' + END)
tests = [globals_dict.get(fn) for fn in globals_dict if fn.startswith('test_')]
for each in tests:
if callable(each):
... | <commit_before><commit_msg>Add basic unit testing functionality<commit_after> |
def run_tests(name, globals_dict):
import sys
RED = '\033[91m'
BOLD = '\033[1m'
END = '\033[0m'
print (BOLD + 'Running tests for ' + name + ' ...' + END)
tests = [globals_dict.get(fn) for fn in globals_dict if fn.startswith('test_')]
for each in tests:
if callable(each):
... | Add basic unit testing functionality
def run_tests(name, globals_dict):
import sys
RED = '\033[91m'
BOLD = '\033[1m'
END = '\033[0m'
print (BOLD + 'Running tests for ' + name + ' ...' + END)
tests = [globals_dict.get(fn) for fn in globals_dict if fn.startswith('test_')]
for each in tests:
... | <commit_before><commit_msg>Add basic unit testing functionality<commit_after>
def run_tests(name, globals_dict):
import sys
RED = '\033[91m'
BOLD = '\033[1m'
END = '\033[0m'
print (BOLD + 'Running tests for ' + name + ' ...' + END)
tests = [globals_dict.get(fn) for fn in globals_dict if fn.start... | |
7837709de7de97ecad91fb0eed6abe0d1c3be9d1 | rst2pdf/tests/input/test_180.py | rst2pdf/tests/input/test_180.py | # -*- coding: utf-8 -*-
from reportlab.platypus import SimpleDocTemplate
from reportlab.platypus.paragraph import Paragraph
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.colors import Color
from reportlab.platypus.flowables import _listWrapOn, _FUZZ
from wordaxe.rl.NewParagraph... | Test case for wordaxe bug | Test case for wordaxe bug | Python | mit | liuyi1112/rst2pdf,rst2pdf/rst2pdf,rst2pdf/rst2pdf,pombreda/rst2pdf,liuyi1112/rst2pdf,pombreda/rst2pdf | Test case for wordaxe bug | # -*- coding: utf-8 -*-
from reportlab.platypus import SimpleDocTemplate
from reportlab.platypus.paragraph import Paragraph
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.colors import Color
from reportlab.platypus.flowables import _listWrapOn, _FUZZ
from wordaxe.rl.NewParagraph... | <commit_before><commit_msg>Test case for wordaxe bug<commit_after> | # -*- coding: utf-8 -*-
from reportlab.platypus import SimpleDocTemplate
from reportlab.platypus.paragraph import Paragraph
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.colors import Color
from reportlab.platypus.flowables import _listWrapOn, _FUZZ
from wordaxe.rl.NewParagraph... | Test case for wordaxe bug# -*- coding: utf-8 -*-
from reportlab.platypus import SimpleDocTemplate
from reportlab.platypus.paragraph import Paragraph
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.colors import Color
from reportlab.platypus.flowables import _listWrapOn, _FUZZ
fro... | <commit_before><commit_msg>Test case for wordaxe bug<commit_after># -*- coding: utf-8 -*-
from reportlab.platypus import SimpleDocTemplate
from reportlab.platypus.paragraph import Paragraph
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.colors import Color
from reportlab.platypu... | |
cfe8a492c55779d0b4d998b6e3d6104c64794954 | prob3.py | prob3.py | # projecteuler.net/problem=3
def LargestPrimeFactor():
res = FindLargestPrimeNumber(600851475143)
print(res)
def FindLargestPrimeNumber(n):
i = n
while i > 1:
i = i - 1
if n % i == 0:
j = i
prime = True
while j > 2:
j = j - 1
if i % j == 0:
prime = False
break
i... | Add euler project 3 problem | Add euler project 3 problem
| Python | apache-2.0 | yuriyshapovalov/Prototypes,yuriyshapovalov/Prototypes,yuriyshapovalov/Prototypes | Add euler project 3 problem | # projecteuler.net/problem=3
def LargestPrimeFactor():
res = FindLargestPrimeNumber(600851475143)
print(res)
def FindLargestPrimeNumber(n):
i = n
while i > 1:
i = i - 1
if n % i == 0:
j = i
prime = True
while j > 2:
j = j - 1
if i % j == 0:
prime = False
break
i... | <commit_before><commit_msg>Add euler project 3 problem<commit_after> | # projecteuler.net/problem=3
def LargestPrimeFactor():
res = FindLargestPrimeNumber(600851475143)
print(res)
def FindLargestPrimeNumber(n):
i = n
while i > 1:
i = i - 1
if n % i == 0:
j = i
prime = True
while j > 2:
j = j - 1
if i % j == 0:
prime = False
break
i... | Add euler project 3 problem# projecteuler.net/problem=3
def LargestPrimeFactor():
res = FindLargestPrimeNumber(600851475143)
print(res)
def FindLargestPrimeNumber(n):
i = n
while i > 1:
i = i - 1
if n % i == 0:
j = i
prime = True
while j > 2:
j = j - 1
if i % j == 0:
prim... | <commit_before><commit_msg>Add euler project 3 problem<commit_after># projecteuler.net/problem=3
def LargestPrimeFactor():
res = FindLargestPrimeNumber(600851475143)
print(res)
def FindLargestPrimeNumber(n):
i = n
while i > 1:
i = i - 1
if n % i == 0:
j = i
prime = True
while j > 2:
... | |
13f5eea9472f19c19c082cbb4a0be3509b0d083f | astropy/utils/tests/test_parsing.py | astropy/utils/tests/test_parsing.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import importlib
import sys
from textwrap import dedent
import pytest
from astropy.utils.parsing import lex, yacc, TAB_HEADER
def _docstring_canary():
"""Docstring that's here just to check for -OO."""
@pytest.mark.skipif(not _docstring_canary._... | Add a unit test for utils.parsing | Add a unit test for utils.parsing
Most of the coverage comes from the main test suite, but this covers the
case where the lextab/parsetab does not yet exist and has to be
generated.
| Python | bsd-3-clause | astropy/astropy,aleksandr-bakanov/astropy,saimn/astropy,mhvk/astropy,dhomeier/astropy,dhomeier/astropy,astropy/astropy,StuartLittlefair/astropy,aleksandr-bakanov/astropy,larrybradley/astropy,saimn/astropy,mhvk/astropy,saimn/astropy,StuartLittlefair/astropy,dhomeier/astropy,dhomeier/astropy,aleksandr-bakanov/astropy,ale... | Add a unit test for utils.parsing
Most of the coverage comes from the main test suite, but this covers the
case where the lextab/parsetab does not yet exist and has to be
generated. | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import importlib
import sys
from textwrap import dedent
import pytest
from astropy.utils.parsing import lex, yacc, TAB_HEADER
def _docstring_canary():
"""Docstring that's here just to check for -OO."""
@pytest.mark.skipif(not _docstring_canary._... | <commit_before><commit_msg>Add a unit test for utils.parsing
Most of the coverage comes from the main test suite, but this covers the
case where the lextab/parsetab does not yet exist and has to be
generated.<commit_after> | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import importlib
import sys
from textwrap import dedent
import pytest
from astropy.utils.parsing import lex, yacc, TAB_HEADER
def _docstring_canary():
"""Docstring that's here just to check for -OO."""
@pytest.mark.skipif(not _docstring_canary._... | Add a unit test for utils.parsing
Most of the coverage comes from the main test suite, but this covers the
case where the lextab/parsetab does not yet exist and has to be
generated.# Licensed under a 3-clause BSD style license - see LICENSE.rst
import importlib
import sys
from textwrap import dedent
import pytest
f... | <commit_before><commit_msg>Add a unit test for utils.parsing
Most of the coverage comes from the main test suite, but this covers the
case where the lextab/parsetab does not yet exist and has to be
generated.<commit_after># Licensed under a 3-clause BSD style license - see LICENSE.rst
import importlib
import sys
from... | |
4138cc2833a267150dff994b65af59e85a038da4 | migrations/versions/900_add_brief_is_a_copy.py | migrations/versions/900_add_brief_is_a_copy.py | """Add Brief.is_a_copy boolean, default False, nullable False
Revision ID: 890
Revises: 880
Create Date: 2017-06-01 11:24:53.346954
"""
# revision identifiers, used by Alembic.
revision = '900'
down_revision = '890'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('briefs', sa.Colum... | Add Briefs.is_a_copy to replace Briefs.copied_from_brief_id | Add Briefs.is_a_copy to replace Briefs.copied_from_brief_id
| Python | mit | alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api | Add Briefs.is_a_copy to replace Briefs.copied_from_brief_id | """Add Brief.is_a_copy boolean, default False, nullable False
Revision ID: 890
Revises: 880
Create Date: 2017-06-01 11:24:53.346954
"""
# revision identifiers, used by Alembic.
revision = '900'
down_revision = '890'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('briefs', sa.Colum... | <commit_before><commit_msg>Add Briefs.is_a_copy to replace Briefs.copied_from_brief_id<commit_after> | """Add Brief.is_a_copy boolean, default False, nullable False
Revision ID: 890
Revises: 880
Create Date: 2017-06-01 11:24:53.346954
"""
# revision identifiers, used by Alembic.
revision = '900'
down_revision = '890'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('briefs', sa.Colum... | Add Briefs.is_a_copy to replace Briefs.copied_from_brief_id"""Add Brief.is_a_copy boolean, default False, nullable False
Revision ID: 890
Revises: 880
Create Date: 2017-06-01 11:24:53.346954
"""
# revision identifiers, used by Alembic.
revision = '900'
down_revision = '890'
from alembic import op
import sqlalchemy ... | <commit_before><commit_msg>Add Briefs.is_a_copy to replace Briefs.copied_from_brief_id<commit_after>"""Add Brief.is_a_copy boolean, default False, nullable False
Revision ID: 890
Revises: 880
Create Date: 2017-06-01 11:24:53.346954
"""
# revision identifiers, used by Alembic.
revision = '900'
down_revision = '890'
... | |
81d76fc7394a92e8495afe2aa616e55b000a2ddd | setup.py | setup.py | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2',
packages=['todoist'],
author='Doist Team',
author_email='in... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2.1',
packages=['todoist', 'todoist.managers'],
author='Doist Team'... | Fix problem with missing files from the PyPI package. | Fix problem with missing files from the PyPI package.
| Python | mit | electronick1/todoist-python,Doist/todoist-python | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2',
packages=['todoist'],
author='Doist Team',
author_email='in... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2.1',
packages=['todoist', 'todoist.managers'],
author='Doist Team'... | <commit_before># -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2',
packages=['todoist'],
author='Doist Team',
a... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2.1',
packages=['todoist', 'todoist.managers'],
author='Doist Team'... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2',
packages=['todoist'],
author='Doist Team',
author_email='in... | <commit_before># -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2',
packages=['todoist'],
author='Doist Team',
a... |
52c60eae9b750bcc85739b355d7b70eb238a0309 | tasks.py | tasks.py | #!/usr/bin/env python3
import subprocess
from invoke import task
@task
def test():
# invoke.run() does not color output, unfortunately
nosetests = subprocess.Popen(['nosetests-3.4', '--rednose'])
nosetests.wait()
@task
def cover():
nosetests = subprocess.Popen(['nosetests-3.4', '--with-coverage',
... | Add task file using invoke task runner | Add task file using invoke task runner
| Python | mit | caleb531/ssh-wp-backup,caleb531/ssh-wp-backup | Add task file using invoke task runner | #!/usr/bin/env python3
import subprocess
from invoke import task
@task
def test():
# invoke.run() does not color output, unfortunately
nosetests = subprocess.Popen(['nosetests-3.4', '--rednose'])
nosetests.wait()
@task
def cover():
nosetests = subprocess.Popen(['nosetests-3.4', '--with-coverage',
... | <commit_before><commit_msg>Add task file using invoke task runner<commit_after> | #!/usr/bin/env python3
import subprocess
from invoke import task
@task
def test():
# invoke.run() does not color output, unfortunately
nosetests = subprocess.Popen(['nosetests-3.4', '--rednose'])
nosetests.wait()
@task
def cover():
nosetests = subprocess.Popen(['nosetests-3.4', '--with-coverage',
... | Add task file using invoke task runner#!/usr/bin/env python3
import subprocess
from invoke import task
@task
def test():
# invoke.run() does not color output, unfortunately
nosetests = subprocess.Popen(['nosetests-3.4', '--rednose'])
nosetests.wait()
@task
def cover():
nosetests = subprocess.Popen(... | <commit_before><commit_msg>Add task file using invoke task runner<commit_after>#!/usr/bin/env python3
import subprocess
from invoke import task
@task
def test():
# invoke.run() does not color output, unfortunately
nosetests = subprocess.Popen(['nosetests-3.4', '--rednose'])
nosetests.wait()
@task
def c... | |
d672a413b613e1f6772ca74d07cb680b3a55bdfa | iss.py | iss.py | import requests
from datetime import datetime
def get_next_pass(lat, lon):
iss_url = 'http://api.open-notify.org/iss-pass.json'
location = {'lat': lat, 'lon': lon}
response = requests.get(iss_url, params=location).json()
next_pass = response['response'][0]['risetime']
return datetime.fromtimestam... | Implement function for retrieving ISS timestamps | Implement function for retrieving ISS timestamps
| Python | mit | sagnew/ISSNotifications,sagnew/ISSNotifications,sagnew/ISSNotifications | Implement function for retrieving ISS timestamps | import requests
from datetime import datetime
def get_next_pass(lat, lon):
iss_url = 'http://api.open-notify.org/iss-pass.json'
location = {'lat': lat, 'lon': lon}
response = requests.get(iss_url, params=location).json()
next_pass = response['response'][0]['risetime']
return datetime.fromtimestam... | <commit_before><commit_msg>Implement function for retrieving ISS timestamps<commit_after> | import requests
from datetime import datetime
def get_next_pass(lat, lon):
iss_url = 'http://api.open-notify.org/iss-pass.json'
location = {'lat': lat, 'lon': lon}
response = requests.get(iss_url, params=location).json()
next_pass = response['response'][0]['risetime']
return datetime.fromtimestam... | Implement function for retrieving ISS timestampsimport requests
from datetime import datetime
def get_next_pass(lat, lon):
iss_url = 'http://api.open-notify.org/iss-pass.json'
location = {'lat': lat, 'lon': lon}
response = requests.get(iss_url, params=location).json()
next_pass = response['response']... | <commit_before><commit_msg>Implement function for retrieving ISS timestamps<commit_after>import requests
from datetime import datetime
def get_next_pass(lat, lon):
iss_url = 'http://api.open-notify.org/iss-pass.json'
location = {'lat': lat, 'lon': lon}
response = requests.get(iss_url, params=location).jso... | |
513cc91530657173de6c5dd35a10a1b496d31042 | mpy.py | mpy.py | with open('generic.txt') as old:
for line in old:
line.strip()
mlength = len(line)-1
with open('generic-'+str(mlength)+'.txt', 'a') as new:
new.write(line) | Add script to process domain name | Add script to process domain name
| Python | mit | luongnv89/uri_proc,luongnv89/uri_proc | Add script to process domain name | with open('generic.txt') as old:
for line in old:
line.strip()
mlength = len(line)-1
with open('generic-'+str(mlength)+'.txt', 'a') as new:
new.write(line) | <commit_before><commit_msg>Add script to process domain name<commit_after> | with open('generic.txt') as old:
for line in old:
line.strip()
mlength = len(line)-1
with open('generic-'+str(mlength)+'.txt', 'a') as new:
new.write(line) | Add script to process domain namewith open('generic.txt') as old:
for line in old:
line.strip()
mlength = len(line)-1
with open('generic-'+str(mlength)+'.txt', 'a') as new:
new.write(line) | <commit_before><commit_msg>Add script to process domain name<commit_after>with open('generic.txt') as old:
for line in old:
line.strip()
mlength = len(line)-1
with open('generic-'+str(mlength)+'.txt', 'a') as new:
new.write(line) | |
9e01cc5c4a0e148842c2e7fc5726dc7ee4325472 | utils.py | utils.py | """ Standard shared utilities. """
import time
class PhasedLoopLimitter:
""" Constrains a loop to running a particular number of iterations per second.
"""
def __init__(self, rate):
""" Args:
rate: How much time should elapse between each cycle. """
self.__ticks = rate
self.__last_run_time ... | Add phased loop limitter class. | Add phased loop limitter class.
This is needed for Aggregator to work.
| Python | mit | NepalRobotics/Core | Add phased loop limitter class.
This is needed for Aggregator to work. | """ Standard shared utilities. """
import time
class PhasedLoopLimitter:
""" Constrains a loop to running a particular number of iterations per second.
"""
def __init__(self, rate):
""" Args:
rate: How much time should elapse between each cycle. """
self.__ticks = rate
self.__last_run_time ... | <commit_before><commit_msg>Add phased loop limitter class.
This is needed for Aggregator to work.<commit_after> | """ Standard shared utilities. """
import time
class PhasedLoopLimitter:
""" Constrains a loop to running a particular number of iterations per second.
"""
def __init__(self, rate):
""" Args:
rate: How much time should elapse between each cycle. """
self.__ticks = rate
self.__last_run_time ... | Add phased loop limitter class.
This is needed for Aggregator to work.""" Standard shared utilities. """
import time
class PhasedLoopLimitter:
""" Constrains a loop to running a particular number of iterations per second.
"""
def __init__(self, rate):
""" Args:
rate: How much time should elapse be... | <commit_before><commit_msg>Add phased loop limitter class.
This is needed for Aggregator to work.<commit_after>""" Standard shared utilities. """
import time
class PhasedLoopLimitter:
""" Constrains a loop to running a particular number of iterations per second.
"""
def __init__(self, rate):
""" Args:
... | |
f9aa5263f70658705e37ec3b1cc20b2a556f1089 | views.py | views.py | from flask.ext.restful import Resource, abort
from finder.models import Card
from finder import api
#fields, marshal_with
#gen_fields = {
# 'key': fields.Raw,
# 'salt': fields.Raw,
# 'expiration': fields.Raw
#}
class Greet(Resource):
#@marshal_with(gen_fields)
def get(self, name):
if name ... | Add test view for debugging | Add test view for debugging
| Python | mit | numberoverzero/finder | Add test view for debugging | from flask.ext.restful import Resource, abort
from finder.models import Card
from finder import api
#fields, marshal_with
#gen_fields = {
# 'key': fields.Raw,
# 'salt': fields.Raw,
# 'expiration': fields.Raw
#}
class Greet(Resource):
#@marshal_with(gen_fields)
def get(self, name):
if name ... | <commit_before><commit_msg>Add test view for debugging<commit_after> | from flask.ext.restful import Resource, abort
from finder.models import Card
from finder import api
#fields, marshal_with
#gen_fields = {
# 'key': fields.Raw,
# 'salt': fields.Raw,
# 'expiration': fields.Raw
#}
class Greet(Resource):
#@marshal_with(gen_fields)
def get(self, name):
if name ... | Add test view for debuggingfrom flask.ext.restful import Resource, abort
from finder.models import Card
from finder import api
#fields, marshal_with
#gen_fields = {
# 'key': fields.Raw,
# 'salt': fields.Raw,
# 'expiration': fields.Raw
#}
class Greet(Resource):
#@marshal_with(gen_fields)
def get(se... | <commit_before><commit_msg>Add test view for debugging<commit_after>from flask.ext.restful import Resource, abort
from finder.models import Card
from finder import api
#fields, marshal_with
#gen_fields = {
# 'key': fields.Raw,
# 'salt': fields.Raw,
# 'expiration': fields.Raw
#}
class Greet(Resource):
... | |
51566a873372b23b5c05d376d346dab063f87437 | photutils/utils/tests/test_quantity_helpers.py | photutils/utils/tests/test_quantity_helpers.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the _quantity_helpers module.
"""
import astropy.units as u
import numpy as np
from numpy.testing import assert_equal
import pytest
from .._quantity_helpers import process_quantities
@pytest.mark.parametrize('all_units', (False, True))
de... | Add tests for quantity helpers | Add tests for quantity helpers
| Python | bsd-3-clause | larrybradley/photutils,astropy/photutils | Add tests for quantity helpers | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the _quantity_helpers module.
"""
import astropy.units as u
import numpy as np
from numpy.testing import assert_equal
import pytest
from .._quantity_helpers import process_quantities
@pytest.mark.parametrize('all_units', (False, True))
de... | <commit_before><commit_msg>Add tests for quantity helpers<commit_after> | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the _quantity_helpers module.
"""
import astropy.units as u
import numpy as np
from numpy.testing import assert_equal
import pytest
from .._quantity_helpers import process_quantities
@pytest.mark.parametrize('all_units', (False, True))
de... | Add tests for quantity helpers# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the _quantity_helpers module.
"""
import astropy.units as u
import numpy as np
from numpy.testing import assert_equal
import pytest
from .._quantity_helpers import process_quantities
@pytest.mark.parametrize(... | <commit_before><commit_msg>Add tests for quantity helpers<commit_after># Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the _quantity_helpers module.
"""
import astropy.units as u
import numpy as np
from numpy.testing import assert_equal
import pytest
from .._quantity_helpers import proce... | |
6885eb0cb50f2af39075f6bec13e95c648f3a19f | py/construct-binary-tree-from-preorder-and-inorder-traversal.py | py/construct-binary-tree-from-preorder-and-inorder-traversal.py | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def buildTree(self, preorder, inorder):
"""
:type preorder: List[int]
:type inorder: List[int]
... | Add py solution for 105. Construct Binary Tree from Preorder and Inorder Traversal | Add py solution for 105. Construct Binary Tree from Preorder and Inorder Traversal
105. Construct Binary Tree from Preorder and Inorder Traversal: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
| Python | apache-2.0 | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | Add py solution for 105. Construct Binary Tree from Preorder and Inorder Traversal
105. Construct Binary Tree from Preorder and Inorder Traversal: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/ | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def buildTree(self, preorder, inorder):
"""
:type preorder: List[int]
:type inorder: List[int]
... | <commit_before><commit_msg>Add py solution for 105. Construct Binary Tree from Preorder and Inorder Traversal
105. Construct Binary Tree from Preorder and Inorder Traversal: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/<commit_after> | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def buildTree(self, preorder, inorder):
"""
:type preorder: List[int]
:type inorder: List[int]
... | Add py solution for 105. Construct Binary Tree from Preorder and Inorder Traversal
105. Construct Binary Tree from Preorder and Inorder Traversal: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(se... | <commit_before><commit_msg>Add py solution for 105. Construct Binary Tree from Preorder and Inorder Traversal
105. Construct Binary Tree from Preorder and Inorder Traversal: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/<commit_after># Definition for a binary tree node.
# clas... | |
927d3666e45f8f1e34584f244de7bf5df42f82e2 | AESECB.py | AESECB.py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
from Crypto.Cipher import AES
import base64
class ECB:
def __init__(self, key):
self.key = key.encode()
self.ECBCipher = AES.new(key, AES.MODE_ECB)
def encrypt(self, text):
"""
Encrypt a plain text (byte string) using AES i... | Add encryption and decryption using ECB | Add encryption and decryption using ECB
| Python | mit | lttviet/randomPy | Add encryption and decryption using ECB | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
from Crypto.Cipher import AES
import base64
class ECB:
def __init__(self, key):
self.key = key.encode()
self.ECBCipher = AES.new(key, AES.MODE_ECB)
def encrypt(self, text):
"""
Encrypt a plain text (byte string) using AES i... | <commit_before><commit_msg>Add encryption and decryption using ECB<commit_after> | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
from Crypto.Cipher import AES
import base64
class ECB:
def __init__(self, key):
self.key = key.encode()
self.ECBCipher = AES.new(key, AES.MODE_ECB)
def encrypt(self, text):
"""
Encrypt a plain text (byte string) using AES i... | Add encryption and decryption using ECB#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
from Crypto.Cipher import AES
import base64
class ECB:
def __init__(self, key):
self.key = key.encode()
self.ECBCipher = AES.new(key, AES.MODE_ECB)
def encrypt(self, text):
"""
Encrypt... | <commit_before><commit_msg>Add encryption and decryption using ECB<commit_after>#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
from Crypto.Cipher import AES
import base64
class ECB:
def __init__(self, key):
self.key = key.encode()
self.ECBCipher = AES.new(key, AES.MODE_ECB)
def encrypt... | |
4b399ae2e29a37e6707d0745e0c829976223f84d | falafel/mappers/tests/test_xfs_info.py | falafel/mappers/tests/test_xfs_info.py | from falafel.mappers import xfs_info
from falafel.tests import context_wrap
class TestXFSInfo():
def test_example_xfs_info(self):
xfs_info = xfs_info.XFSInfo(context_wrap("""
meta-data=/dev/sda isize=256 agcount=32, agsize=16777184 blks
= sectsz=512 attr=2
data = ... | Test of xfs_info mapper with info from 'man xfs_info' | Test of xfs_info mapper with info from 'man xfs_info'
| Python | apache-2.0 | RedHatInsights/insights-core,RedHatInsights/insights-core | Test of xfs_info mapper with info from 'man xfs_info' | from falafel.mappers import xfs_info
from falafel.tests import context_wrap
class TestXFSInfo():
def test_example_xfs_info(self):
xfs_info = xfs_info.XFSInfo(context_wrap("""
meta-data=/dev/sda isize=256 agcount=32, agsize=16777184 blks
= sectsz=512 attr=2
data = ... | <commit_before><commit_msg>Test of xfs_info mapper with info from 'man xfs_info'<commit_after> | from falafel.mappers import xfs_info
from falafel.tests import context_wrap
class TestXFSInfo():
def test_example_xfs_info(self):
xfs_info = xfs_info.XFSInfo(context_wrap("""
meta-data=/dev/sda isize=256 agcount=32, agsize=16777184 blks
= sectsz=512 attr=2
data = ... | Test of xfs_info mapper with info from 'man xfs_info'from falafel.mappers import xfs_info
from falafel.tests import context_wrap
class TestXFSInfo():
def test_example_xfs_info(self):
xfs_info = xfs_info.XFSInfo(context_wrap("""
meta-data=/dev/sda isize=256 agcount=32, agsize=16777184 blks
... | <commit_before><commit_msg>Test of xfs_info mapper with info from 'man xfs_info'<commit_after>from falafel.mappers import xfs_info
from falafel.tests import context_wrap
class TestXFSInfo():
def test_example_xfs_info(self):
xfs_info = xfs_info.XFSInfo(context_wrap("""
meta-data=/dev/sda isize=256 ... | |
6d5a715b4d6ee2a471cafb4f31eb9b1716f34884 | snippets/base/migrations/0025_dailychannelmetrics_dailycountrymetrics_dailysnippetsmetrics.py | snippets/base/migrations/0025_dailychannelmetrics_dailycountrymetrics_dailysnippetsmetrics.py | # Generated by Django 2.2.6 on 2019-12-04 18:57
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('base', '0024_auto_20191119_1424'),
]
operations = [
migrations.CreateModel(
name='DailyCountryM... | Add migrations for Daily{Channel,Country,Snippets}Metrics models | Add migrations for Daily{Channel,Country,Snippets}Metrics models
| Python | mpl-2.0 | glogiotatidis/snippets-service,glogiotatidis/snippets-service,glogiotatidis/snippets-service,glogiotatidis/snippets-service,mozmar/snippets-service,mozmar/snippets-service,mozmar/snippets-service,mozmar/snippets-service | Add migrations for Daily{Channel,Country,Snippets}Metrics models | # Generated by Django 2.2.6 on 2019-12-04 18:57
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('base', '0024_auto_20191119_1424'),
]
operations = [
migrations.CreateModel(
name='DailyCountryM... | <commit_before><commit_msg>Add migrations for Daily{Channel,Country,Snippets}Metrics models<commit_after> | # Generated by Django 2.2.6 on 2019-12-04 18:57
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('base', '0024_auto_20191119_1424'),
]
operations = [
migrations.CreateModel(
name='DailyCountryM... | Add migrations for Daily{Channel,Country,Snippets}Metrics models# Generated by Django 2.2.6 on 2019-12-04 18:57
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('base', '0024_auto_20191119_1424'),
]
operations = [... | <commit_before><commit_msg>Add migrations for Daily{Channel,Country,Snippets}Metrics models<commit_after># Generated by Django 2.2.6 on 2019-12-04 18:57
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('base', '0024_auto_2... | |
d7c8c43854f30d46f9a6d7367700e4fe5dc0b48d | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
# README = "/".join([os.path.dirname(__file__), "README.md"])
# with open(README) as file:
# long_description = file.read()
setup(
name='graphitesend',
version='0.4.0',
description='A simple interface for sending metrics to Graphite',
auth... | #!/usr/bin/env python
from distutils.core import setup
# README = "/".join([os.path.dirname(__file__), "README.md"])
# with open(README) as file:
# long_description = file.read()
setup(
name='graphitesend',
version='0.4.0',
description='A simple interface for sending metrics to Graphite',
auth... | Add gevent as an extra requirement | Add gevent as an extra requirement
| Python | apache-2.0 | daniellawrence/graphitesend,numberly/graphitesend,PabloLefort/graphitesend | #!/usr/bin/env python
from distutils.core import setup
# README = "/".join([os.path.dirname(__file__), "README.md"])
# with open(README) as file:
# long_description = file.read()
setup(
name='graphitesend',
version='0.4.0',
description='A simple interface for sending metrics to Graphite',
auth... | #!/usr/bin/env python
from distutils.core import setup
# README = "/".join([os.path.dirname(__file__), "README.md"])
# with open(README) as file:
# long_description = file.read()
setup(
name='graphitesend',
version='0.4.0',
description='A simple interface for sending metrics to Graphite',
auth... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
# README = "/".join([os.path.dirname(__file__), "README.md"])
# with open(README) as file:
# long_description = file.read()
setup(
name='graphitesend',
version='0.4.0',
description='A simple interface for sending metrics to Grap... | #!/usr/bin/env python
from distutils.core import setup
# README = "/".join([os.path.dirname(__file__), "README.md"])
# with open(README) as file:
# long_description = file.read()
setup(
name='graphitesend',
version='0.4.0',
description='A simple interface for sending metrics to Graphite',
auth... | #!/usr/bin/env python
from distutils.core import setup
# README = "/".join([os.path.dirname(__file__), "README.md"])
# with open(README) as file:
# long_description = file.read()
setup(
name='graphitesend',
version='0.4.0',
description='A simple interface for sending metrics to Graphite',
auth... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
# README = "/".join([os.path.dirname(__file__), "README.md"])
# with open(README) as file:
# long_description = file.read()
setup(
name='graphitesend',
version='0.4.0',
description='A simple interface for sending metrics to Grap... |
43bc683d80c620d9752e68a317d51891a00a060a | common/djangoapps/split_modulestore_django/migrations/0002_data_migration.py | common/djangoapps/split_modulestore_django/migrations/0002_data_migration.py | from django.db import migrations, models
from django.db.utils import IntegrityError
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore
from ..models import SplitModulestoreCourseIndex as SplitModulestoreCourseIndex_Real
def forwards_func(apps, schema_editor):
"""... | Add a data migration to copy all course index data into MySQL | feat: Add a data migration to copy all course index data into MySQL
| Python | agpl-3.0 | arbrandes/edx-platform,angelapper/edx-platform,eduNEXT/edx-platform,edx/edx-platform,angelapper/edx-platform,arbrandes/edx-platform,arbrandes/edx-platform,eduNEXT/edx-platform,edx/edx-platform,edx/edx-platform,arbrandes/edx-platform,edx/edx-platform,eduNEXT/edx-platform,angelapper/edx-platform,angelapper/edx-platform,e... | feat: Add a data migration to copy all course index data into MySQL | from django.db import migrations, models
from django.db.utils import IntegrityError
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore
from ..models import SplitModulestoreCourseIndex as SplitModulestoreCourseIndex_Real
def forwards_func(apps, schema_editor):
"""... | <commit_before><commit_msg>feat: Add a data migration to copy all course index data into MySQL<commit_after> | from django.db import migrations, models
from django.db.utils import IntegrityError
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore
from ..models import SplitModulestoreCourseIndex as SplitModulestoreCourseIndex_Real
def forwards_func(apps, schema_editor):
"""... | feat: Add a data migration to copy all course index data into MySQLfrom django.db import migrations, models
from django.db.utils import IntegrityError
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore
from ..models import SplitModulestoreCourseIndex as SplitModulestor... | <commit_before><commit_msg>feat: Add a data migration to copy all course index data into MySQL<commit_after>from django.db import migrations, models
from django.db.utils import IntegrityError
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.django import modulestore
from ..models import Split... | |
1704b5febfae5b3d980fc2a6bd599bbe6aee1147 | zonegen.py | zonegen.py | #!/usr/bin/env python3
import lglass.generators.dns
import lglass.database
if __name__ == "__main__":
import argparse
argparser = argparse.ArgumentParser(description="Delegation-only zone file generator")
argparser.add_argument("--database", "--db", "-d", help="Whois database",
type=str, default=".")
argparse... | Add simple zone generator script | Add simple zone generator script
| Python | mit | fritz0705/lglass | Add simple zone generator script | #!/usr/bin/env python3
import lglass.generators.dns
import lglass.database
if __name__ == "__main__":
import argparse
argparser = argparse.ArgumentParser(description="Delegation-only zone file generator")
argparser.add_argument("--database", "--db", "-d", help="Whois database",
type=str, default=".")
argparse... | <commit_before><commit_msg>Add simple zone generator script<commit_after> | #!/usr/bin/env python3
import lglass.generators.dns
import lglass.database
if __name__ == "__main__":
import argparse
argparser = argparse.ArgumentParser(description="Delegation-only zone file generator")
argparser.add_argument("--database", "--db", "-d", help="Whois database",
type=str, default=".")
argparse... | Add simple zone generator script#!/usr/bin/env python3
import lglass.generators.dns
import lglass.database
if __name__ == "__main__":
import argparse
argparser = argparse.ArgumentParser(description="Delegation-only zone file generator")
argparser.add_argument("--database", "--db", "-d", help="Whois database",
... | <commit_before><commit_msg>Add simple zone generator script<commit_after>#!/usr/bin/env python3
import lglass.generators.dns
import lglass.database
if __name__ == "__main__":
import argparse
argparser = argparse.ArgumentParser(description="Delegation-only zone file generator")
argparser.add_argument("--database",... | |
32d1e6981d92d19a58f7a56910bd8709a5bbfc27 | python/src/twoSum/testTwoSum.py | python/src/twoSum/testTwoSum.py | import unittest
from twoSum import Solution
class TestTwoSum(unittest.TestCase):
def testLeetCodeExamplePasses(self):
solution = Solution()
numbers = [2, 7, 11, 15]
target = 9
self.assertEqual(solution.twoSum(numbers, target), (1, 2))
def testUnorderedList(self):
... | Add two test cases for twoSum problem. | Add two test cases for twoSum problem.
| Python | mit | TheGhostHuCodes/leetCode | Add two test cases for twoSum problem. | import unittest
from twoSum import Solution
class TestTwoSum(unittest.TestCase):
def testLeetCodeExamplePasses(self):
solution = Solution()
numbers = [2, 7, 11, 15]
target = 9
self.assertEqual(solution.twoSum(numbers, target), (1, 2))
def testUnorderedList(self):
... | <commit_before><commit_msg>Add two test cases for twoSum problem.<commit_after> | import unittest
from twoSum import Solution
class TestTwoSum(unittest.TestCase):
def testLeetCodeExamplePasses(self):
solution = Solution()
numbers = [2, 7, 11, 15]
target = 9
self.assertEqual(solution.twoSum(numbers, target), (1, 2))
def testUnorderedList(self):
... | Add two test cases for twoSum problem.import unittest
from twoSum import Solution
class TestTwoSum(unittest.TestCase):
def testLeetCodeExamplePasses(self):
solution = Solution()
numbers = [2, 7, 11, 15]
target = 9
self.assertEqual(solution.twoSum(numbers, target), (1, 2))
... | <commit_before><commit_msg>Add two test cases for twoSum problem.<commit_after>import unittest
from twoSum import Solution
class TestTwoSum(unittest.TestCase):
def testLeetCodeExamplePasses(self):
solution = Solution()
numbers = [2, 7, 11, 15]
target = 9
self.assertEqual(solution.tw... | |
02ab3c0629100f5d55f9864f6d5183860a6c16fd | tests/cli/test_map_predict.py | tests/cli/test_map_predict.py | """ Test ``yatsm map predict ...``
"""
from click.testing import CliRunner
import numpy as np
from yatsm.cli.main import cli
# Truth for diagonals
diag = np.eye(5).astype(bool)
# SWIR answers
BAND_SWIR = 4
pred_swir = np.array([-9999, 723, 1279, 3261, 2885], dtype=np.int16)
def test_map_predict_pass_1(example_resu... | Add test for mapping predictions | Add test for mapping predictions
| Python | mit | valpasq/yatsm,c11/yatsm,ceholden/yatsm,c11/yatsm,valpasq/yatsm,ceholden/yatsm | Add test for mapping predictions | """ Test ``yatsm map predict ...``
"""
from click.testing import CliRunner
import numpy as np
from yatsm.cli.main import cli
# Truth for diagonals
diag = np.eye(5).astype(bool)
# SWIR answers
BAND_SWIR = 4
pred_swir = np.array([-9999, 723, 1279, 3261, 2885], dtype=np.int16)
def test_map_predict_pass_1(example_resu... | <commit_before><commit_msg>Add test for mapping predictions<commit_after> | """ Test ``yatsm map predict ...``
"""
from click.testing import CliRunner
import numpy as np
from yatsm.cli.main import cli
# Truth for diagonals
diag = np.eye(5).astype(bool)
# SWIR answers
BAND_SWIR = 4
pred_swir = np.array([-9999, 723, 1279, 3261, 2885], dtype=np.int16)
def test_map_predict_pass_1(example_resu... | Add test for mapping predictions""" Test ``yatsm map predict ...``
"""
from click.testing import CliRunner
import numpy as np
from yatsm.cli.main import cli
# Truth for diagonals
diag = np.eye(5).astype(bool)
# SWIR answers
BAND_SWIR = 4
pred_swir = np.array([-9999, 723, 1279, 3261, 2885], dtype=np.int16)
def test... | <commit_before><commit_msg>Add test for mapping predictions<commit_after>""" Test ``yatsm map predict ...``
"""
from click.testing import CliRunner
import numpy as np
from yatsm.cli.main import cli
# Truth for diagonals
diag = np.eye(5).astype(bool)
# SWIR answers
BAND_SWIR = 4
pred_swir = np.array([-9999, 723, 1279... | |
93685b0c74ca6574f4e4db31edf8360b6c0cdca8 | resolvebackup.py | resolvebackup.py | #! /usr/bin/env python
# Davinci Resolve 12 and above Disk Database project backup utility.
# Igor Ridanovic, HDhead.com
import os
import sys
import getpass
import time
from shutil import make_archive
from datetime import datetime
import tkMessageBox
# Report error and exit
def errorwindow(report):
tkMessageBox.sho... | Resolve Disk Database backup tool | Resolve Disk Database backup tool
| Python | mit | IgorRidanovic/resolve-backup | Resolve Disk Database backup tool | #! /usr/bin/env python
# Davinci Resolve 12 and above Disk Database project backup utility.
# Igor Ridanovic, HDhead.com
import os
import sys
import getpass
import time
from shutil import make_archive
from datetime import datetime
import tkMessageBox
# Report error and exit
def errorwindow(report):
tkMessageBox.sho... | <commit_before><commit_msg>Resolve Disk Database backup tool<commit_after> | #! /usr/bin/env python
# Davinci Resolve 12 and above Disk Database project backup utility.
# Igor Ridanovic, HDhead.com
import os
import sys
import getpass
import time
from shutil import make_archive
from datetime import datetime
import tkMessageBox
# Report error and exit
def errorwindow(report):
tkMessageBox.sho... | Resolve Disk Database backup tool#! /usr/bin/env python
# Davinci Resolve 12 and above Disk Database project backup utility.
# Igor Ridanovic, HDhead.com
import os
import sys
import getpass
import time
from shutil import make_archive
from datetime import datetime
import tkMessageBox
# Report error and exit
def error... | <commit_before><commit_msg>Resolve Disk Database backup tool<commit_after>#! /usr/bin/env python
# Davinci Resolve 12 and above Disk Database project backup utility.
# Igor Ridanovic, HDhead.com
import os
import sys
import getpass
import time
from shutil import make_archive
from datetime import datetime
import tkMess... | |
d8bd544112ee268a58cc24be148d4b672a488128 | parse_dump.py | parse_dump.py | #!/usr/bin/python
#
# Copyright (c) 2007-2008 The PyAMF Project.
# See LICENSE for details.
"""
Extracts and displays information for files that contain AMF data.
"""
import glob
from optparse import OptionParser
from fnmatch import fnmatch
import pyamf
from pyamf import remoting
def parse_options():
"""
Pa... | Move ParseDump script to dumps folder. | Move ParseDump script to dumps folder.
| Python | mit | thijstriemstra/pyamf-dumps | Move ParseDump script to dumps folder. | #!/usr/bin/python
#
# Copyright (c) 2007-2008 The PyAMF Project.
# See LICENSE for details.
"""
Extracts and displays information for files that contain AMF data.
"""
import glob
from optparse import OptionParser
from fnmatch import fnmatch
import pyamf
from pyamf import remoting
def parse_options():
"""
Pa... | <commit_before><commit_msg>Move ParseDump script to dumps folder.<commit_after> | #!/usr/bin/python
#
# Copyright (c) 2007-2008 The PyAMF Project.
# See LICENSE for details.
"""
Extracts and displays information for files that contain AMF data.
"""
import glob
from optparse import OptionParser
from fnmatch import fnmatch
import pyamf
from pyamf import remoting
def parse_options():
"""
Pa... | Move ParseDump script to dumps folder.#!/usr/bin/python
#
# Copyright (c) 2007-2008 The PyAMF Project.
# See LICENSE for details.
"""
Extracts and displays information for files that contain AMF data.
"""
import glob
from optparse import OptionParser
from fnmatch import fnmatch
import pyamf
from pyamf import remotin... | <commit_before><commit_msg>Move ParseDump script to dumps folder.<commit_after>#!/usr/bin/python
#
# Copyright (c) 2007-2008 The PyAMF Project.
# See LICENSE for details.
"""
Extracts and displays information for files that contain AMF data.
"""
import glob
from optparse import OptionParser
from fnmatch import fnmatc... | |
7c6dfd810e0567a0aa24515f8d57a5d609e38e95 | ideascube/conf/kb_esp_avanti.py | ideascube/conf/kb_esp_avanti.py | # -*- coding: utf-8 -*-
"""KoomBook conf"""
from .kb import * # noqa
LANGUAGE_CODE = 'es'
IDEASCUBE_NAME = 'Avanti'
HOME_CARDS = STAFF_HOME_CARDS + [
{
'id': 'blog',
},
{
'id': 'mediacenter',
},
{
'id': 'gutenberg',
'lang': 'es',
},
{
'id': 'wikipedi... | Add conf file for Avanti KoomBook | Add conf file for Avanti KoomBook
| Python | agpl-3.0 | ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube | Add conf file for Avanti KoomBook | # -*- coding: utf-8 -*-
"""KoomBook conf"""
from .kb import * # noqa
LANGUAGE_CODE = 'es'
IDEASCUBE_NAME = 'Avanti'
HOME_CARDS = STAFF_HOME_CARDS + [
{
'id': 'blog',
},
{
'id': 'mediacenter',
},
{
'id': 'gutenberg',
'lang': 'es',
},
{
'id': 'wikipedi... | <commit_before><commit_msg>Add conf file for Avanti KoomBook<commit_after> | # -*- coding: utf-8 -*-
"""KoomBook conf"""
from .kb import * # noqa
LANGUAGE_CODE = 'es'
IDEASCUBE_NAME = 'Avanti'
HOME_CARDS = STAFF_HOME_CARDS + [
{
'id': 'blog',
},
{
'id': 'mediacenter',
},
{
'id': 'gutenberg',
'lang': 'es',
},
{
'id': 'wikipedi... | Add conf file for Avanti KoomBook# -*- coding: utf-8 -*-
"""KoomBook conf"""
from .kb import * # noqa
LANGUAGE_CODE = 'es'
IDEASCUBE_NAME = 'Avanti'
HOME_CARDS = STAFF_HOME_CARDS + [
{
'id': 'blog',
},
{
'id': 'mediacenter',
},
{
'id': 'gutenberg',
'lang': 'es',
... | <commit_before><commit_msg>Add conf file for Avanti KoomBook<commit_after># -*- coding: utf-8 -*-
"""KoomBook conf"""
from .kb import * # noqa
LANGUAGE_CODE = 'es'
IDEASCUBE_NAME = 'Avanti'
HOME_CARDS = STAFF_HOME_CARDS + [
{
'id': 'blog',
},
{
'id': 'mediacenter',
},
{
'id... | |
328bb2cd8eb55d1a1627f96c7a8ab77972ab49c9 | mistral/db/sqlalchemy/migration/alembic_migrations/versions/026_optimize_task_expression_func.py | mistral/db/sqlalchemy/migration/alembic_migrations/versions/026_optimize_task_expression_func.py | # Copyright 2018 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | Add new indexes to optimize `task().result` expression function | Add new indexes to optimize `task().result` expression function
Change-Id: I94707368dbfe363a2b909985d3bd24dbae8e67f6
| Python | apache-2.0 | openstack/mistral,openstack/mistral | Add new indexes to optimize `task().result` expression function
Change-Id: I94707368dbfe363a2b909985d3bd24dbae8e67f6 | # Copyright 2018 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | <commit_before><commit_msg>Add new indexes to optimize `task().result` expression function
Change-Id: I94707368dbfe363a2b909985d3bd24dbae8e67f6<commit_after> | # Copyright 2018 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | Add new indexes to optimize `task().result` expression function
Change-Id: I94707368dbfe363a2b909985d3bd24dbae8e67f6# Copyright 2018 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of th... | <commit_before><commit_msg>Add new indexes to optimize `task().result` expression function
Change-Id: I94707368dbfe363a2b909985d3bd24dbae8e67f6<commit_after># Copyright 2018 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with t... | |
86fdb5e1fbf473cd152769428e14dc1a6362ce39 | ris_widget/qdelegates/tint_delegate.py | ris_widget/qdelegates/tint_delegate.py | # The MIT License (MIT)
#
# Copyright (c) 2015 WUSTL ZPLAB
#
# 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, modif... | Add accidentally omitted TintDelegate source file. | Add accidentally omitted TintDelegate source file.
| Python | mit | zpincus/RisWidget,zpincus/RisWidget,erikhvatum/RisWidget,erikhvatum/RisWidget | Add accidentally omitted TintDelegate source file. | # The MIT License (MIT)
#
# Copyright (c) 2015 WUSTL ZPLAB
#
# 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, modif... | <commit_before><commit_msg>Add accidentally omitted TintDelegate source file.<commit_after> | # The MIT License (MIT)
#
# Copyright (c) 2015 WUSTL ZPLAB
#
# 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, modif... | Add accidentally omitted TintDelegate source file.# The MIT License (MIT)
#
# Copyright (c) 2015 WUSTL ZPLAB
#
# 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 w... | <commit_before><commit_msg>Add accidentally omitted TintDelegate source file.<commit_after># The MIT License (MIT)
#
# Copyright (c) 2015 WUSTL ZPLAB
#
# 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 ... | |
be2c64f5e30196653f33c3b1bca4a093e7fdd2ff | recipes/skia.py | recipes/skia.py | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import recipe_util # pylint: disable=F0401
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232
cla... | Add fetch recipe for the Skia repository. | Add fetch recipe for the Skia repository.
Tested with the following command lines:
$ cd somewhere
$ mkdir some-test-dir
$ cd some-test-dir
$ fetch skia
$ cd skia
# confirm it is what we expected.
BUG=None
TEST=see above
[email protected]
Review URL: https://codereview.chromium.org/746363003
git-svn-id: fd409f... | Python | bsd-3-clause | primiano/depot_tools,sarvex/depot-tools,HackFisher/depot_tools,HackFisher/depot_tools,Midrya/chromium,npe9/depot_tools,eatbyte/depot_tools,airtimemedia/depot_tools,fracting/depot_tools,disigma/depot_tools,gcodetogit/depot_tools,fracting/depot_tools,mlufei/depot_tools,duanwujie/depot_tools,azunite/chrome_build,aleonliao... | Add fetch recipe for the Skia repository.
Tested with the following command lines:
$ cd somewhere
$ mkdir some-test-dir
$ cd some-test-dir
$ fetch skia
$ cd skia
# confirm it is what we expected.
BUG=None
TEST=see above
[email protected]
Review URL: https://codereview.chromium.org/746363003
git-svn-id: fd409f... | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import recipe_util # pylint: disable=F0401
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232
cla... | <commit_before><commit_msg>Add fetch recipe for the Skia repository.
Tested with the following command lines:
$ cd somewhere
$ mkdir some-test-dir
$ cd some-test-dir
$ fetch skia
$ cd skia
# confirm it is what we expected.
BUG=None
TEST=see above
[email protected]
Review URL: https://codereview.chromium.org/74... | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import recipe_util # pylint: disable=F0401
# This class doesn't need an __init__ method, so we disable the warning
# pylint: disable=W0232
cla... | Add fetch recipe for the Skia repository.
Tested with the following command lines:
$ cd somewhere
$ mkdir some-test-dir
$ cd some-test-dir
$ fetch skia
$ cd skia
# confirm it is what we expected.
BUG=None
TEST=see above
[email protected]
Review URL: https://codereview.chromium.org/746363003
git-svn-id: fd409f... | <commit_before><commit_msg>Add fetch recipe for the Skia repository.
Tested with the following command lines:
$ cd somewhere
$ mkdir some-test-dir
$ cd some-test-dir
$ fetch skia
$ cd skia
# confirm it is what we expected.
BUG=None
TEST=see above
[email protected]
Review URL: https://codereview.chromium.org/74... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.