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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9281a33a93b9eec26c5344eaecfecaca42607b51 | examples/dataflow_chain.py | examples/dataflow_chain.py | import sys
sys.path.append('../py')
from iroha import *
from iroha.iroha import *
d = IDesign()
mod = IModule(d, "mod")
def CreateTable(mod):
tab = ITable(mod)
st0 = IState(tab)
st1 = IState(tab)
tab.initialSt = st0
design_tool.AddNextState(st0, st1)
tab.states.append(st0)
tab.states.appe... | Add an example to chain dataflow tables. | Add an example to chain dataflow tables.
| Python | bsd-3-clause | nlsynth/iroha,nlsynth/iroha | Add an example to chain dataflow tables. | import sys
sys.path.append('../py')
from iroha import *
from iroha.iroha import *
d = IDesign()
mod = IModule(d, "mod")
def CreateTable(mod):
tab = ITable(mod)
st0 = IState(tab)
st1 = IState(tab)
tab.initialSt = st0
design_tool.AddNextState(st0, st1)
tab.states.append(st0)
tab.states.appe... | <commit_before><commit_msg>Add an example to chain dataflow tables.<commit_after> | import sys
sys.path.append('../py')
from iroha import *
from iroha.iroha import *
d = IDesign()
mod = IModule(d, "mod")
def CreateTable(mod):
tab = ITable(mod)
st0 = IState(tab)
st1 = IState(tab)
tab.initialSt = st0
design_tool.AddNextState(st0, st1)
tab.states.append(st0)
tab.states.appe... | Add an example to chain dataflow tables.import sys
sys.path.append('../py')
from iroha import *
from iroha.iroha import *
d = IDesign()
mod = IModule(d, "mod")
def CreateTable(mod):
tab = ITable(mod)
st0 = IState(tab)
st1 = IState(tab)
tab.initialSt = st0
design_tool.AddNextState(st0, st1)
ta... | <commit_before><commit_msg>Add an example to chain dataflow tables.<commit_after>import sys
sys.path.append('../py')
from iroha import *
from iroha.iroha import *
d = IDesign()
mod = IModule(d, "mod")
def CreateTable(mod):
tab = ITable(mod)
st0 = IState(tab)
st1 = IState(tab)
tab.initialSt = st0
... | |
1096c336c26c136c94e80b3d2f1cf6060c566de8 | duralex/GitCommitVisitor.py | duralex/GitCommitVisitor.py | # -*- coding: utf-8 -*-
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
import duralex.node_type
import subprocess
import os
class GitCommitVisitor(AbstractVisitor):
def visit_article_reference_node(self, node, post):
if self.commitMessage and self.repository:
... | Add a visitor to apply the generated diffs as patches and commit them using git. | Add a visitor to apply the generated diffs as patches and commit them using git.
| Python | mit | Legilibre/duralex | Add a visitor to apply the generated diffs as patches and commit them using git. | # -*- coding: utf-8 -*-
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
import duralex.node_type
import subprocess
import os
class GitCommitVisitor(AbstractVisitor):
def visit_article_reference_node(self, node, post):
if self.commitMessage and self.repository:
... | <commit_before><commit_msg>Add a visitor to apply the generated diffs as patches and commit them using git.<commit_after> | # -*- coding: utf-8 -*-
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
import duralex.node_type
import subprocess
import os
class GitCommitVisitor(AbstractVisitor):
def visit_article_reference_node(self, node, post):
if self.commitMessage and self.repository:
... | Add a visitor to apply the generated diffs as patches and commit them using git.# -*- coding: utf-8 -*-
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
import duralex.node_type
import subprocess
import os
class GitCommitVisitor(AbstractVisitor):
def visit_article_reference_node(... | <commit_before><commit_msg>Add a visitor to apply the generated diffs as patches and commit them using git.<commit_after># -*- coding: utf-8 -*-
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
import duralex.node_type
import subprocess
import os
class GitCommitVisitor(AbstractVisito... | |
03d030b63e7adb2fd5aee3bd710cfbad59ed0864 | fil_finder/tests/test_input_types.py | fil_finder/tests/test_input_types.py | # Licensed under an MIT open source license - see LICENSE
from unittest import TestCase
import numpy as np
import numpy.testing as npt
import astropy.units as u
from astropy.io.fits import PrimaryHDU
from fil_finder.io_funcs import input_data
from _testing_data import *
FWHM_FACTOR = 2 * np.sqrt(2 * np.log(2.))
... | Add tests for new input types (FITS HDUs) | Add tests for new input types (FITS HDUs)
| Python | mit | e-koch/FilFinder | Add tests for new input types (FITS HDUs) | # Licensed under an MIT open source license - see LICENSE
from unittest import TestCase
import numpy as np
import numpy.testing as npt
import astropy.units as u
from astropy.io.fits import PrimaryHDU
from fil_finder.io_funcs import input_data
from _testing_data import *
FWHM_FACTOR = 2 * np.sqrt(2 * np.log(2.))
... | <commit_before><commit_msg>Add tests for new input types (FITS HDUs)<commit_after> | # Licensed under an MIT open source license - see LICENSE
from unittest import TestCase
import numpy as np
import numpy.testing as npt
import astropy.units as u
from astropy.io.fits import PrimaryHDU
from fil_finder.io_funcs import input_data
from _testing_data import *
FWHM_FACTOR = 2 * np.sqrt(2 * np.log(2.))
... | Add tests for new input types (FITS HDUs)# Licensed under an MIT open source license - see LICENSE
from unittest import TestCase
import numpy as np
import numpy.testing as npt
import astropy.units as u
from astropy.io.fits import PrimaryHDU
from fil_finder.io_funcs import input_data
from _testing_data import *
FWH... | <commit_before><commit_msg>Add tests for new input types (FITS HDUs)<commit_after># Licensed under an MIT open source license - see LICENSE
from unittest import TestCase
import numpy as np
import numpy.testing as npt
import astropy.units as u
from astropy.io.fits import PrimaryHDU
from fil_finder.io_funcs import inp... | |
e51dfa39ee2fdaee372b3928fb20d33e2830f1ef | clubs/migrations/0042_alahsa_deanship.py | clubs/migrations/0042_alahsa_deanship.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def add_alahsa_deanship(apps, schema_editor):
Club = apps.get_model('clubs', 'Club')
StudentClubYear = apps.get_model('core', 'StudentClubYear')
year_2015_2016 = StudentClubYear.objects.get(start_date_... | Add Alahsa Student Affairs Deanship | Add Alahsa Student Affairs Deanship
| Python | agpl-3.0 | enjaz/enjaz,osamak/student-portal,osamak/student-portal,enjaz/enjaz,enjaz/enjaz,enjaz/enjaz,osamak/student-portal,enjaz/enjaz,osamak/student-portal,osamak/student-portal | Add Alahsa Student Affairs Deanship | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def add_alahsa_deanship(apps, schema_editor):
Club = apps.get_model('clubs', 'Club')
StudentClubYear = apps.get_model('core', 'StudentClubYear')
year_2015_2016 = StudentClubYear.objects.get(start_date_... | <commit_before><commit_msg>Add Alahsa Student Affairs Deanship<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def add_alahsa_deanship(apps, schema_editor):
Club = apps.get_model('clubs', 'Club')
StudentClubYear = apps.get_model('core', 'StudentClubYear')
year_2015_2016 = StudentClubYear.objects.get(start_date_... | Add Alahsa Student Affairs Deanship# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def add_alahsa_deanship(apps, schema_editor):
Club = apps.get_model('clubs', 'Club')
StudentClubYear = apps.get_model('core', 'StudentClubYear')
year_2015_2016 = Stud... | <commit_before><commit_msg>Add Alahsa Student Affairs Deanship<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def add_alahsa_deanship(apps, schema_editor):
Club = apps.get_model('clubs', 'Club')
StudentClubYear = apps.get_model('core', 'St... | |
415a6eed4aeb53c0400326e5a6258ddb2ff39402 | csunplugged/tests/resources/utils/test_resource_parameters.py | csunplugged/tests/resources/utils/test_resource_parameters.py | class ResourceParametersTest(BaseTest):
def test_resource_parameter_base_process_requested_values(self):
pass
def test_resource_parameter_base_process_value(self):
pass
def test_resource_parameter_base_html_element(self):
pass
def test_single_valued_parameter_process_requeste... | Add test skeleton for resource_parameters unit tests | Add test skeleton for resource_parameters unit tests
| Python | mit | uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged | Add test skeleton for resource_parameters unit tests | class ResourceParametersTest(BaseTest):
def test_resource_parameter_base_process_requested_values(self):
pass
def test_resource_parameter_base_process_value(self):
pass
def test_resource_parameter_base_html_element(self):
pass
def test_single_valued_parameter_process_requeste... | <commit_before><commit_msg>Add test skeleton for resource_parameters unit tests<commit_after> | class ResourceParametersTest(BaseTest):
def test_resource_parameter_base_process_requested_values(self):
pass
def test_resource_parameter_base_process_value(self):
pass
def test_resource_parameter_base_html_element(self):
pass
def test_single_valued_parameter_process_requeste... | Add test skeleton for resource_parameters unit testsclass ResourceParametersTest(BaseTest):
def test_resource_parameter_base_process_requested_values(self):
pass
def test_resource_parameter_base_process_value(self):
pass
def test_resource_parameter_base_html_element(self):
pass
... | <commit_before><commit_msg>Add test skeleton for resource_parameters unit tests<commit_after>class ResourceParametersTest(BaseTest):
def test_resource_parameter_base_process_requested_values(self):
pass
def test_resource_parameter_base_process_value(self):
pass
def test_resource_parameter... | |
e6807ad6d71e3b115828870bb068777ad865f329 | tests/test_client.py | tests/test_client.py | import pylibmc
from pylibmc.test import make_test_client
from tests import PylibmcTestCase
from nose.tools import eq_, ok_
class ClientTests(PylibmcTestCase):
def test_zerokey(self):
bc = make_test_client(binary=True)
k = "\x00\x01"
ok_(bc.set(k, "test"))
rk = bc.get_multi([k]).keys... | Add tests for CAS and other things | Add tests for CAS and other things
Refs #63
| Python | bsd-3-clause | lericson/pylibmc,lericson/pylibmc,lericson/pylibmc | Add tests for CAS and other things
Refs #63 | import pylibmc
from pylibmc.test import make_test_client
from tests import PylibmcTestCase
from nose.tools import eq_, ok_
class ClientTests(PylibmcTestCase):
def test_zerokey(self):
bc = make_test_client(binary=True)
k = "\x00\x01"
ok_(bc.set(k, "test"))
rk = bc.get_multi([k]).keys... | <commit_before><commit_msg>Add tests for CAS and other things
Refs #63<commit_after> | import pylibmc
from pylibmc.test import make_test_client
from tests import PylibmcTestCase
from nose.tools import eq_, ok_
class ClientTests(PylibmcTestCase):
def test_zerokey(self):
bc = make_test_client(binary=True)
k = "\x00\x01"
ok_(bc.set(k, "test"))
rk = bc.get_multi([k]).keys... | Add tests for CAS and other things
Refs #63import pylibmc
from pylibmc.test import make_test_client
from tests import PylibmcTestCase
from nose.tools import eq_, ok_
class ClientTests(PylibmcTestCase):
def test_zerokey(self):
bc = make_test_client(binary=True)
k = "\x00\x01"
ok_(bc.set(k, ... | <commit_before><commit_msg>Add tests for CAS and other things
Refs #63<commit_after>import pylibmc
from pylibmc.test import make_test_client
from tests import PylibmcTestCase
from nose.tools import eq_, ok_
class ClientTests(PylibmcTestCase):
def test_zerokey(self):
bc = make_test_client(binary=True)
... | |
60d8413940119c64db89ded7854850912947e135 | var/spack/packages/mbedtls/package.py | var/spack/packages/mbedtls/package.py | from spack import *
class Mbedtls(Package):
"""
mbed TLS (formerly known as PolarSSL) makes it trivially easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products, facilitating this functionality with a minimal coding footprint.
"""
homepage = "https://tls.mbed.... | Support mbedtls, an alternative SSL library | Support mbedtls, an alternative SSL library
| Python | lgpl-2.1 | lgarren/spack,LLNL/spack,tmerrick1/spack,LLNL/spack,TheTimmy/spack,mfherbst/spack,krafczyk/spack,LLNL/spack,iulian787/spack,skosukhin/spack,krafczyk/spack,TheTimmy/spack,mfherbst/spack,matthiasdiener/spack,iulian787/spack,matthiasdiener/spack,tmerrick1/spack,mfherbst/spack,lgarren/spack,TheTimmy/spack,EmreAtes/spack,Th... | Support mbedtls, an alternative SSL library | from spack import *
class Mbedtls(Package):
"""
mbed TLS (formerly known as PolarSSL) makes it trivially easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products, facilitating this functionality with a minimal coding footprint.
"""
homepage = "https://tls.mbed.... | <commit_before><commit_msg>Support mbedtls, an alternative SSL library<commit_after> | from spack import *
class Mbedtls(Package):
"""
mbed TLS (formerly known as PolarSSL) makes it trivially easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products, facilitating this functionality with a minimal coding footprint.
"""
homepage = "https://tls.mbed.... | Support mbedtls, an alternative SSL libraryfrom spack import *
class Mbedtls(Package):
"""
mbed TLS (formerly known as PolarSSL) makes it trivially easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products, facilitating this functionality with a minimal coding footprint... | <commit_before><commit_msg>Support mbedtls, an alternative SSL library<commit_after>from spack import *
class Mbedtls(Package):
"""
mbed TLS (formerly known as PolarSSL) makes it trivially easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products, facilitating this func... | |
5c8727c31f3ce628c09e49e10c23b8b67c1dcabe | api/tests/test_small_scripts.py | api/tests/test_small_scripts.py | """This module tests the small scripts - admin, model, and wsgi."""
import unittest
class SmallScriptsTest(unittest.TestCase):
def test_admin(self):
import api.admin
def test_models(self):
import api.models
def test_wsgi(self):
import apel_rest.wsgi
| Add tests for small script files | Add tests for small script files
| Python | apache-2.0 | apel/rest,apel/rest | Add tests for small script files | """This module tests the small scripts - admin, model, and wsgi."""
import unittest
class SmallScriptsTest(unittest.TestCase):
def test_admin(self):
import api.admin
def test_models(self):
import api.models
def test_wsgi(self):
import apel_rest.wsgi
| <commit_before><commit_msg>Add tests for small script files<commit_after> | """This module tests the small scripts - admin, model, and wsgi."""
import unittest
class SmallScriptsTest(unittest.TestCase):
def test_admin(self):
import api.admin
def test_models(self):
import api.models
def test_wsgi(self):
import apel_rest.wsgi
| Add tests for small script files"""This module tests the small scripts - admin, model, and wsgi."""
import unittest
class SmallScriptsTest(unittest.TestCase):
def test_admin(self):
import api.admin
def test_models(self):
import api.models
def test_wsgi(self):
import apel_rest.ws... | <commit_before><commit_msg>Add tests for small script files<commit_after>"""This module tests the small scripts - admin, model, and wsgi."""
import unittest
class SmallScriptsTest(unittest.TestCase):
def test_admin(self):
import api.admin
def test_models(self):
import api.models
def tes... | |
d80a0b0f9d9bf9a3c82695fd2565d22e54d5f4ee | exp/viroscopy/test/HIVGraphReaderTest.py | exp/viroscopy/test/HIVGraphReaderTest.py |
import apgl
import numpy
import unittest
import pickle
import numpy.testing as nptst
from exp.viroscopy.HIVGraphReader import HIVGraphReader
class HIVGraphReaderTest(unittest.TestCase):
def setup(self):
pass
def testreadSimulationHIVGraph(self):
hivReader = HIVGraphReader()... | Test of simulated graph reading. | Test of simulated graph reading. | Python | bsd-3-clause | charanpald/APGL | Test of simulated graph reading. |
import apgl
import numpy
import unittest
import pickle
import numpy.testing as nptst
from exp.viroscopy.HIVGraphReader import HIVGraphReader
class HIVGraphReaderTest(unittest.TestCase):
def setup(self):
pass
def testreadSimulationHIVGraph(self):
hivReader = HIVGraphReader()... | <commit_before><commit_msg>Test of simulated graph reading. <commit_after> |
import apgl
import numpy
import unittest
import pickle
import numpy.testing as nptst
from exp.viroscopy.HIVGraphReader import HIVGraphReader
class HIVGraphReaderTest(unittest.TestCase):
def setup(self):
pass
def testreadSimulationHIVGraph(self):
hivReader = HIVGraphReader()... | Test of simulated graph reading.
import apgl
import numpy
import unittest
import pickle
import numpy.testing as nptst
from exp.viroscopy.HIVGraphReader import HIVGraphReader
class HIVGraphReaderTest(unittest.TestCase):
def setup(self):
pass
def testreadSimulationHIVGraph(self):
... | <commit_before><commit_msg>Test of simulated graph reading. <commit_after>
import apgl
import numpy
import unittest
import pickle
import numpy.testing as nptst
from exp.viroscopy.HIVGraphReader import HIVGraphReader
class HIVGraphReaderTest(unittest.TestCase):
def setup(self):
pass
def testre... | |
4ce9ec033ba13c3345c951a626510f0bd90b26d9 | monitor.py | monitor.py | #!/usr/bin/python3
import smbus
import time
import sys
# Get I2C bus
bus = smbus.SMBus(1)
# number of channels the monitoring board has
no_of_channels = 1
# PECMAC125A address, 0x2A(42)
# Command for reading current
# 0x6A(106), 0x01(1), 0x01(1),0x0C(12), 0x00(0), 0x00(0) 0x0A(10)
# Header byte-2, command-1, start... | Read the data and output to terminal | Read the data and output to terminal
| Python | mit | jeffdirks/electricity_calc | Read the data and output to terminal | #!/usr/bin/python3
import smbus
import time
import sys
# Get I2C bus
bus = smbus.SMBus(1)
# number of channels the monitoring board has
no_of_channels = 1
# PECMAC125A address, 0x2A(42)
# Command for reading current
# 0x6A(106), 0x01(1), 0x01(1),0x0C(12), 0x00(0), 0x00(0) 0x0A(10)
# Header byte-2, command-1, start... | <commit_before><commit_msg>Read the data and output to terminal<commit_after> | #!/usr/bin/python3
import smbus
import time
import sys
# Get I2C bus
bus = smbus.SMBus(1)
# number of channels the monitoring board has
no_of_channels = 1
# PECMAC125A address, 0x2A(42)
# Command for reading current
# 0x6A(106), 0x01(1), 0x01(1),0x0C(12), 0x00(0), 0x00(0) 0x0A(10)
# Header byte-2, command-1, start... | Read the data and output to terminal#!/usr/bin/python3
import smbus
import time
import sys
# Get I2C bus
bus = smbus.SMBus(1)
# number of channels the monitoring board has
no_of_channels = 1
# PECMAC125A address, 0x2A(42)
# Command for reading current
# 0x6A(106), 0x01(1), 0x01(1),0x0C(12), 0x00(0), 0x00(0) 0x0A(1... | <commit_before><commit_msg>Read the data and output to terminal<commit_after>#!/usr/bin/python3
import smbus
import time
import sys
# Get I2C bus
bus = smbus.SMBus(1)
# number of channels the monitoring board has
no_of_channels = 1
# PECMAC125A address, 0x2A(42)
# Command for reading current
# 0x6A(106), 0x01(1), ... | |
4fde76e19df9cb7ac0d7c3b763dc43b9af85a022 | tsne/tests/test_iris.py | tsne/tests/test_iris.py |
def test_iris():
from tsne import bh_sne
from sklearn.datasets import load_iris
iris = load_iris()
X = iris.data
y = iris.target
X_2d = bh_sne(X)
| Add test for iris, same as example notebook | Add test for iris, same as example notebook
| Python | bsd-3-clause | pryvkin10x/tsne,pryvkin10x/tsne,pryvkin10x/tsne | Add test for iris, same as example notebook |
def test_iris():
from tsne import bh_sne
from sklearn.datasets import load_iris
iris = load_iris()
X = iris.data
y = iris.target
X_2d = bh_sne(X)
| <commit_before><commit_msg>Add test for iris, same as example notebook<commit_after> |
def test_iris():
from tsne import bh_sne
from sklearn.datasets import load_iris
iris = load_iris()
X = iris.data
y = iris.target
X_2d = bh_sne(X)
| Add test for iris, same as example notebook
def test_iris():
from tsne import bh_sne
from sklearn.datasets import load_iris
iris = load_iris()
X = iris.data
y = iris.target
X_2d = bh_sne(X)
| <commit_before><commit_msg>Add test for iris, same as example notebook<commit_after>
def test_iris():
from tsne import bh_sne
from sklearn.datasets import load_iris
iris = load_iris()
X = iris.data
y = iris.target
X_2d = bh_sne(X)
| |
516c0a7f2b48720445b8b699644d7a33a73481e6 | ini_tools/get_ini_fields.py | ini_tools/get_ini_fields.py | """
collect information about fields and values in ini file
usage run script with file name in directory with unpacked stats.
Script will collect data from all files with name.
You can specify path as second argument.
python get_ini_fields.py body.ini
python get_ini_fields.py body.ini "C:/games/warzone2100"
"""
i... | Add collect ini field script. | Add collect ini field script.
| Python | cc0-1.0 | haoNoQ/wztools2100,haoNoQ/wztools2100,haoNoQ/wztools2100 | Add collect ini field script. | """
collect information about fields and values in ini file
usage run script with file name in directory with unpacked stats.
Script will collect data from all files with name.
You can specify path as second argument.
python get_ini_fields.py body.ini
python get_ini_fields.py body.ini "C:/games/warzone2100"
"""
i... | <commit_before><commit_msg>Add collect ini field script.<commit_after> | """
collect information about fields and values in ini file
usage run script with file name in directory with unpacked stats.
Script will collect data from all files with name.
You can specify path as second argument.
python get_ini_fields.py body.ini
python get_ini_fields.py body.ini "C:/games/warzone2100"
"""
i... | Add collect ini field script."""
collect information about fields and values in ini file
usage run script with file name in directory with unpacked stats.
Script will collect data from all files with name.
You can specify path as second argument.
python get_ini_fields.py body.ini
python get_ini_fields.py body.ini ... | <commit_before><commit_msg>Add collect ini field script.<commit_after>"""
collect information about fields and values in ini file
usage run script with file name in directory with unpacked stats.
Script will collect data from all files with name.
You can specify path as second argument.
python get_ini_fields.py bod... | |
e38b98a44d5961439e9c60e9398f183dc6dbf39e | scripts/profileshader.py | scripts/profileshader.py | #!/usr/bin/env python
##########################################################################
#
# Copyright 2012 VMware, Inc.
# All Rights Reserved.
#
# 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 th... | Add a script to analyse profile output per shader. | Add a script to analyse profile output per shader.
| Python | mit | surround-io/apitrace,joshua5201/apitrace,tuanthng/apitrace,surround-io/apitrace,apitrace/apitrace,PeterLValve/apitrace,tuanthng/apitrace,PeterLValve/apitrace,swq0553/apitrace,swq0553/apitrace,tuanthng/apitrace,schulmar/apitrace,trtt/apitrace,surround-io/apitrace,EoD/apitrace,trtt/apitrace,tuanthng/apitrace,swq0553/apit... | Add a script to analyse profile output per shader. | #!/usr/bin/env python
##########################################################################
#
# Copyright 2012 VMware, Inc.
# All Rights Reserved.
#
# 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 th... | <commit_before><commit_msg>Add a script to analyse profile output per shader.<commit_after> | #!/usr/bin/env python
##########################################################################
#
# Copyright 2012 VMware, Inc.
# All Rights Reserved.
#
# 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 th... | Add a script to analyse profile output per shader.#!/usr/bin/env python
##########################################################################
#
# Copyright 2012 VMware, Inc.
# All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated doc... | <commit_before><commit_msg>Add a script to analyse profile output per shader.<commit_after>#!/usr/bin/env python
##########################################################################
#
# Copyright 2012 VMware, Inc.
# All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a c... | |
632c29adc4a57c653266c5f3a319f5b761f9a0c4 | nototools/decompose_ttc.py | nototools/decompose_ttc.py | #!/usr/bin/python
#
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | Add a tool to decompose TTC files. | Add a tool to decompose TTC files.
| Python | apache-2.0 | wskplho/noto-monolithic,yannisl/noto-monolithic,wskplho/noto-monolithic,yannisl/noto-monolithic,yannisl/noto-monolithic,yannisl/noto-monolithic,wskplho/noto-monolithic,wskplho/noto-monolithic | Add a tool to decompose TTC files. | #!/usr/bin/python
#
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | <commit_before><commit_msg>Add a tool to decompose TTC files.<commit_after> | #!/usr/bin/python
#
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | Add a tool to decompose TTC files.#!/usr/bin/python
#
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/... | <commit_before><commit_msg>Add a tool to decompose TTC files.<commit_after>#!/usr/bin/python
#
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License a... | |
b368a24f0ab2abd49957d77c0013e1ed40cf1f42 | cl/visualizations/migrations/0011_auto_20151203_1631.py | cl/visualizations/migrations/0011_auto_20151203_1631.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('visualizations', '0010_auto_20151125_1041'),
]
operations = [
migrations.AlterField(
model_name='scotusmap',
... | Update the DB with the new descriptions. | Update the DB with the new descriptions.
This shouldn't be necessary.
| Python | agpl-3.0 | voutilad/courtlistener,Andr3iC/courtlistener,Andr3iC/courtlistener,voutilad/courtlistener,voutilad/courtlistener,brianwc/courtlistener,brianwc/courtlistener,Andr3iC/courtlistener,voutilad/courtlistener,Andr3iC/courtlistener,voutilad/courtlistener,brianwc/courtlistener,Andr3iC/courtlistener,brianwc/courtlistener,brianwc... | Update the DB with the new descriptions.
This shouldn't be necessary. | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('visualizations', '0010_auto_20151125_1041'),
]
operations = [
migrations.AlterField(
model_name='scotusmap',
... | <commit_before><commit_msg>Update the DB with the new descriptions.
This shouldn't be necessary.<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('visualizations', '0010_auto_20151125_1041'),
]
operations = [
migrations.AlterField(
model_name='scotusmap',
... | Update the DB with the new descriptions.
This shouldn't be necessary.# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('visualizations', '0010_auto_20151125_1041'),
]
operations = [
... | <commit_before><commit_msg>Update the DB with the new descriptions.
This shouldn't be necessary.<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('visualizations', '0010_auto_20... | |
f08dc42802ce0442744f250c4f329db5cc7bae03 | cms/djangoapps/contentstore/management/commands/tests/test_migrate_to_split.py | cms/djangoapps/contentstore/management/commands/tests/test_migrate_to_split.py | """
Unittests for importing a course via management command
"""
import unittest
from django.core.management import CommandError
from contentstore.management.commands.migrate_to_split import Command
class TestArgParsing(unittest.TestCase):
def setUp(self):
self.command = Command()
def test_no_args(s... | Add some dummy arg parsing tests | Add some dummy arg parsing tests
| Python | agpl-3.0 | cpennington/edx-platform,mtlchun/edx,cecep-edu/edx-platform,olexiim/edx-platform,simbs/edx-platform,jbzdak/edx-platform,jbassen/edx-platform,doismellburning/edx-platform,zubair-arbi/edx-platform,proversity-org/edx-platform,chand3040/cloud_that,inares/edx-platform,Shrhawk/edx-platform,benpatterson/edx-platform,edx-solut... | Add some dummy arg parsing tests | """
Unittests for importing a course via management command
"""
import unittest
from django.core.management import CommandError
from contentstore.management.commands.migrate_to_split import Command
class TestArgParsing(unittest.TestCase):
def setUp(self):
self.command = Command()
def test_no_args(s... | <commit_before><commit_msg>Add some dummy arg parsing tests<commit_after> | """
Unittests for importing a course via management command
"""
import unittest
from django.core.management import CommandError
from contentstore.management.commands.migrate_to_split import Command
class TestArgParsing(unittest.TestCase):
def setUp(self):
self.command = Command()
def test_no_args(s... | Add some dummy arg parsing tests"""
Unittests for importing a course via management command
"""
import unittest
from django.core.management import CommandError
from contentstore.management.commands.migrate_to_split import Command
class TestArgParsing(unittest.TestCase):
def setUp(self):
self.command = C... | <commit_before><commit_msg>Add some dummy arg parsing tests<commit_after>"""
Unittests for importing a course via management command
"""
import unittest
from django.core.management import CommandError
from contentstore.management.commands.migrate_to_split import Command
class TestArgParsing(unittest.TestCase):
... | |
6c6442bf232c36314c5d195cd2674a98397b64ed | src/mailme/migrations/0006_auto_20180221_0758.py | src/mailme/migrations/0006_auto_20180221_0758.py | # Generated by Django 2.0 on 2018-02-21 07:58
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mailme', '0005_auto_20160724_1415'),
]
operations = [
migrations.RemoveField... | Add missing migration for recent model refactor | Add missing migration for recent model refactor
| Python | bsd-3-clause | mailme/mailme,mailme/mailme | Add missing migration for recent model refactor | # Generated by Django 2.0 on 2018-02-21 07:58
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mailme', '0005_auto_20160724_1415'),
]
operations = [
migrations.RemoveField... | <commit_before><commit_msg>Add missing migration for recent model refactor<commit_after> | # Generated by Django 2.0 on 2018-02-21 07:58
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mailme', '0005_auto_20160724_1415'),
]
operations = [
migrations.RemoveField... | Add missing migration for recent model refactor# Generated by Django 2.0 on 2018-02-21 07:58
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mailme', '0005_auto_20160724_1415'),
]
... | <commit_before><commit_msg>Add missing migration for recent model refactor<commit_after># Generated by Django 2.0 on 2018-02-21 07:58
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mailm... | |
f12bf6096e607e090da7c4e80be2bed3afb5ff5a | crmapp/contacts/urls.py | crmapp/contacts/urls.py | from django.conf.urls import patterns, url
contact_urls = patterns('',
url(r'^$', 'crmapp.contacts.views.contact_detail', name="contact_detail"),
)
| from django.conf.urls import patterns, url
contact_urls = patterns('',
url(r'^$', 'crmapp.contacts.views.contact_detail', name="contact_detail"),
url(r'^edit/$',
'crmapp.contacts.views.contact_cru', name='contact_update'
),
)
| Create the Contacts App - Part II > Edit Contact - Create URL | Create the Contacts App - Part II > Edit Contact - Create URL
| Python | mit | tabdon/crmeasyapp,tabdon/crmeasyapp,deenaariff/Django | from django.conf.urls import patterns, url
contact_urls = patterns('',
url(r'^$', 'crmapp.contacts.views.contact_detail', name="contact_detail"),
)
Create the Contacts App - Part II > Edit Contact - Create URL | from django.conf.urls import patterns, url
contact_urls = patterns('',
url(r'^$', 'crmapp.contacts.views.contact_detail', name="contact_detail"),
url(r'^edit/$',
'crmapp.contacts.views.contact_cru', name='contact_update'
),
)
| <commit_before>from django.conf.urls import patterns, url
contact_urls = patterns('',
url(r'^$', 'crmapp.contacts.views.contact_detail', name="contact_detail"),
)
<commit_msg>Create the Contacts App - Part II > Edit Contact - Create URL<commit_after> | from django.conf.urls import patterns, url
contact_urls = patterns('',
url(r'^$', 'crmapp.contacts.views.contact_detail', name="contact_detail"),
url(r'^edit/$',
'crmapp.contacts.views.contact_cru', name='contact_update'
),
)
| from django.conf.urls import patterns, url
contact_urls = patterns('',
url(r'^$', 'crmapp.contacts.views.contact_detail', name="contact_detail"),
)
Create the Contacts App - Part II > Edit Contact - Create URLfrom django.conf.urls import patterns, url
contact_urls = patterns('',
url(r'^$', 'crmapp.contacts... | <commit_before>from django.conf.urls import patterns, url
contact_urls = patterns('',
url(r'^$', 'crmapp.contacts.views.contact_detail', name="contact_detail"),
)
<commit_msg>Create the Contacts App - Part II > Edit Contact - Create URL<commit_after>from django.conf.urls import patterns, url
contact_urls = patt... |
d6b80a6510cbedfa6295d90bf72901aea3e8c5ba | toPathwayReactome.py | toPathwayReactome.py | import requests
def httpRequestReactome(code):
try:
r = requests.get('http://www.reactome.org/ContentService/search/query?query=' + code +'&cluster=true')
results = r.json()
resultId = results['results'][0]['entries'][0]['stId']
r = requests.get('http://www.reactome.org/ContentServ... | Add an example of pathway extraction from Reaction. | Add an example of pathway extraction from Reaction.
| Python | agpl-3.0 | ArnaudBelcour/Workflow_GeneList_Analysis,ArnaudBelcour/Workflow_GeneList_Analysis | Add an example of pathway extraction from Reaction. | import requests
def httpRequestReactome(code):
try:
r = requests.get('http://www.reactome.org/ContentService/search/query?query=' + code +'&cluster=true')
results = r.json()
resultId = results['results'][0]['entries'][0]['stId']
r = requests.get('http://www.reactome.org/ContentServ... | <commit_before><commit_msg>Add an example of pathway extraction from Reaction.<commit_after> | import requests
def httpRequestReactome(code):
try:
r = requests.get('http://www.reactome.org/ContentService/search/query?query=' + code +'&cluster=true')
results = r.json()
resultId = results['results'][0]['entries'][0]['stId']
r = requests.get('http://www.reactome.org/ContentServ... | Add an example of pathway extraction from Reaction.import requests
def httpRequestReactome(code):
try:
r = requests.get('http://www.reactome.org/ContentService/search/query?query=' + code +'&cluster=true')
results = r.json()
resultId = results['results'][0]['entries'][0]['stId']
r ... | <commit_before><commit_msg>Add an example of pathway extraction from Reaction.<commit_after>import requests
def httpRequestReactome(code):
try:
r = requests.get('http://www.reactome.org/ContentService/search/query?query=' + code +'&cluster=true')
results = r.json()
resultId = results['resul... | |
4d072cb1130b59b292437a9b1acc468996813cff | migrations/versions/0026_rename_notify_service.py | migrations/versions/0026_rename_notify_service.py | """empty message
Revision ID: 0026_rename_notify_service
Revises: 0025_notify_service_data
Create Date: 2016-06-07 09:51:07.343334
"""
# revision identifiers, used by Alembic.
revision = '0026_rename_notify_service'
down_revision = '0025_notify_service_data'
from alembic import op
import sqlalchemy as sa
def upgr... | Rename notify service to GOV.UK Notify | Rename notify service to GOV.UK Notify
| Python | mit | alphagov/notifications-api,alphagov/notifications-api | Rename notify service to GOV.UK Notify | """empty message
Revision ID: 0026_rename_notify_service
Revises: 0025_notify_service_data
Create Date: 2016-06-07 09:51:07.343334
"""
# revision identifiers, used by Alembic.
revision = '0026_rename_notify_service'
down_revision = '0025_notify_service_data'
from alembic import op
import sqlalchemy as sa
def upgr... | <commit_before><commit_msg>Rename notify service to GOV.UK Notify<commit_after> | """empty message
Revision ID: 0026_rename_notify_service
Revises: 0025_notify_service_data
Create Date: 2016-06-07 09:51:07.343334
"""
# revision identifiers, used by Alembic.
revision = '0026_rename_notify_service'
down_revision = '0025_notify_service_data'
from alembic import op
import sqlalchemy as sa
def upgr... | Rename notify service to GOV.UK Notify"""empty message
Revision ID: 0026_rename_notify_service
Revises: 0025_notify_service_data
Create Date: 2016-06-07 09:51:07.343334
"""
# revision identifiers, used by Alembic.
revision = '0026_rename_notify_service'
down_revision = '0025_notify_service_data'
from alembic import... | <commit_before><commit_msg>Rename notify service to GOV.UK Notify<commit_after>"""empty message
Revision ID: 0026_rename_notify_service
Revises: 0025_notify_service_data
Create Date: 2016-06-07 09:51:07.343334
"""
# revision identifiers, used by Alembic.
revision = '0026_rename_notify_service'
down_revision = '0025_... | |
e9b16e15c86485f163c14d43eda25396d5a11ba3 | samples/python/topology/spl/files.py | samples/python/topology/spl/files.py | # Licensed Materials - Property of IBM
# Copyright IBM Corp. 2016
import sys
import string
from streamsx.topology.topology import Topology
from streamsx.topology import spl_ops
from streamsx.topology.spl_ops import *
from streamsx.topology.spl_types import *
from streamsx.topology.schema import *
import streamsx.topolo... | Add sample app calling SPL functions | Add sample app calling SPL functions
| Python | apache-2.0 | IBMStreams/streamsx.topology,ibmkendrick/streamsx.topology,wmarshall484/streamsx.topology,IBMStreams/streamsx.topology,ibmkendrick/streamsx.topology,ddebrunner/streamsx.topology,ibmkendrick/streamsx.topology,wmarshall484/streamsx.topology,ddebrunner/streamsx.topology,IBMStreams/streamsx.topology,ibmkendrick/streamsx.to... | Add sample app calling SPL functions | # Licensed Materials - Property of IBM
# Copyright IBM Corp. 2016
import sys
import string
from streamsx.topology.topology import Topology
from streamsx.topology import spl_ops
from streamsx.topology.spl_ops import *
from streamsx.topology.spl_types import *
from streamsx.topology.schema import *
import streamsx.topolo... | <commit_before><commit_msg>Add sample app calling SPL functions<commit_after> | # Licensed Materials - Property of IBM
# Copyright IBM Corp. 2016
import sys
import string
from streamsx.topology.topology import Topology
from streamsx.topology import spl_ops
from streamsx.topology.spl_ops import *
from streamsx.topology.spl_types import *
from streamsx.topology.schema import *
import streamsx.topolo... | Add sample app calling SPL functions# Licensed Materials - Property of IBM
# Copyright IBM Corp. 2016
import sys
import string
from streamsx.topology.topology import Topology
from streamsx.topology import spl_ops
from streamsx.topology.spl_ops import *
from streamsx.topology.spl_types import *
from streamsx.topology.sc... | <commit_before><commit_msg>Add sample app calling SPL functions<commit_after># Licensed Materials - Property of IBM
# Copyright IBM Corp. 2016
import sys
import string
from streamsx.topology.topology import Topology
from streamsx.topology import spl_ops
from streamsx.topology.spl_ops import *
from streamsx.topology.spl... | |
843b59e022011c4b33c73763015e88eecb17e662 | destroyer/services/facebook.py | destroyer/services/facebook.py | """facebook.py - Module for Facebook service functionality"""
import time
import click
class FacebookDestroyer():
"""Destroyer class for Facebook integration.
"""
def __init__(self):
"""Initializer method"""
self.logger = None
def _unfriend(self):
"""Private method that take... | Add basic Facebook service integration | Add basic Facebook service integration
| Python | mit | jaredmichaelsmith/destroyer | Add basic Facebook service integration | """facebook.py - Module for Facebook service functionality"""
import time
import click
class FacebookDestroyer():
"""Destroyer class for Facebook integration.
"""
def __init__(self):
"""Initializer method"""
self.logger = None
def _unfriend(self):
"""Private method that take... | <commit_before><commit_msg>Add basic Facebook service integration<commit_after> | """facebook.py - Module for Facebook service functionality"""
import time
import click
class FacebookDestroyer():
"""Destroyer class for Facebook integration.
"""
def __init__(self):
"""Initializer method"""
self.logger = None
def _unfriend(self):
"""Private method that take... | Add basic Facebook service integration"""facebook.py - Module for Facebook service functionality"""
import time
import click
class FacebookDestroyer():
"""Destroyer class for Facebook integration.
"""
def __init__(self):
"""Initializer method"""
self.logger = None
def _unfriend(self... | <commit_before><commit_msg>Add basic Facebook service integration<commit_after>"""facebook.py - Module for Facebook service functionality"""
import time
import click
class FacebookDestroyer():
"""Destroyer class for Facebook integration.
"""
def __init__(self):
"""Initializer method"""
s... | |
8b12dba8c395f116cf3ac90dca7fafb27562371f | scripts/PetIBM/writePETScSolution.py | scripts/PetIBM/writePETScSolution.py | # file: createInitialPETScSolution.py
# author: Olivier Mesnard (mesnardo@gwu.edu)
# description: Creates the initial solution and write in a PETSc-readable format.
import sys
import os
import argparse
import numpy
sys.path.append(os.environ['SCRIPTS'])
from library import miscellaneous
def parse_command_line():
... | Write the initial PetIBM readable solution in 0000000 sub-folder | Write the initial PetIBM readable solution in 0000000 sub-folder
| Python | mit | mesnardo/snake | Write the initial PetIBM readable solution in 0000000 sub-folder | # file: createInitialPETScSolution.py
# author: Olivier Mesnard (mesnardo@gwu.edu)
# description: Creates the initial solution and write in a PETSc-readable format.
import sys
import os
import argparse
import numpy
sys.path.append(os.environ['SCRIPTS'])
from library import miscellaneous
def parse_command_line():
... | <commit_before><commit_msg>Write the initial PetIBM readable solution in 0000000 sub-folder<commit_after> | # file: createInitialPETScSolution.py
# author: Olivier Mesnard (mesnardo@gwu.edu)
# description: Creates the initial solution and write in a PETSc-readable format.
import sys
import os
import argparse
import numpy
sys.path.append(os.environ['SCRIPTS'])
from library import miscellaneous
def parse_command_line():
... | Write the initial PetIBM readable solution in 0000000 sub-folder# file: createInitialPETScSolution.py
# author: Olivier Mesnard (mesnardo@gwu.edu)
# description: Creates the initial solution and write in a PETSc-readable format.
import sys
import os
import argparse
import numpy
sys.path.append(os.environ['SCRIPTS'])... | <commit_before><commit_msg>Write the initial PetIBM readable solution in 0000000 sub-folder<commit_after># file: createInitialPETScSolution.py
# author: Olivier Mesnard (mesnardo@gwu.edu)
# description: Creates the initial solution and write in a PETSc-readable format.
import sys
import os
import argparse
import nump... | |
8bd853402f532932f55d7e876b320c70155625af | nntools/tests/test_init.py | nntools/tests/test_init.py | def test_shape():
from nntools.init import Initializer
# Assert that all `Initializer` sublasses return the shape that
# we've asked for in `sample`:
for klass in Initializer.__subclasses__():
assert klass().sample((12, 23)).shape == (12, 23)
def test_normal():
from nntools.init import No... | Add unit tests for nntools.init. | Add unit tests for nntools.init.
| Python | mit | DataFighter/Lasagne-tutorial,MihailoIsakov/fishfish,Richi91/nntools,rlkelly/Lasagne,gabortakacs/Lasagne,cancan101/Lasagne,dnouri/Lasagne,DeanChan/Lasagne,ebattenberg/Lasagne,ErnstHowie/Lasagne,diogo149/Lasagne,dnuffer/Lasagne,kracwarlock/Lasagne,takacsg84/Lasagne,mheilman/Lasagne,317070/nntools | Add unit tests for nntools.init. | def test_shape():
from nntools.init import Initializer
# Assert that all `Initializer` sublasses return the shape that
# we've asked for in `sample`:
for klass in Initializer.__subclasses__():
assert klass().sample((12, 23)).shape == (12, 23)
def test_normal():
from nntools.init import No... | <commit_before><commit_msg>Add unit tests for nntools.init.<commit_after> | def test_shape():
from nntools.init import Initializer
# Assert that all `Initializer` sublasses return the shape that
# we've asked for in `sample`:
for klass in Initializer.__subclasses__():
assert klass().sample((12, 23)).shape == (12, 23)
def test_normal():
from nntools.init import No... | Add unit tests for nntools.init.def test_shape():
from nntools.init import Initializer
# Assert that all `Initializer` sublasses return the shape that
# we've asked for in `sample`:
for klass in Initializer.__subclasses__():
assert klass().sample((12, 23)).shape == (12, 23)
def test_normal():... | <commit_before><commit_msg>Add unit tests for nntools.init.<commit_after>def test_shape():
from nntools.init import Initializer
# Assert that all `Initializer` sublasses return the shape that
# we've asked for in `sample`:
for klass in Initializer.__subclasses__():
assert klass().sample((12, 23... | |
25c58b40bd66a421796f2696b9c0e44ef5d19c7a | tournamentcontrol/competition/migrations/0021_competition__data__person_uuid.py | tournamentcontrol/competition/migrations/0021_competition__data__person_uuid.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-17 20:19
from __future__ import unicode_literals
from django.db import migrations
def link_person_model(apps, schema_editor):
Person = apps.get_model('competition', 'Person')
for person in Person.objects.all():
person.clubassociation_set.... | Add data migration to build ForeignKey on Person.uuid field | Add data migration to build ForeignKey on Person.uuid field
| Python | bsd-3-clause | goodtune/vitriolic,goodtune/vitriolic,goodtune/vitriolic,goodtune/vitriolic | Add data migration to build ForeignKey on Person.uuid field | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-17 20:19
from __future__ import unicode_literals
from django.db import migrations
def link_person_model(apps, schema_editor):
Person = apps.get_model('competition', 'Person')
for person in Person.objects.all():
person.clubassociation_set.... | <commit_before><commit_msg>Add data migration to build ForeignKey on Person.uuid field<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-17 20:19
from __future__ import unicode_literals
from django.db import migrations
def link_person_model(apps, schema_editor):
Person = apps.get_model('competition', 'Person')
for person in Person.objects.all():
person.clubassociation_set.... | Add data migration to build ForeignKey on Person.uuid field# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-17 20:19
from __future__ import unicode_literals
from django.db import migrations
def link_person_model(apps, schema_editor):
Person = apps.get_model('competition', 'Person')
for person i... | <commit_before><commit_msg>Add data migration to build ForeignKey on Person.uuid field<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-17 20:19
from __future__ import unicode_literals
from django.db import migrations
def link_person_model(apps, schema_editor):
Person = apps.get_model(... | |
33637fcc457e070fd946b53f3da8f2b90ee039fa | 03testPgCRUD.py | 03testPgCRUD.py | '''
Created on Aug 5, 2010
@author: apm
'''
#Test CRUD on opengemdb database
#CREATE : Create testTable
# : Insert rows
#READ : Read rows
#UPDATE : Change row values
#DELETE : Delete Element
# : Drop Table
#!/usr/bin/python
import psycopg2
#note that we have to import the Psycopg2 extras library!
import... | Test Python-Postgresql CRUD using psycopg2 driver | Test Python-Postgresql CRUD using psycopg2 driver
| Python | agpl-3.0 | gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine | Test Python-Postgresql CRUD using psycopg2 driver | '''
Created on Aug 5, 2010
@author: apm
'''
#Test CRUD on opengemdb database
#CREATE : Create testTable
# : Insert rows
#READ : Read rows
#UPDATE : Change row values
#DELETE : Delete Element
# : Drop Table
#!/usr/bin/python
import psycopg2
#note that we have to import the Psycopg2 extras library!
import... | <commit_before><commit_msg>Test Python-Postgresql CRUD using psycopg2 driver<commit_after> | '''
Created on Aug 5, 2010
@author: apm
'''
#Test CRUD on opengemdb database
#CREATE : Create testTable
# : Insert rows
#READ : Read rows
#UPDATE : Change row values
#DELETE : Delete Element
# : Drop Table
#!/usr/bin/python
import psycopg2
#note that we have to import the Psycopg2 extras library!
import... | Test Python-Postgresql CRUD using psycopg2 driver'''
Created on Aug 5, 2010
@author: apm
'''
#Test CRUD on opengemdb database
#CREATE : Create testTable
# : Insert rows
#READ : Read rows
#UPDATE : Change row values
#DELETE : Delete Element
# : Drop Table
#!/usr/bin/python
import psycopg2
#note that we h... | <commit_before><commit_msg>Test Python-Postgresql CRUD using psycopg2 driver<commit_after>'''
Created on Aug 5, 2010
@author: apm
'''
#Test CRUD on opengemdb database
#CREATE : Create testTable
# : Insert rows
#READ : Read rows
#UPDATE : Change row values
#DELETE : Delete Element
# : Drop Table
#!/usr/b... | |
85a027102cff16fc15bd8d959c23781582506b67 | eppy/tests/test_parse_error.py | eppy/tests/test_parse_error.py |
import os
import shutil
import sys
from six import StringIO
from eppy.runner.run_functions import parse_error, EnergyPlusRunError
def test_capture_stderr():
tmp_out = StringIO()
sys.stderr = tmp_out
sys.stderr.write("I am in stderr")
msg = parse_error(tmp_out, "C:/notafile")
assert "<File not f... | Test for an error that is still raised | Test for an error that is still raised
This is needed since we now automatically expand objects if required.
| Python | mit | santoshphilip/eppy,santoshphilip/eppy,santoshphilip/eppy | Test for an error that is still raised
This is needed since we now automatically expand objects if required. |
import os
import shutil
import sys
from six import StringIO
from eppy.runner.run_functions import parse_error, EnergyPlusRunError
def test_capture_stderr():
tmp_out = StringIO()
sys.stderr = tmp_out
sys.stderr.write("I am in stderr")
msg = parse_error(tmp_out, "C:/notafile")
assert "<File not f... | <commit_before><commit_msg>Test for an error that is still raised
This is needed since we now automatically expand objects if required.<commit_after> |
import os
import shutil
import sys
from six import StringIO
from eppy.runner.run_functions import parse_error, EnergyPlusRunError
def test_capture_stderr():
tmp_out = StringIO()
sys.stderr = tmp_out
sys.stderr.write("I am in stderr")
msg = parse_error(tmp_out, "C:/notafile")
assert "<File not f... | Test for an error that is still raised
This is needed since we now automatically expand objects if required.
import os
import shutil
import sys
from six import StringIO
from eppy.runner.run_functions import parse_error, EnergyPlusRunError
def test_capture_stderr():
tmp_out = StringIO()
sys.stderr = tmp_out... | <commit_before><commit_msg>Test for an error that is still raised
This is needed since we now automatically expand objects if required.<commit_after>
import os
import shutil
import sys
from six import StringIO
from eppy.runner.run_functions import parse_error, EnergyPlusRunError
def test_capture_stderr():
tmp_... | |
d3663a7e2bdc6b20d043b55c7fc4f29b7880242d | holmes/migrations/versions/7f4a3b8c55d_idx_requests_by_status_completed.py | holmes/migrations/versions/7f4a3b8c55d_idx_requests_by_status_completed.py | """idx requests by status, completed
Revision ID: 7f4a3b8c55d
Revises: 4b96dd9974bb
Create Date: 2014-03-31 17:39:40.858182
"""
# revision identifiers, used by Alembic.
revision = '7f4a3b8c55d'
down_revision = '4b96dd9974bb'
from alembic import op
def upgrade():
op.create_index('idx_status_complete', 'request... | Speed up request count by status in period of days | Speed up request count by status in period of days
| Python | mit | holmes-app/holmes-api,holmes-app/holmes-api | Speed up request count by status in period of days | """idx requests by status, completed
Revision ID: 7f4a3b8c55d
Revises: 4b96dd9974bb
Create Date: 2014-03-31 17:39:40.858182
"""
# revision identifiers, used by Alembic.
revision = '7f4a3b8c55d'
down_revision = '4b96dd9974bb'
from alembic import op
def upgrade():
op.create_index('idx_status_complete', 'request... | <commit_before><commit_msg>Speed up request count by status in period of days<commit_after> | """idx requests by status, completed
Revision ID: 7f4a3b8c55d
Revises: 4b96dd9974bb
Create Date: 2014-03-31 17:39:40.858182
"""
# revision identifiers, used by Alembic.
revision = '7f4a3b8c55d'
down_revision = '4b96dd9974bb'
from alembic import op
def upgrade():
op.create_index('idx_status_complete', 'request... | Speed up request count by status in period of days"""idx requests by status, completed
Revision ID: 7f4a3b8c55d
Revises: 4b96dd9974bb
Create Date: 2014-03-31 17:39:40.858182
"""
# revision identifiers, used by Alembic.
revision = '7f4a3b8c55d'
down_revision = '4b96dd9974bb'
from alembic import op
def upgrade():
... | <commit_before><commit_msg>Speed up request count by status in period of days<commit_after>"""idx requests by status, completed
Revision ID: 7f4a3b8c55d
Revises: 4b96dd9974bb
Create Date: 2014-03-31 17:39:40.858182
"""
# revision identifiers, used by Alembic.
revision = '7f4a3b8c55d'
down_revision = '4b96dd9974bb'
... | |
0d243fbb4eeb9f1065a3f29fa00b44e1349cb946 | vpr/tests/migrate/shell_migrate.py | vpr/tests/migrate/shell_migrate.py | from django.db import connection
from vpr_content import models
def removeDuplicatedTitleInMaterial():
cur = connection.cursor()
qr0 = 'select id from vpr_content_material'
qr1 = 'select text from vpr_content_material where id=%d'
qr2 = 'update vpr_content_material set text=\'%s\' where id=%d'
pt0 ... | Add migrate on shell script | Add migrate on shell script
| Python | agpl-3.0 | voer-platform/vp.repo,voer-platform/vp.repo,voer-platform/vp.repo,voer-platform/vp.repo | Add migrate on shell script | from django.db import connection
from vpr_content import models
def removeDuplicatedTitleInMaterial():
cur = connection.cursor()
qr0 = 'select id from vpr_content_material'
qr1 = 'select text from vpr_content_material where id=%d'
qr2 = 'update vpr_content_material set text=\'%s\' where id=%d'
pt0 ... | <commit_before><commit_msg>Add migrate on shell script<commit_after> | from django.db import connection
from vpr_content import models
def removeDuplicatedTitleInMaterial():
cur = connection.cursor()
qr0 = 'select id from vpr_content_material'
qr1 = 'select text from vpr_content_material where id=%d'
qr2 = 'update vpr_content_material set text=\'%s\' where id=%d'
pt0 ... | Add migrate on shell scriptfrom django.db import connection
from vpr_content import models
def removeDuplicatedTitleInMaterial():
cur = connection.cursor()
qr0 = 'select id from vpr_content_material'
qr1 = 'select text from vpr_content_material where id=%d'
qr2 = 'update vpr_content_material set text=\... | <commit_before><commit_msg>Add migrate on shell script<commit_after>from django.db import connection
from vpr_content import models
def removeDuplicatedTitleInMaterial():
cur = connection.cursor()
qr0 = 'select id from vpr_content_material'
qr1 = 'select text from vpr_content_material where id=%d'
qr2 ... | |
d75785472dd79f61067a98597064faa450feb100 | libnamebench/config_test.py | libnamebench/config_test.py | #!/usr/bin/env python
# Copyright 2009 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | Add some tests for dns config parsing | Add some tests for dns config parsing | Python | apache-2.0 | mirek2580/namebench | Add some tests for dns config parsing | #!/usr/bin/env python
# Copyright 2009 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | <commit_before><commit_msg>Add some tests for dns config parsing<commit_after> | #!/usr/bin/env python
# Copyright 2009 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | Add some tests for dns config parsing#!/usr/bin/env python
# Copyright 2009 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lic... | <commit_before><commit_msg>Add some tests for dns config parsing<commit_after>#!/usr/bin/env python
# Copyright 2009 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the Lice... | |
3a296e94be0f0870241bb451f3c5ad06b81deea2 | integration-test/1298-missing-road.py | integration-test/1298-missing-road.py | # Relation: 611 (975266)
#https://www.openstreetmap.org/relation/975266
test.assert_has_feature(
12, 1192, 1539, "roads",
{"kind": "major_road",
"shield_text": "611",
"ref": "PA 611",
"all_shield_texts": ["611"],
})
| Add regressiong test for missing road | Add regressiong test for missing road
| Python | mit | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | Add regressiong test for missing road | # Relation: 611 (975266)
#https://www.openstreetmap.org/relation/975266
test.assert_has_feature(
12, 1192, 1539, "roads",
{"kind": "major_road",
"shield_text": "611",
"ref": "PA 611",
"all_shield_texts": ["611"],
})
| <commit_before><commit_msg>Add regressiong test for missing road<commit_after> | # Relation: 611 (975266)
#https://www.openstreetmap.org/relation/975266
test.assert_has_feature(
12, 1192, 1539, "roads",
{"kind": "major_road",
"shield_text": "611",
"ref": "PA 611",
"all_shield_texts": ["611"],
})
| Add regressiong test for missing road# Relation: 611 (975266)
#https://www.openstreetmap.org/relation/975266
test.assert_has_feature(
12, 1192, 1539, "roads",
{"kind": "major_road",
"shield_text": "611",
"ref": "PA 611",
"all_shield_texts": ["611"],
})
| <commit_before><commit_msg>Add regressiong test for missing road<commit_after># Relation: 611 (975266)
#https://www.openstreetmap.org/relation/975266
test.assert_has_feature(
12, 1192, 1539, "roads",
{"kind": "major_road",
"shield_text": "611",
"ref": "PA 611",
"all_shield_texts": ["611"],
}... | |
52adf2407684730cfe3b5d4f9cab414c1442c6f1 | simplejtag_l0.py | simplejtag_l0.py | import time
import logging
import serial
from SWDAdapterBase import *
CMD_WRITE_TMS = ord('8') # +1
CMD_WRITE_TCK = ord(' ') # +1 aka SWCLK
CMD_READ_TMS = ord('d') # aka SWDIO
RESP_ACK = ord('+')
RESP_NACK = ord('-')
RESP_VAL = ord('0')
class Adapter(SWDAdapterBase):
def __init__(self, options):
S... | Add adapter plugin for simplejtag level0 protocol. | Add adapter plugin for simplejtag level0 protocol.
https://github.com/pfalcon/simplejtag
| Python | bsd-3-clause | heartscrytech/PySWD,pfalcon/PySWD,kcuzner/PySWD,heartscrytech/PySWD,pfalcon/PySWD,kcuzner/PySWD,pfalcon/PySWD | Add adapter plugin for simplejtag level0 protocol.
https://github.com/pfalcon/simplejtag | import time
import logging
import serial
from SWDAdapterBase import *
CMD_WRITE_TMS = ord('8') # +1
CMD_WRITE_TCK = ord(' ') # +1 aka SWCLK
CMD_READ_TMS = ord('d') # aka SWDIO
RESP_ACK = ord('+')
RESP_NACK = ord('-')
RESP_VAL = ord('0')
class Adapter(SWDAdapterBase):
def __init__(self, options):
S... | <commit_before><commit_msg>Add adapter plugin for simplejtag level0 protocol.
https://github.com/pfalcon/simplejtag<commit_after> | import time
import logging
import serial
from SWDAdapterBase import *
CMD_WRITE_TMS = ord('8') # +1
CMD_WRITE_TCK = ord(' ') # +1 aka SWCLK
CMD_READ_TMS = ord('d') # aka SWDIO
RESP_ACK = ord('+')
RESP_NACK = ord('-')
RESP_VAL = ord('0')
class Adapter(SWDAdapterBase):
def __init__(self, options):
S... | Add adapter plugin for simplejtag level0 protocol.
https://github.com/pfalcon/simplejtagimport time
import logging
import serial
from SWDAdapterBase import *
CMD_WRITE_TMS = ord('8') # +1
CMD_WRITE_TCK = ord(' ') # +1 aka SWCLK
CMD_READ_TMS = ord('d') # aka SWDIO
RESP_ACK = ord('+')
RESP_NACK = ord('-')
RESP_VA... | <commit_before><commit_msg>Add adapter plugin for simplejtag level0 protocol.
https://github.com/pfalcon/simplejtag<commit_after>import time
import logging
import serial
from SWDAdapterBase import *
CMD_WRITE_TMS = ord('8') # +1
CMD_WRITE_TCK = ord(' ') # +1 aka SWCLK
CMD_READ_TMS = ord('d') # aka SWDIO
RESP_AC... | |
1167c2789521ceeb2a852a1e20bdce4b40db3b04 | playserver/tracksocketserver.py | playserver/tracksocketserver.py | import autobahn.asyncio.websocket
class TrackSocket(autobah.asyncio.websocket.WebSocketServerProtocol):
@asyncio.coroutine
def onOpen(self):
#TODO: Make this add to the client list
print("opened")
def closed(self, wasClean, code, reason):
#TODO: make this remove from the client list
print("closed")
| Add basic TrackSocket using autobahn | Add basic TrackSocket using autobahn
| Python | mit | ollien/playserver,ollien/playserver,ollien/playserver | Add basic TrackSocket using autobahn | import autobahn.asyncio.websocket
class TrackSocket(autobah.asyncio.websocket.WebSocketServerProtocol):
@asyncio.coroutine
def onOpen(self):
#TODO: Make this add to the client list
print("opened")
def closed(self, wasClean, code, reason):
#TODO: make this remove from the client list
print("closed")
| <commit_before><commit_msg>Add basic TrackSocket using autobahn<commit_after> | import autobahn.asyncio.websocket
class TrackSocket(autobah.asyncio.websocket.WebSocketServerProtocol):
@asyncio.coroutine
def onOpen(self):
#TODO: Make this add to the client list
print("opened")
def closed(self, wasClean, code, reason):
#TODO: make this remove from the client list
print("closed")
| Add basic TrackSocket using autobahnimport autobahn.asyncio.websocket
class TrackSocket(autobah.asyncio.websocket.WebSocketServerProtocol):
@asyncio.coroutine
def onOpen(self):
#TODO: Make this add to the client list
print("opened")
def closed(self, wasClean, code, reason):
#TODO: make this remove from the ... | <commit_before><commit_msg>Add basic TrackSocket using autobahn<commit_after>import autobahn.asyncio.websocket
class TrackSocket(autobah.asyncio.websocket.WebSocketServerProtocol):
@asyncio.coroutine
def onOpen(self):
#TODO: Make this add to the client list
print("opened")
def closed(self, wasClean, code, rea... | |
c657836fa7b7e9d248cb35f67384a6da87409380 | mapit/management/commands/mapit_UK_fix_2014-05.py | mapit/management/commands/mapit_UK_fix_2014-05.py | # This script is to be run as a one-off to fix up some geometries in the May
# 2014 edition of boundary line that are invalid.
from optparse import make_option
from django.core.management.base import NoArgsCommand
from django.contrib.gis.gdal import *
from mapit.models import Area, CodeType
from ..command_utils import... | Add a command to fix invalid geometries in 2014-05 boundary line | Add a command to fix invalid geometries in 2014-05 boundary line
Some of the geometries the Ordnance Survey provided were invalid,
having duplicated start and end points. This command fixes them up.
| Python | agpl-3.0 | chris48s/mapit,Code4SA/mapit,opencorato/mapit,opencorato/mapit,opencorato/mapit,chris48s/mapit,Code4SA/mapit,Sinar/mapit,Code4SA/mapit,Sinar/mapit,chris48s/mapit | Add a command to fix invalid geometries in 2014-05 boundary line
Some of the geometries the Ordnance Survey provided were invalid,
having duplicated start and end points. This command fixes them up. | # This script is to be run as a one-off to fix up some geometries in the May
# 2014 edition of boundary line that are invalid.
from optparse import make_option
from django.core.management.base import NoArgsCommand
from django.contrib.gis.gdal import *
from mapit.models import Area, CodeType
from ..command_utils import... | <commit_before><commit_msg>Add a command to fix invalid geometries in 2014-05 boundary line
Some of the geometries the Ordnance Survey provided were invalid,
having duplicated start and end points. This command fixes them up.<commit_after> | # This script is to be run as a one-off to fix up some geometries in the May
# 2014 edition of boundary line that are invalid.
from optparse import make_option
from django.core.management.base import NoArgsCommand
from django.contrib.gis.gdal import *
from mapit.models import Area, CodeType
from ..command_utils import... | Add a command to fix invalid geometries in 2014-05 boundary line
Some of the geometries the Ordnance Survey provided were invalid,
having duplicated start and end points. This command fixes them up.# This script is to be run as a one-off to fix up some geometries in the May
# 2014 edition of boundary line that are inv... | <commit_before><commit_msg>Add a command to fix invalid geometries in 2014-05 boundary line
Some of the geometries the Ordnance Survey provided were invalid,
having duplicated start and end points. This command fixes them up.<commit_after># This script is to be run as a one-off to fix up some geometries in the May
# 2... | |
9161b64bb5625c11a1786826c02b33c28e9cc169 | bongo/apps/archive/management/commands/flushimported.py | bongo/apps/archive/management/commands/flushimported.py | from django.core.management.base import BaseCommand
from django.db import models as registered_models
class Command(BaseCommand):
def handle(self, *args, **options):
for model in registered_models.get_models(include_auto_created=True):
if model._meta.app_label == "bongo":
for o... | Add management command to delete all objects that were imported from archive | Add management command to delete all objects that were imported from archive
| Python | mit | BowdoinOrient/bongo,BowdoinOrient/bongo,BowdoinOrient/bongo,BowdoinOrient/bongo | Add management command to delete all objects that were imported from archive | from django.core.management.base import BaseCommand
from django.db import models as registered_models
class Command(BaseCommand):
def handle(self, *args, **options):
for model in registered_models.get_models(include_auto_created=True):
if model._meta.app_label == "bongo":
for o... | <commit_before><commit_msg>Add management command to delete all objects that were imported from archive<commit_after> | from django.core.management.base import BaseCommand
from django.db import models as registered_models
class Command(BaseCommand):
def handle(self, *args, **options):
for model in registered_models.get_models(include_auto_created=True):
if model._meta.app_label == "bongo":
for o... | Add management command to delete all objects that were imported from archivefrom django.core.management.base import BaseCommand
from django.db import models as registered_models
class Command(BaseCommand):
def handle(self, *args, **options):
for model in registered_models.get_models(include_auto_created=T... | <commit_before><commit_msg>Add management command to delete all objects that were imported from archive<commit_after>from django.core.management.base import BaseCommand
from django.db import models as registered_models
class Command(BaseCommand):
def handle(self, *args, **options):
for model in registered... | |
7e69b7ca81a25d56764fc8a9ddd45d023ce23550 | kinect2_calibration/scripts/convert_calib_pose_to_urdf_format.py | kinect2_calibration/scripts/convert_calib_pose_to_urdf_format.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import numpy as np
import os
import tempfile
import tf
import yaml
def read_calib_pose(fname):
tmp = tempfile.TemporaryFile()
# we need modify original yaml file because yaml.load(fname) simply will fail
with open(fname, "r") as f:
read... | Add a convert script from calib_pose.yaml to urdf format | Add a convert script from calib_pose.yaml to urdf format
| Python | apache-2.0 | code-iai/iai_kinect2,code-iai/iai_kinect2,code-iai/iai_kinect2 | Add a convert script from calib_pose.yaml to urdf format | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import numpy as np
import os
import tempfile
import tf
import yaml
def read_calib_pose(fname):
tmp = tempfile.TemporaryFile()
# we need modify original yaml file because yaml.load(fname) simply will fail
with open(fname, "r") as f:
read... | <commit_before><commit_msg>Add a convert script from calib_pose.yaml to urdf format<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import numpy as np
import os
import tempfile
import tf
import yaml
def read_calib_pose(fname):
tmp = tempfile.TemporaryFile()
# we need modify original yaml file because yaml.load(fname) simply will fail
with open(fname, "r") as f:
read... | Add a convert script from calib_pose.yaml to urdf format#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import numpy as np
import os
import tempfile
import tf
import yaml
def read_calib_pose(fname):
tmp = tempfile.TemporaryFile()
# we need modify original yaml file because yaml.load(fname) simpl... | <commit_before><commit_msg>Add a convert script from calib_pose.yaml to urdf format<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import numpy as np
import os
import tempfile
import tf
import yaml
def read_calib_pose(fname):
tmp = tempfile.TemporaryFile()
# we need modify original... | |
4f754ad3177eb0fcdc10ccf7804349a9453e9ff0 | asyncio/__init__.py | asyncio/__init__.py | """The asyncio package, tracking PEP 3156."""
import sys
# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
# Do this first, so the other submodules can use "from . import selectors".
# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
try:
from . import selectors
except Im... | """The asyncio package, tracking PEP 3156."""
import sys
# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
# Do this first, so the other submodules can use "from . import selectors".
# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
try:
from . import selectors
except Im... | Fix asyncio.__all__: export also unix_events and windows_events symbols | Fix asyncio.__all__: export also unix_events and windows_events symbols
For example, on Windows, it was not possible to get ProactorEventLoop or
DefaultEventLoopPolicy using "from asyncio import *".
| Python | apache-2.0 | vxgmichel/asyncio,gvanrossum/asyncio,manipopopo/asyncio,jashandeep-sohi/asyncio,Martiusweb/asyncio,ajdavis/asyncio,Martiusweb/asyncio,jashandeep-sohi/asyncio,1st1/asyncio,haypo/trollius,fallen/asyncio,vxgmichel/asyncio,gvanrossum/asyncio,Martiusweb/asyncio,jashandeep-sohi/asyncio,fallen/asyncio,haypo/trollius,haypo/tro... | """The asyncio package, tracking PEP 3156."""
import sys
# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
# Do this first, so the other submodules can use "from . import selectors".
# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
try:
from . import selectors
except Im... | """The asyncio package, tracking PEP 3156."""
import sys
# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
# Do this first, so the other submodules can use "from . import selectors".
# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
try:
from . import selectors
except Im... | <commit_before>"""The asyncio package, tracking PEP 3156."""
import sys
# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
# Do this first, so the other submodules can use "from . import selectors".
# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
try:
from . import sele... | """The asyncio package, tracking PEP 3156."""
import sys
# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
# Do this first, so the other submodules can use "from . import selectors".
# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
try:
from . import selectors
except Im... | """The asyncio package, tracking PEP 3156."""
import sys
# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
# Do this first, so the other submodules can use "from . import selectors".
# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
try:
from . import selectors
except Im... | <commit_before>"""The asyncio package, tracking PEP 3156."""
import sys
# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
# Do this first, so the other submodules can use "from . import selectors".
# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
try:
from . import sele... |
d71f62599effde01c1bc33abbd4a034b5d1a87d0 | caltech/show-nll.py | caltech/show-nll.py | #!/usr/bin/env python
from __future__ import division
import sys
import logging
from time import time
import cPickle as pickle
import numpy as np
import h5py
import pylab
#import theano
#import theano.tensor as T
_logger = logging.getLogger()
#===================================================================... | Add script to plot ~LL's | Add script to plot ~LL's
| Python | agpl-3.0 | codeaudit/reweighted-ws,codeaudit/reweighted-ws,lenovor/reweighted-ws,jbornschein/reweighted-ws,yanweifu/reweighted-ws,jbornschein/y2k,lenovor/reweighted-ws,skaasj/reweighted-ws,jbornschein/y2k,jbornschein/reweighted-ws,skaasj/reweighted-ws,yanweifu/reweighted-ws | Add script to plot ~LL's | #!/usr/bin/env python
from __future__ import division
import sys
import logging
from time import time
import cPickle as pickle
import numpy as np
import h5py
import pylab
#import theano
#import theano.tensor as T
_logger = logging.getLogger()
#===================================================================... | <commit_before><commit_msg>Add script to plot ~LL's<commit_after> | #!/usr/bin/env python
from __future__ import division
import sys
import logging
from time import time
import cPickle as pickle
import numpy as np
import h5py
import pylab
#import theano
#import theano.tensor as T
_logger = logging.getLogger()
#===================================================================... | Add script to plot ~LL's#!/usr/bin/env python
from __future__ import division
import sys
import logging
from time import time
import cPickle as pickle
import numpy as np
import h5py
import pylab
#import theano
#import theano.tensor as T
_logger = logging.getLogger()
#===========================================... | <commit_before><commit_msg>Add script to plot ~LL's<commit_after>#!/usr/bin/env python
from __future__ import division
import sys
import logging
from time import time
import cPickle as pickle
import numpy as np
import h5py
import pylab
#import theano
#import theano.tensor as T
_logger = logging.getLogger()
#==... | |
02bbf70940dead81017a741048bfff28a0a488c4 | model/slide_carousel.py | model/slide_carousel.py | import json
from numpy.random import choice
def generate_slides():
slides = json.load(open("static/carousel/slides.json", "r"))
weights = [x["weight"] for x in slides]
sum_weights = sum(weights)
weights = [w / float(sum_weights) for w in weights]
num_slides = 5
slides = ... | Add slide carousel helper function model. | Add slide carousel helper function model.
| Python | apache-2.0 | JeffreyBLewis/WebVoteView,JeffreyBLewis/WebVoteView,JeffreyBLewis/WebVoteView,JeffreyBLewis/WebVoteView | Add slide carousel helper function model. | import json
from numpy.random import choice
def generate_slides():
slides = json.load(open("static/carousel/slides.json", "r"))
weights = [x["weight"] for x in slides]
sum_weights = sum(weights)
weights = [w / float(sum_weights) for w in weights]
num_slides = 5
slides = ... | <commit_before><commit_msg>Add slide carousel helper function model.<commit_after> | import json
from numpy.random import choice
def generate_slides():
slides = json.load(open("static/carousel/slides.json", "r"))
weights = [x["weight"] for x in slides]
sum_weights = sum(weights)
weights = [w / float(sum_weights) for w in weights]
num_slides = 5
slides = ... | Add slide carousel helper function model.import json
from numpy.random import choice
def generate_slides():
slides = json.load(open("static/carousel/slides.json", "r"))
weights = [x["weight"] for x in slides]
sum_weights = sum(weights)
weights = [w / float(sum_weights) for w in weights]... | <commit_before><commit_msg>Add slide carousel helper function model.<commit_after>import json
from numpy.random import choice
def generate_slides():
slides = json.load(open("static/carousel/slides.json", "r"))
weights = [x["weight"] for x in slides]
sum_weights = sum(weights)
weights = ... | |
a7b30e1804414f3460a1006a7b92f3d34d0f8090 | bvg-grabber.py | bvg-grabber.py | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import sys
from bvggrabber.api.actualdeparture import ActualDepartureQueryApi
from bvggrabber.api.scheduleddeparture import ScheduledDepartureQueryApi, Vehicle
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='Quer... | Add a CLI script to fetch departures | Add a CLI script to fetch departures
| Python | bsd-3-clause | MarkusH/bvg-grabber | Add a CLI script to fetch departures | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import sys
from bvggrabber.api.actualdeparture import ActualDepartureQueryApi
from bvggrabber.api.scheduleddeparture import ScheduledDepartureQueryApi, Vehicle
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='Quer... | <commit_before><commit_msg>Add a CLI script to fetch departures<commit_after> | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import sys
from bvggrabber.api.actualdeparture import ActualDepartureQueryApi
from bvggrabber.api.scheduleddeparture import ScheduledDepartureQueryApi, Vehicle
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='Quer... | Add a CLI script to fetch departures#! /usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import sys
from bvggrabber.api.actualdeparture import ActualDepartureQueryApi
from bvggrabber.api.scheduleddeparture import ScheduledDepartureQueryApi, Vehicle
if __name__ == '__main__':
parser = argparse.Argum... | <commit_before><commit_msg>Add a CLI script to fetch departures<commit_after>#! /usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import sys
from bvggrabber.api.actualdeparture import ActualDepartureQueryApi
from bvggrabber.api.scheduleddeparture import ScheduledDepartureQueryApi, Vehicle
if __name__ ==... | |
8780cd754652b2f4b3e16b7eafcf28ec5fb5d63b | cogs/command_log.py | cogs/command_log.py | import logging
class CommandLog:
"""A simple cog to log commands executed."""
def __init__(self):
self.log = logging.getLogger('liara.command_log')
async def on_command(self, ctx):
self.log.info('{0.author} ({0.author.id}) executed command "{0.command}" in {0.guild}'.format(ctx))
def se... | Add a simple command-logging cog | Add a simple command-logging cog
| Python | mit | Thessia/Liara | Add a simple command-logging cog | import logging
class CommandLog:
"""A simple cog to log commands executed."""
def __init__(self):
self.log = logging.getLogger('liara.command_log')
async def on_command(self, ctx):
self.log.info('{0.author} ({0.author.id}) executed command "{0.command}" in {0.guild}'.format(ctx))
def se... | <commit_before><commit_msg>Add a simple command-logging cog<commit_after> | import logging
class CommandLog:
"""A simple cog to log commands executed."""
def __init__(self):
self.log = logging.getLogger('liara.command_log')
async def on_command(self, ctx):
self.log.info('{0.author} ({0.author.id}) executed command "{0.command}" in {0.guild}'.format(ctx))
def se... | Add a simple command-logging cogimport logging
class CommandLog:
"""A simple cog to log commands executed."""
def __init__(self):
self.log = logging.getLogger('liara.command_log')
async def on_command(self, ctx):
self.log.info('{0.author} ({0.author.id}) executed command "{0.command}" in ... | <commit_before><commit_msg>Add a simple command-logging cog<commit_after>import logging
class CommandLog:
"""A simple cog to log commands executed."""
def __init__(self):
self.log = logging.getLogger('liara.command_log')
async def on_command(self, ctx):
self.log.info('{0.author} ({0.autho... | |
881086ca70eea95ef712aba26a77113de2a2f6a4 | python/pygtk/python_gtk3_pygobject/search_entry.py | python/pygtk/python_gtk3_pygobject/search_entry.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org)
"""
A simple Python GTK+3 SearchEntry snippet.
API: http://lazka.github.io/pgi-docs/Gtk-3.0/classes/SearchEntry.html
"""
from gi.repository import Gtk as gtk
def print_text(widget, data):
"""
Print the ... | Add a widget (Python GTK+3). | Add a widget (Python GTK+3).
| Python | mit | jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets | Add a widget (Python GTK+3). | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org)
"""
A simple Python GTK+3 SearchEntry snippet.
API: http://lazka.github.io/pgi-docs/Gtk-3.0/classes/SearchEntry.html
"""
from gi.repository import Gtk as gtk
def print_text(widget, data):
"""
Print the ... | <commit_before><commit_msg>Add a widget (Python GTK+3).<commit_after> | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org)
"""
A simple Python GTK+3 SearchEntry snippet.
API: http://lazka.github.io/pgi-docs/Gtk-3.0/classes/SearchEntry.html
"""
from gi.repository import Gtk as gtk
def print_text(widget, data):
"""
Print the ... | Add a widget (Python GTK+3).#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org)
"""
A simple Python GTK+3 SearchEntry snippet.
API: http://lazka.github.io/pgi-docs/Gtk-3.0/classes/SearchEntry.html
"""
from gi.repository import Gtk as gtk
def print_text(widget, d... | <commit_before><commit_msg>Add a widget (Python GTK+3).<commit_after>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org)
"""
A simple Python GTK+3 SearchEntry snippet.
API: http://lazka.github.io/pgi-docs/Gtk-3.0/classes/SearchEntry.html
"""
from gi.repository im... | |
030cd9181965366f2b0427a2bc2d9e569fd3cd17 | tests/test_data_handler.py | tests/test_data_handler.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from utils.data_handler import DataHandler
src_rs = r"D:\nhl\official_and_json\_2015-16\2016-04\2016-04-10.zip"
src_po = r"D:\nhl\official_and_json\_2015-16\2016-04\2016-04-13.zip"
def test_find_html_data():
dh_rs = DataHandler(src_rs)
dh_po = Data... | Add tests for data handler items | Add tests for data handler items
| Python | mit | leaffan/pynhldb | Add tests for data handler items | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from utils.data_handler import DataHandler
src_rs = r"D:\nhl\official_and_json\_2015-16\2016-04\2016-04-10.zip"
src_po = r"D:\nhl\official_and_json\_2015-16\2016-04\2016-04-13.zip"
def test_find_html_data():
dh_rs = DataHandler(src_rs)
dh_po = Data... | <commit_before><commit_msg>Add tests for data handler items<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from utils.data_handler import DataHandler
src_rs = r"D:\nhl\official_and_json\_2015-16\2016-04\2016-04-10.zip"
src_po = r"D:\nhl\official_and_json\_2015-16\2016-04\2016-04-13.zip"
def test_find_html_data():
dh_rs = DataHandler(src_rs)
dh_po = Data... | Add tests for data handler items#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from utils.data_handler import DataHandler
src_rs = r"D:\nhl\official_and_json\_2015-16\2016-04\2016-04-10.zip"
src_po = r"D:\nhl\official_and_json\_2015-16\2016-04\2016-04-13.zip"
def test_find_html_data():
dh_rs = Data... | <commit_before><commit_msg>Add tests for data handler items<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from utils.data_handler import DataHandler
src_rs = r"D:\nhl\official_and_json\_2015-16\2016-04\2016-04-10.zip"
src_po = r"D:\nhl\official_and_json\_2015-16\2016-04\2016-04-13.zip"
de... | |
3041ee3026b79b7b840d597ba67ebe6b5020fa7a | pyisemail/test/test_email_validator.py | pyisemail/test/test_email_validator.py | import unittest
from pyisemail import EmailValidator
class EmailValidatorTest(unittest.TestCase):
def test_abstract_is_email(self):
v = EmailValidator()
self.assertRaises(NotImplementedError, v.is_email, "test@example.com") | Make sure EmailValidator.is_email raises NotImplementedError. | Make sure EmailValidator.is_email raises NotImplementedError.
| Python | mit | michaelherold/pyIsEmail,michaelherold/pyIsEmail | Make sure EmailValidator.is_email raises NotImplementedError. | import unittest
from pyisemail import EmailValidator
class EmailValidatorTest(unittest.TestCase):
def test_abstract_is_email(self):
v = EmailValidator()
self.assertRaises(NotImplementedError, v.is_email, "test@example.com") | <commit_before><commit_msg>Make sure EmailValidator.is_email raises NotImplementedError.<commit_after> | import unittest
from pyisemail import EmailValidator
class EmailValidatorTest(unittest.TestCase):
def test_abstract_is_email(self):
v = EmailValidator()
self.assertRaises(NotImplementedError, v.is_email, "test@example.com") | Make sure EmailValidator.is_email raises NotImplementedError.import unittest
from pyisemail import EmailValidator
class EmailValidatorTest(unittest.TestCase):
def test_abstract_is_email(self):
v = EmailValidator()
self.assertRaises(NotImplementedError, v.is_email, "test@example.com") | <commit_before><commit_msg>Make sure EmailValidator.is_email raises NotImplementedError.<commit_after>import unittest
from pyisemail import EmailValidator
class EmailValidatorTest(unittest.TestCase):
def test_abstract_is_email(self):
v = EmailValidator()
self.assertRaises(NotImplementedError, v.i... | |
b7de7d6c5ec8509331be6cfb63fc0f591c256412 | tests/test_symbolic_data.py | tests/test_symbolic_data.py | from devito import DenseData, TimeData
from sympy import symbols, Derivative, as_finite_diff
import pytest
import numpy as np
@pytest.fixture
def shape(xdim=20, ydim=30):
return (xdim, ydim)
@pytest.mark.parametrize('SymbolType, dimension', [
(DenseData, 'x'), (DenseData, 'y'),
(TimeData, 'x'), (TimeDat... | Add tests for symbolic differentiation of data objects | SymbolicData: Add tests for symbolic differentiation of data objects
| Python | mit | opesci/devito,opesci/devito | SymbolicData: Add tests for symbolic differentiation of data objects | from devito import DenseData, TimeData
from sympy import symbols, Derivative, as_finite_diff
import pytest
import numpy as np
@pytest.fixture
def shape(xdim=20, ydim=30):
return (xdim, ydim)
@pytest.mark.parametrize('SymbolType, dimension', [
(DenseData, 'x'), (DenseData, 'y'),
(TimeData, 'x'), (TimeDat... | <commit_before><commit_msg>SymbolicData: Add tests for symbolic differentiation of data objects<commit_after> | from devito import DenseData, TimeData
from sympy import symbols, Derivative, as_finite_diff
import pytest
import numpy as np
@pytest.fixture
def shape(xdim=20, ydim=30):
return (xdim, ydim)
@pytest.mark.parametrize('SymbolType, dimension', [
(DenseData, 'x'), (DenseData, 'y'),
(TimeData, 'x'), (TimeDat... | SymbolicData: Add tests for symbolic differentiation of data objectsfrom devito import DenseData, TimeData
from sympy import symbols, Derivative, as_finite_diff
import pytest
import numpy as np
@pytest.fixture
def shape(xdim=20, ydim=30):
return (xdim, ydim)
@pytest.mark.parametrize('SymbolType, dimension', [
... | <commit_before><commit_msg>SymbolicData: Add tests for symbolic differentiation of data objects<commit_after>from devito import DenseData, TimeData
from sympy import symbols, Derivative, as_finite_diff
import pytest
import numpy as np
@pytest.fixture
def shape(xdim=20, ydim=30):
return (xdim, ydim)
@pytest.mark... | |
4911788e869510c76cd5d4a4ea593fc0769d41d2 | scripts/release/update_rnacentral_description.py | scripts/release/update_rnacentral_description.py | """
Update all RNAcentral descriptions to the latest version using RNAcentral API.
Usage:
python update_rnacentral_descriptions.py
"""
import requests
from utils import RfamDB
def update_description(cursor, cnx, rfamseq_acc, description):
"""
Update rfamseq description for a sequence ID.
"""
sql =... | Add a script to update RNAcentral descriptions | Add a script to update RNAcentral descriptions
| Python | apache-2.0 | Rfam/rfam-production,Rfam/rfam-production,Rfam/rfam-production | Add a script to update RNAcentral descriptions | """
Update all RNAcentral descriptions to the latest version using RNAcentral API.
Usage:
python update_rnacentral_descriptions.py
"""
import requests
from utils import RfamDB
def update_description(cursor, cnx, rfamseq_acc, description):
"""
Update rfamseq description for a sequence ID.
"""
sql =... | <commit_before><commit_msg>Add a script to update RNAcentral descriptions<commit_after> | """
Update all RNAcentral descriptions to the latest version using RNAcentral API.
Usage:
python update_rnacentral_descriptions.py
"""
import requests
from utils import RfamDB
def update_description(cursor, cnx, rfamseq_acc, description):
"""
Update rfamseq description for a sequence ID.
"""
sql =... | Add a script to update RNAcentral descriptions"""
Update all RNAcentral descriptions to the latest version using RNAcentral API.
Usage:
python update_rnacentral_descriptions.py
"""
import requests
from utils import RfamDB
def update_description(cursor, cnx, rfamseq_acc, description):
"""
Update rfamseq de... | <commit_before><commit_msg>Add a script to update RNAcentral descriptions<commit_after>"""
Update all RNAcentral descriptions to the latest version using RNAcentral API.
Usage:
python update_rnacentral_descriptions.py
"""
import requests
from utils import RfamDB
def update_description(cursor, cnx, rfamseq_acc, de... | |
34c1c4789de07a2b5044940210618103327f3c37 | astrotools/interpolate.py | astrotools/interpolate.py | """
Set of routines and classes for interpolating light curves.
There include Gaussian Processes and Spline interpolation
"""
import george
from george.kernels import Matern32Kernel
class GP:
def __init__(self):
self.gp = None
def fit(self, data, kernel_size=1000):
self.gp = george.GP(Matern3... | Create an outline for the gaussian process interpolation class. | Create an outline for the gaussian process interpolation class.
| Python | mit | SzymonPrajs/astrotools | Create an outline for the gaussian process interpolation class. | """
Set of routines and classes for interpolating light curves.
There include Gaussian Processes and Spline interpolation
"""
import george
from george.kernels import Matern32Kernel
class GP:
def __init__(self):
self.gp = None
def fit(self, data, kernel_size=1000):
self.gp = george.GP(Matern3... | <commit_before><commit_msg>Create an outline for the gaussian process interpolation class.<commit_after> | """
Set of routines and classes for interpolating light curves.
There include Gaussian Processes and Spline interpolation
"""
import george
from george.kernels import Matern32Kernel
class GP:
def __init__(self):
self.gp = None
def fit(self, data, kernel_size=1000):
self.gp = george.GP(Matern3... | Create an outline for the gaussian process interpolation class."""
Set of routines and classes for interpolating light curves.
There include Gaussian Processes and Spline interpolation
"""
import george
from george.kernels import Matern32Kernel
class GP:
def __init__(self):
self.gp = None
def fit(sel... | <commit_before><commit_msg>Create an outline for the gaussian process interpolation class.<commit_after>"""
Set of routines and classes for interpolating light curves.
There include Gaussian Processes and Spline interpolation
"""
import george
from george.kernels import Matern32Kernel
class GP:
def __init__(self)... | |
d6590c14c16f30cd2802917183fe17de7f0eabf0 | bin/result_updater.py | bin/result_updater.py | #!/usr/bin/python2.4
#
# Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the 'License')
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | Add a client to migrate from ResultParent.user_agent_list to ResultParent.user_agent_pretty | Add a client to migrate from ResultParent.user_agent_list to ResultParent.user_agent_pretty
| Python | apache-2.0 | ollie314/browserscope,shinyChen/browserscope,image72/browserscope,ollie314/browserscope,githubashto/browserscope,githubashto/browserscope,shinyChen/browserscope,image72/browserscope,githubashto/browserscope,githubashto/browserscope,shinyChen/browserscope,ollie314/browserscope,shinyChen/browserscope,image72/browserscope... | Add a client to migrate from ResultParent.user_agent_list to ResultParent.user_agent_pretty | #!/usr/bin/python2.4
#
# Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the 'License')
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | <commit_before><commit_msg>Add a client to migrate from ResultParent.user_agent_list to ResultParent.user_agent_pretty<commit_after> | #!/usr/bin/python2.4
#
# Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the 'License')
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | Add a client to migrate from ResultParent.user_agent_list to ResultParent.user_agent_pretty#!/usr/bin/python2.4
#
# Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the 'License')
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#... | <commit_before><commit_msg>Add a client to migrate from ResultParent.user_agent_list to ResultParent.user_agent_pretty<commit_after>#!/usr/bin/python2.4
#
# Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the 'License')
# you may not use this file except in compliance with the License.
# ... | |
3489deed854ab6c5448c5a28955751a6a1ec134e | test/jpypetest/test_zzz.py | test/jpypetest/test_zzz.py | import sys
import _jpype
import jpype
from jpype.types import *
from jpype import JPackage, java
import common
import pytest
try:
import numpy as np
except ImportError:
pass
class ZZZTestCase(common.JPypeTestCase):
def setUp(self):
common.JPypeTestCase.setUp(self)
def testShutdown(self):
... | Add shutdown at end to make sure that we dont crash on shutdown. | Add shutdown at end to make sure that we dont crash on shutdown.
| Python | apache-2.0 | originell/jpype,originell/jpype,originell/jpype,originell/jpype,originell/jpype | Add shutdown at end to make sure that we dont crash on shutdown. | import sys
import _jpype
import jpype
from jpype.types import *
from jpype import JPackage, java
import common
import pytest
try:
import numpy as np
except ImportError:
pass
class ZZZTestCase(common.JPypeTestCase):
def setUp(self):
common.JPypeTestCase.setUp(self)
def testShutdown(self):
... | <commit_before><commit_msg>Add shutdown at end to make sure that we dont crash on shutdown.<commit_after> | import sys
import _jpype
import jpype
from jpype.types import *
from jpype import JPackage, java
import common
import pytest
try:
import numpy as np
except ImportError:
pass
class ZZZTestCase(common.JPypeTestCase):
def setUp(self):
common.JPypeTestCase.setUp(self)
def testShutdown(self):
... | Add shutdown at end to make sure that we dont crash on shutdown.import sys
import _jpype
import jpype
from jpype.types import *
from jpype import JPackage, java
import common
import pytest
try:
import numpy as np
except ImportError:
pass
class ZZZTestCase(common.JPypeTestCase):
def setUp(self):
c... | <commit_before><commit_msg>Add shutdown at end to make sure that we dont crash on shutdown.<commit_after>import sys
import _jpype
import jpype
from jpype.types import *
from jpype import JPackage, java
import common
import pytest
try:
import numpy as np
except ImportError:
pass
class ZZZTestCase(common.JPypeT... | |
b023316bfa98a7b864044fe1274dbaed52990d77 | tests/test_google_group.py | tests/test_google_group.py | import pytest
from web_test_base import *
class TestGoogleGroup(WebTestBase):
urls_to_get = [
"https://groups.google.com/forum/#!forum/iati-technical"
]
def test_locate_links(self, loaded_request):
"""
Tests that a page contains links to the defined URLs.
This test would id... | Add a test for the IATI Google Group | Add a test for the IATI Google Group
This tests the 200 response.
It would ideally be checked that there is a link to IATI Discuss.
This is not done because of the way the page loads.
This functionality could be added later with Selenium.
| Python | mit | IATI/IATI-Website-Tests | Add a test for the IATI Google Group
This tests the 200 response.
It would ideally be checked that there is a link to IATI Discuss.
This is not done because of the way the page loads.
This functionality could be added later with Selenium. | import pytest
from web_test_base import *
class TestGoogleGroup(WebTestBase):
urls_to_get = [
"https://groups.google.com/forum/#!forum/iati-technical"
]
def test_locate_links(self, loaded_request):
"""
Tests that a page contains links to the defined URLs.
This test would id... | <commit_before><commit_msg>Add a test for the IATI Google Group
This tests the 200 response.
It would ideally be checked that there is a link to IATI Discuss.
This is not done because of the way the page loads.
This functionality could be added later with Selenium.<commit_after> | import pytest
from web_test_base import *
class TestGoogleGroup(WebTestBase):
urls_to_get = [
"https://groups.google.com/forum/#!forum/iati-technical"
]
def test_locate_links(self, loaded_request):
"""
Tests that a page contains links to the defined URLs.
This test would id... | Add a test for the IATI Google Group
This tests the 200 response.
It would ideally be checked that there is a link to IATI Discuss.
This is not done because of the way the page loads.
This functionality could be added later with Selenium.import pytest
from web_test_base import *
class TestGoogleGroup(WebTestBase):
... | <commit_before><commit_msg>Add a test for the IATI Google Group
This tests the 200 response.
It would ideally be checked that there is a link to IATI Discuss.
This is not done because of the way the page loads.
This functionality could be added later with Selenium.<commit_after>import pytest
from web_test_base import ... | |
5101e5e6c11c37a1970e8f56359c62316444b49a | supriya/tools/synthdeftools/test/test_SynthDef___str__.py | supriya/tools/synthdeftools/test/test_SynthDef___str__.py | # -*- encoding: utf-8 -*-
from abjad.tools import systemtools
from supriya import synthdeftools
from supriya import ugentools
class TestCase(systemtools.TestCase):
def test_multi_value_parameters(self):
with synthdeftools.SynthDefBuilder(
amp=0.1,
freqs=[300, 400],
out... | Add multi-value parameter SynthDef str() test. | Add multi-value parameter SynthDef str() test.
| Python | mit | josiah-wolf-oberholtzer/supriya,Pulgama/supriya,Pulgama/supriya,Pulgama/supriya,Pulgama/supriya | Add multi-value parameter SynthDef str() test. | # -*- encoding: utf-8 -*-
from abjad.tools import systemtools
from supriya import synthdeftools
from supriya import ugentools
class TestCase(systemtools.TestCase):
def test_multi_value_parameters(self):
with synthdeftools.SynthDefBuilder(
amp=0.1,
freqs=[300, 400],
out... | <commit_before><commit_msg>Add multi-value parameter SynthDef str() test.<commit_after> | # -*- encoding: utf-8 -*-
from abjad.tools import systemtools
from supriya import synthdeftools
from supriya import ugentools
class TestCase(systemtools.TestCase):
def test_multi_value_parameters(self):
with synthdeftools.SynthDefBuilder(
amp=0.1,
freqs=[300, 400],
out... | Add multi-value parameter SynthDef str() test.# -*- encoding: utf-8 -*-
from abjad.tools import systemtools
from supriya import synthdeftools
from supriya import ugentools
class TestCase(systemtools.TestCase):
def test_multi_value_parameters(self):
with synthdeftools.SynthDefBuilder(
amp=0.1,... | <commit_before><commit_msg>Add multi-value parameter SynthDef str() test.<commit_after># -*- encoding: utf-8 -*-
from abjad.tools import systemtools
from supriya import synthdeftools
from supriya import ugentools
class TestCase(systemtools.TestCase):
def test_multi_value_parameters(self):
with synthdefto... | |
c428af7bce479fdcde34ce0997d41573861bf3e5 | scripts/count_duplicates.py | scripts/count_duplicates.py | # -*- coding: utf-8 -*-
import pandas as pd
all_df = None
for filename in ["dentistes.refined.csv",
"infirmiers.refined.csv",
"medecins_exploitables.refined.csv",
"medecins_inexploitables.refined.csv",
"pharmaciens.refined.csv",
"tr... | Add script to count duplicated data | Add script to count duplicated data
| Python | agpl-3.0 | regardscitoyens/sunshine-data,regardscitoyens/sunshine-data,regardscitoyens/sunshine-data,regardscitoyens/sunshine-data,regardscitoyens/sunshine-data,regardscitoyens/sunshine-data | Add script to count duplicated data | # -*- coding: utf-8 -*-
import pandas as pd
all_df = None
for filename in ["dentistes.refined.csv",
"infirmiers.refined.csv",
"medecins_exploitables.refined.csv",
"medecins_inexploitables.refined.csv",
"pharmaciens.refined.csv",
"tr... | <commit_before><commit_msg>Add script to count duplicated data<commit_after> | # -*- coding: utf-8 -*-
import pandas as pd
all_df = None
for filename in ["dentistes.refined.csv",
"infirmiers.refined.csv",
"medecins_exploitables.refined.csv",
"medecins_inexploitables.refined.csv",
"pharmaciens.refined.csv",
"tr... | Add script to count duplicated data# -*- coding: utf-8 -*-
import pandas as pd
all_df = None
for filename in ["dentistes.refined.csv",
"infirmiers.refined.csv",
"medecins_exploitables.refined.csv",
"medecins_inexploitables.refined.csv",
"pharmaciens... | <commit_before><commit_msg>Add script to count duplicated data<commit_after># -*- coding: utf-8 -*-
import pandas as pd
all_df = None
for filename in ["dentistes.refined.csv",
"infirmiers.refined.csv",
"medecins_exploitables.refined.csv",
"medecins_inexploitables.re... | |
a71314962f61dceeda807d3bfa93abc2a2822eda | tests/py/test_transactional_emails.py | tests/py/test_transactional_emails.py | import mock
from gratipay.models.participant import Participant
from gratipay.models.account_elsewhere import AccountElsewhere
from gratipay.testing import Harness
from gratipay.testing.emails import get_last_email
class TestTransactionalEmails(Harness):
@mock.patch.object(Participant._mailer.messages, 'send')
... | Add tests for transactional emails | Add tests for transactional emails
| Python | mit | gratipay/gratipay.com,studio666/gratipay.com,studio666/gratipay.com,studio666/gratipay.com,eXcomm/gratipay.com,gratipay/gratipay.com,mccolgst/www.gittip.com,eXcomm/gratipay.com,mccolgst/www.gittip.com,eXcomm/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,mccolgst/www.gittip.com,studio666/gratipay.com,eXcomm/g... | Add tests for transactional emails | import mock
from gratipay.models.participant import Participant
from gratipay.models.account_elsewhere import AccountElsewhere
from gratipay.testing import Harness
from gratipay.testing.emails import get_last_email
class TestTransactionalEmails(Harness):
@mock.patch.object(Participant._mailer.messages, 'send')
... | <commit_before><commit_msg>Add tests for transactional emails<commit_after> | import mock
from gratipay.models.participant import Participant
from gratipay.models.account_elsewhere import AccountElsewhere
from gratipay.testing import Harness
from gratipay.testing.emails import get_last_email
class TestTransactionalEmails(Harness):
@mock.patch.object(Participant._mailer.messages, 'send')
... | Add tests for transactional emailsimport mock
from gratipay.models.participant import Participant
from gratipay.models.account_elsewhere import AccountElsewhere
from gratipay.testing import Harness
from gratipay.testing.emails import get_last_email
class TestTransactionalEmails(Harness):
@mock.patch.object(Parti... | <commit_before><commit_msg>Add tests for transactional emails<commit_after>import mock
from gratipay.models.participant import Participant
from gratipay.models.account_elsewhere import AccountElsewhere
from gratipay.testing import Harness
from gratipay.testing.emails import get_last_email
class TestTransactionalEmail... | |
b2f95de3e88f785171666dafd442e32ca1ac47eb | djtweetar/bin/send.py | djtweetar/bin/send.py | from django.contrib.contenttypes.models import ContentType
from django.conf import settings
from socialregistration.models import TwitterProfile
from weathertracking.models import WeatherStation
from tweetar import *
def send_reports():
profiles = TwitterProfile.objects.filter(content_type=ContentType.objects.get_... | Add a script to go through all social credentials available and post the weather. This script will need to be cron'ed. | Add a script to go through all social credentials available and post the weather. This script will need to be cron'ed.
| Python | bsd-3-clause | adamfast/django-tweetar | Add a script to go through all social credentials available and post the weather. This script will need to be cron'ed. | from django.contrib.contenttypes.models import ContentType
from django.conf import settings
from socialregistration.models import TwitterProfile
from weathertracking.models import WeatherStation
from tweetar import *
def send_reports():
profiles = TwitterProfile.objects.filter(content_type=ContentType.objects.get_... | <commit_before><commit_msg>Add a script to go through all social credentials available and post the weather. This script will need to be cron'ed.<commit_after> | from django.contrib.contenttypes.models import ContentType
from django.conf import settings
from socialregistration.models import TwitterProfile
from weathertracking.models import WeatherStation
from tweetar import *
def send_reports():
profiles = TwitterProfile.objects.filter(content_type=ContentType.objects.get_... | Add a script to go through all social credentials available and post the weather. This script will need to be cron'ed.from django.contrib.contenttypes.models import ContentType
from django.conf import settings
from socialregistration.models import TwitterProfile
from weathertracking.models import WeatherStation
from tw... | <commit_before><commit_msg>Add a script to go through all social credentials available and post the weather. This script will need to be cron'ed.<commit_after>from django.contrib.contenttypes.models import ContentType
from django.conf import settings
from socialregistration.models import TwitterProfile
from weathertrac... | |
5e849bfb766a79c688645175e90c1412ed516bf2 | lms/djangoapps/django_comment_client/management/commands/get_discussion_link.py | lms/djangoapps/django_comment_client/management/commands/get_discussion_link.py | from django.core.management.base import BaseCommand, CommandError
from courseware.courses import get_course
class Command(BaseCommand):
args = "<course_id>"
def handle(self, *args, **options):
if not args:
raise CommandError("Course id not specified")
if len(args) > 1:
... | Add command to get discussion_link for a course | Add command to get discussion_link for a course
This will be used to detect courses that are linking to Stack Exchange
sites so we can handle them specially when generating data dumps.
| Python | agpl-3.0 | hmcmooc/muddx-platform,jbzdak/edx-platform,chauhanhardik/populo,abdoosh00/edraak,kmoocdev2/edx-platform,gymnasium/edx-platform,cpennington/edx-platform,shashank971/edx-platform,EDUlib/edx-platform,motion2015/edx-platform,cpennington/edx-platform,devs1991/test_edx_docmode,teltek/edx-platform,doismellburning/edx-platform... | Add command to get discussion_link for a course
This will be used to detect courses that are linking to Stack Exchange
sites so we can handle them specially when generating data dumps. | from django.core.management.base import BaseCommand, CommandError
from courseware.courses import get_course
class Command(BaseCommand):
args = "<course_id>"
def handle(self, *args, **options):
if not args:
raise CommandError("Course id not specified")
if len(args) > 1:
... | <commit_before><commit_msg>Add command to get discussion_link for a course
This will be used to detect courses that are linking to Stack Exchange
sites so we can handle them specially when generating data dumps.<commit_after> | from django.core.management.base import BaseCommand, CommandError
from courseware.courses import get_course
class Command(BaseCommand):
args = "<course_id>"
def handle(self, *args, **options):
if not args:
raise CommandError("Course id not specified")
if len(args) > 1:
... | Add command to get discussion_link for a course
This will be used to detect courses that are linking to Stack Exchange
sites so we can handle them specially when generating data dumps.from django.core.management.base import BaseCommand, CommandError
from courseware.courses import get_course
class Command(BaseComman... | <commit_before><commit_msg>Add command to get discussion_link for a course
This will be used to detect courses that are linking to Stack Exchange
sites so we can handle them specially when generating data dumps.<commit_after>from django.core.management.base import BaseCommand, CommandError
from courseware.courses imp... | |
2420373ccdf99bc0019c7c9a09b3b3b8b6952c1b | utils/summary_downloader.py | utils/summary_downloader.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class SummaryDownloader():
# base url for official schedule json page
SCHEDULE_URL_BASE = "http://statsapi.web.nhl.com/api/v1/schedule"
# url template for official json gamefeed page
JSON_GAME_FEED_URL_TEMPLATE = (
"http://statsapi.web.nhl.com/ap... | Add stub for summary downloader | Add stub for summary downloader
| Python | mit | leaffan/pynhldb | Add stub for summary downloader | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class SummaryDownloader():
# base url for official schedule json page
SCHEDULE_URL_BASE = "http://statsapi.web.nhl.com/api/v1/schedule"
# url template for official json gamefeed page
JSON_GAME_FEED_URL_TEMPLATE = (
"http://statsapi.web.nhl.com/ap... | <commit_before><commit_msg>Add stub for summary downloader<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class SummaryDownloader():
# base url for official schedule json page
SCHEDULE_URL_BASE = "http://statsapi.web.nhl.com/api/v1/schedule"
# url template for official json gamefeed page
JSON_GAME_FEED_URL_TEMPLATE = (
"http://statsapi.web.nhl.com/ap... | Add stub for summary downloader#!/usr/bin/env python
# -*- coding: utf-8 -*-
class SummaryDownloader():
# base url for official schedule json page
SCHEDULE_URL_BASE = "http://statsapi.web.nhl.com/api/v1/schedule"
# url template for official json gamefeed page
JSON_GAME_FEED_URL_TEMPLATE = (
... | <commit_before><commit_msg>Add stub for summary downloader<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
class SummaryDownloader():
# base url for official schedule json page
SCHEDULE_URL_BASE = "http://statsapi.web.nhl.com/api/v1/schedule"
# url template for official json gamefeed page
... | |
78fefe27f9c5e77a3910a100637332a249a9d90f | IrrduinoServer/irrduinoserver/handlers/reportshandler.py | IrrduinoServer/irrduinoserver/handlers/reportshandler.py | # Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | Store info about zone runs | Store info about zone runs
| Python | apache-2.0 | jesuscorral/irrduino,rosope/irrduino,jesuscorral/irrduino,jecrespo/jecrespom-irrduino,angelmorinigo/irrduino,nlrivera/nickrivera12-test,Thibos/irrduino,angelmorinigo/irrduino,google/irrduino,jesuscorral/irrduino,jecrespo/jecrespom-irrduino,jesuscorral/irrduino,nlrivera/nickrivera12-test,Thibos/irrduino,nlrivera/nickriv... | Store info about zone runs | # Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | <commit_before><commit_msg>Store info about zone runs<commit_after> | # Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | Store info about zone runs# Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | <commit_before><commit_msg>Store info about zone runs<commit_after># Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | |
1299fde67d5ea3d210eff9e164db7d4c02b40099 | alembic/versions/430dc4ed6dd6_add_shopping_categories.py | alembic/versions/430dc4ed6dd6_add_shopping_categories.py | """Add shopping categories
Revision ID: 430dc4ed6dd6
Revises: 3a1dddd0c0f8
Create Date: 2014-12-24 09:55:10.993854
"""
# revision identifiers, used by Alembic.
revision = '430dc4ed6dd6'
down_revision = '3a1dddd0c0f8'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table
def upgrade():
... | Add shopping categories to the database | Add shopping categories to the database
| Python | mit | jlutz777/FreeStore,jlutz777/FreeStore,jlutz777/FreeStore | Add shopping categories to the database | """Add shopping categories
Revision ID: 430dc4ed6dd6
Revises: 3a1dddd0c0f8
Create Date: 2014-12-24 09:55:10.993854
"""
# revision identifiers, used by Alembic.
revision = '430dc4ed6dd6'
down_revision = '3a1dddd0c0f8'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table
def upgrade():
... | <commit_before><commit_msg>Add shopping categories to the database<commit_after> | """Add shopping categories
Revision ID: 430dc4ed6dd6
Revises: 3a1dddd0c0f8
Create Date: 2014-12-24 09:55:10.993854
"""
# revision identifiers, used by Alembic.
revision = '430dc4ed6dd6'
down_revision = '3a1dddd0c0f8'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table
def upgrade():
... | Add shopping categories to the database"""Add shopping categories
Revision ID: 430dc4ed6dd6
Revises: 3a1dddd0c0f8
Create Date: 2014-12-24 09:55:10.993854
"""
# revision identifiers, used by Alembic.
revision = '430dc4ed6dd6'
down_revision = '3a1dddd0c0f8'
from alembic import op
import sqlalchemy as sa
from sqlalche... | <commit_before><commit_msg>Add shopping categories to the database<commit_after>"""Add shopping categories
Revision ID: 430dc4ed6dd6
Revises: 3a1dddd0c0f8
Create Date: 2014-12-24 09:55:10.993854
"""
# revision identifiers, used by Alembic.
revision = '430dc4ed6dd6'
down_revision = '3a1dddd0c0f8'
from alembic import... | |
1bb5bb76489acd65d61415b9ce82bbb35dc53de3 | src/ggrc/migrations/versions/20150520103539_b0c3361797a_migrate_control_sections_to_.py | src/ggrc/migrations/versions/20150520103539_b0c3361797a_migrate_control_sections_to_.py | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
"""Migrate control_sections to relationships
Revision ID: b0c3361797a
Revises: ... | Add control_sections to relationships migration | Add control_sections to relationships migration
| Python | apache-2.0 | andrei-karalionak/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,kr41/ggrc-core,NejcZupec/ggrc-core,josthkko/ggrc-core,jmakov/ggrc-core,AleksNeStu/ggrc-core,prasannav7/ggrc-core,hyperNURb/ggrc-core,AleksNeStu/ggrc-core,prasannav7/ggrc-core,jmakov/ggrc-core,josthkko/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/ggrc-co... | Add control_sections to relationships migration | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
"""Migrate control_sections to relationships
Revision ID: b0c3361797a
Revises: ... | <commit_before><commit_msg>Add control_sections to relationships migration<commit_after> | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
"""Migrate control_sections to relationships
Revision ID: b0c3361797a
Revises: ... | Add control_sections to relationships migration# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
"""Migrate control_sections to re... | <commit_before><commit_msg>Add control_sections to relationships migration<commit_after># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocityla... | |
d3dbfdcdcab05aca5035b8dbeb1c73c2885ac9cd | DateThumbnails.py | DateThumbnails.py | '''Make a jpg images with thumbnails and date information for all files in directory
To-Do: Currently it will always make 5 * 3 thumbnails - need to calc this number
use argparse
add docs
add setup.py
'''
import os
from glob import glob
import exifread
import PIL
import matplotlib.pyplot as plt
... | Add script to generate thumbnaisl with data info fomr eXIF metadata | Add script to generate thumbnaisl with data info fomr eXIF metadata
| Python | mit | hamogu/Photos | Add script to generate thumbnaisl with data info fomr eXIF metadata | '''Make a jpg images with thumbnails and date information for all files in directory
To-Do: Currently it will always make 5 * 3 thumbnails - need to calc this number
use argparse
add docs
add setup.py
'''
import os
from glob import glob
import exifread
import PIL
import matplotlib.pyplot as plt
... | <commit_before><commit_msg>Add script to generate thumbnaisl with data info fomr eXIF metadata<commit_after> | '''Make a jpg images with thumbnails and date information for all files in directory
To-Do: Currently it will always make 5 * 3 thumbnails - need to calc this number
use argparse
add docs
add setup.py
'''
import os
from glob import glob
import exifread
import PIL
import matplotlib.pyplot as plt
... | Add script to generate thumbnaisl with data info fomr eXIF metadata'''Make a jpg images with thumbnails and date information for all files in directory
To-Do: Currently it will always make 5 * 3 thumbnails - need to calc this number
use argparse
add docs
add setup.py
'''
import os
from glob impor... | <commit_before><commit_msg>Add script to generate thumbnaisl with data info fomr eXIF metadata<commit_after>'''Make a jpg images with thumbnails and date information for all files in directory
To-Do: Currently it will always make 5 * 3 thumbnails - need to calc this number
use argparse
add docs
ad... | |
14cb4e5ff560f1122944323ce4fefd66c85f26e6 | Python/59_SpiralMatrixII.py | Python/59_SpiralMatrixII.py | class Solution(object):
def generateMatrix(self, n):
"""
:type matrix: List[List[int]]
:rtype: List[int]
"""
if n <= 0:
return []
if n == 1:
return [[1]]
#initialize matrix
matrix = [[0 for x in range(n)] for x in range(n)]
... | Add solution for 59 Spiral Matrix II | Add solution for 59 Spiral Matrix II
| Python | mit | comicxmz001/LeetCode,comicxmz001/LeetCode | Add solution for 59 Spiral Matrix II | class Solution(object):
def generateMatrix(self, n):
"""
:type matrix: List[List[int]]
:rtype: List[int]
"""
if n <= 0:
return []
if n == 1:
return [[1]]
#initialize matrix
matrix = [[0 for x in range(n)] for x in range(n)]
... | <commit_before><commit_msg>Add solution for 59 Spiral Matrix II<commit_after> | class Solution(object):
def generateMatrix(self, n):
"""
:type matrix: List[List[int]]
:rtype: List[int]
"""
if n <= 0:
return []
if n == 1:
return [[1]]
#initialize matrix
matrix = [[0 for x in range(n)] for x in range(n)]
... | Add solution for 59 Spiral Matrix IIclass Solution(object):
def generateMatrix(self, n):
"""
:type matrix: List[List[int]]
:rtype: List[int]
"""
if n <= 0:
return []
if n == 1:
return [[1]]
#initialize matrix
matrix = [[0 for ... | <commit_before><commit_msg>Add solution for 59 Spiral Matrix II<commit_after>class Solution(object):
def generateMatrix(self, n):
"""
:type matrix: List[List[int]]
:rtype: List[int]
"""
if n <= 0:
return []
if n == 1:
return [[1]]
#init... | |
475c968a16809a386a1249de396d0574623b682d | debates2txt.py | debates2txt.py | #!/usr/bin/env python
# -.*- coding: utf-8 -.*-
"""Script to save text in xml file(s) to text file(s).
Usage: debates2txt.py <xml-file or directory containing xml files>
2014-12-15 j.vanderzwaan@esciencecenter.nl
"""
import argparse
import xml.etree.ElementTree as ET
import re
import os
import codecs
if __name__ ==... | Add script to generate text file from the debates data (xml) | Add script to generate text file from the debates data (xml)
Upon request by Inger Leemans. Adjusted the debates2csv script to save
all text in the xml file(s) to txt file(s).
| Python | apache-2.0 | NLeSC/embodied-emotions-scripts,NLeSC/embodied-emotions-scripts | Add script to generate text file from the debates data (xml)
Upon request by Inger Leemans. Adjusted the debates2csv script to save
all text in the xml file(s) to txt file(s). | #!/usr/bin/env python
# -.*- coding: utf-8 -.*-
"""Script to save text in xml file(s) to text file(s).
Usage: debates2txt.py <xml-file or directory containing xml files>
2014-12-15 j.vanderzwaan@esciencecenter.nl
"""
import argparse
import xml.etree.ElementTree as ET
import re
import os
import codecs
if __name__ ==... | <commit_before><commit_msg>Add script to generate text file from the debates data (xml)
Upon request by Inger Leemans. Adjusted the debates2csv script to save
all text in the xml file(s) to txt file(s).<commit_after> | #!/usr/bin/env python
# -.*- coding: utf-8 -.*-
"""Script to save text in xml file(s) to text file(s).
Usage: debates2txt.py <xml-file or directory containing xml files>
2014-12-15 j.vanderzwaan@esciencecenter.nl
"""
import argparse
import xml.etree.ElementTree as ET
import re
import os
import codecs
if __name__ ==... | Add script to generate text file from the debates data (xml)
Upon request by Inger Leemans. Adjusted the debates2csv script to save
all text in the xml file(s) to txt file(s).#!/usr/bin/env python
# -.*- coding: utf-8 -.*-
"""Script to save text in xml file(s) to text file(s).
Usage: debates2txt.py <xml-file or direc... | <commit_before><commit_msg>Add script to generate text file from the debates data (xml)
Upon request by Inger Leemans. Adjusted the debates2csv script to save
all text in the xml file(s) to txt file(s).<commit_after>#!/usr/bin/env python
# -.*- coding: utf-8 -.*-
"""Script to save text in xml file(s) to text file(s).
... | |
cc639eea9e4c4934c6aac9cd04b4a09da60f1403 | custom/enikshay/management/commands/check_voucher_cases.py | custom/enikshay/management/commands/check_voucher_cases.py | import csv
from django.core.management.base import BaseCommand
from corehq.apps.users.models import CommCareUser
from corehq.form_processor.interfaces.dbaccessors import CaseAccessors
from corehq.util.log import with_progress_bar
from custom.enikshay.case_utils import get_person_case_from_voucher, CASE_TYPE_VOUCHER
f... | Add cmd to check on the status of voucher cases | Add cmd to check on the status of voucher cases
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | Add cmd to check on the status of voucher cases | import csv
from django.core.management.base import BaseCommand
from corehq.apps.users.models import CommCareUser
from corehq.form_processor.interfaces.dbaccessors import CaseAccessors
from corehq.util.log import with_progress_bar
from custom.enikshay.case_utils import get_person_case_from_voucher, CASE_TYPE_VOUCHER
f... | <commit_before><commit_msg>Add cmd to check on the status of voucher cases<commit_after> | import csv
from django.core.management.base import BaseCommand
from corehq.apps.users.models import CommCareUser
from corehq.form_processor.interfaces.dbaccessors import CaseAccessors
from corehq.util.log import with_progress_bar
from custom.enikshay.case_utils import get_person_case_from_voucher, CASE_TYPE_VOUCHER
f... | Add cmd to check on the status of voucher casesimport csv
from django.core.management.base import BaseCommand
from corehq.apps.users.models import CommCareUser
from corehq.form_processor.interfaces.dbaccessors import CaseAccessors
from corehq.util.log import with_progress_bar
from custom.enikshay.case_utils import ge... | <commit_before><commit_msg>Add cmd to check on the status of voucher cases<commit_after>import csv
from django.core.management.base import BaseCommand
from corehq.apps.users.models import CommCareUser
from corehq.form_processor.interfaces.dbaccessors import CaseAccessors
from corehq.util.log import with_progress_bar
... | |
18f43e38df3e21e3625351f531fc1d7d5e017621 | demo_propagation.py | demo_propagation.py | # Copyright (c) 2017, CNRS-LAAS
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the f... | Add python script that plots the results of a fire propagation | Add python script that plots the results of a fire propagation
| Python | bsd-2-clause | fire-rs-laas/fire-rs-saop,fire-rs-laas/fire-rs-saop,fire-rs-laas/fire-rs-saop,fire-rs-laas/fire-rs-saop | Add python script that plots the results of a fire propagation | # Copyright (c) 2017, CNRS-LAAS
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the f... | <commit_before><commit_msg>Add python script that plots the results of a fire propagation<commit_after> | # Copyright (c) 2017, CNRS-LAAS
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the f... | Add python script that plots the results of a fire propagation# Copyright (c) 2017, CNRS-LAAS
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the ... | <commit_before><commit_msg>Add python script that plots the results of a fire propagation<commit_after># Copyright (c) 2017, CNRS-LAAS
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redist... | |
38fcdaa72d666c43975d53f99792b339d5b9747d | dockci/migrations/0007.py | dockci/migrations/0007.py | """
Fix artifacts after rename from build models to job models
"""
import py.error
import py.path
import yaml
from yaml import safe_load as yaml_load
jobs_path = py.path.local().join('data', 'jobs')
for project_path in jobs_path.listdir():
build_files = project_path.listdir(
lambda filename: filename.fn... | Migrate build -> job in dockci job config meta | Migrate build -> job in dockci job config meta
| Python | isc | RickyCook/DockCI,sprucedev/DockCI-Agent,RickyCook/DockCI,sprucedev/DockCI,sprucedev/DockCI-Agent,sprucedev/DockCI,RickyCook/DockCI,sprucedev/DockCI,RickyCook/DockCI,sprucedev/DockCI | Migrate build -> job in dockci job config meta | """
Fix artifacts after rename from build models to job models
"""
import py.error
import py.path
import yaml
from yaml import safe_load as yaml_load
jobs_path = py.path.local().join('data', 'jobs')
for project_path in jobs_path.listdir():
build_files = project_path.listdir(
lambda filename: filename.fn... | <commit_before><commit_msg>Migrate build -> job in dockci job config meta<commit_after> | """
Fix artifacts after rename from build models to job models
"""
import py.error
import py.path
import yaml
from yaml import safe_load as yaml_load
jobs_path = py.path.local().join('data', 'jobs')
for project_path in jobs_path.listdir():
build_files = project_path.listdir(
lambda filename: filename.fn... | Migrate build -> job in dockci job config meta"""
Fix artifacts after rename from build models to job models
"""
import py.error
import py.path
import yaml
from yaml import safe_load as yaml_load
jobs_path = py.path.local().join('data', 'jobs')
for project_path in jobs_path.listdir():
build_files = project_path... | <commit_before><commit_msg>Migrate build -> job in dockci job config meta<commit_after>"""
Fix artifacts after rename from build models to job models
"""
import py.error
import py.path
import yaml
from yaml import safe_load as yaml_load
jobs_path = py.path.local().join('data', 'jobs')
for project_path in jobs_path.... | |
76d47df7fdb9af30437b2cad8f2800e907b60fd9 | tests/test_injections.py | tests/test_injections.py | """Dependency injector container unit tests."""
import unittest2 as unittest
from dependency_injector import injections
from dependency_injector import providers
class PositionalInjectionTests(unittest.TestCase):
def test_init_with_kwargs(self):
injections.PositionalInjection(value=1)
def test_isi... | Add few tests for injections | Add few tests for injections
| Python | bsd-3-clause | rmk135/dependency_injector,rmk135/objects,ets-labs/dependency_injector,ets-labs/python-dependency-injector | Add few tests for injections | """Dependency injector container unit tests."""
import unittest2 as unittest
from dependency_injector import injections
from dependency_injector import providers
class PositionalInjectionTests(unittest.TestCase):
def test_init_with_kwargs(self):
injections.PositionalInjection(value=1)
def test_isi... | <commit_before><commit_msg>Add few tests for injections<commit_after> | """Dependency injector container unit tests."""
import unittest2 as unittest
from dependency_injector import injections
from dependency_injector import providers
class PositionalInjectionTests(unittest.TestCase):
def test_init_with_kwargs(self):
injections.PositionalInjection(value=1)
def test_isi... | Add few tests for injections"""Dependency injector container unit tests."""
import unittest2 as unittest
from dependency_injector import injections
from dependency_injector import providers
class PositionalInjectionTests(unittest.TestCase):
def test_init_with_kwargs(self):
injections.PositionalInjectio... | <commit_before><commit_msg>Add few tests for injections<commit_after>"""Dependency injector container unit tests."""
import unittest2 as unittest
from dependency_injector import injections
from dependency_injector import providers
class PositionalInjectionTests(unittest.TestCase):
def test_init_with_kwargs(sel... | |
d659a53036bd39b66e92e89e7c40572d111dcd53 | tests/test_invocation.py | tests/test_invocation.py | import sys
import subprocess
import re
def test_runpy_invoke():
"""
Ensure honcho can also be invoked using runpy (python -m)
"""
cmd = [sys.executable, '-m', 'honcho', 'version']
output = subprocess.check_output(cmd, universal_newlines=True)
assert re.match(r'honcho \d\.\d\.\d.*\n', output)
| Add test to capture than honcho can invoke under runpy. | Add test to capture than honcho can invoke under runpy.
| Python | mit | nickstenning/honcho,nickstenning/honcho | Add test to capture than honcho can invoke under runpy. | import sys
import subprocess
import re
def test_runpy_invoke():
"""
Ensure honcho can also be invoked using runpy (python -m)
"""
cmd = [sys.executable, '-m', 'honcho', 'version']
output = subprocess.check_output(cmd, universal_newlines=True)
assert re.match(r'honcho \d\.\d\.\d.*\n', output)
| <commit_before><commit_msg>Add test to capture than honcho can invoke under runpy.<commit_after> | import sys
import subprocess
import re
def test_runpy_invoke():
"""
Ensure honcho can also be invoked using runpy (python -m)
"""
cmd = [sys.executable, '-m', 'honcho', 'version']
output = subprocess.check_output(cmd, universal_newlines=True)
assert re.match(r'honcho \d\.\d\.\d.*\n', output)
| Add test to capture than honcho can invoke under runpy.import sys
import subprocess
import re
def test_runpy_invoke():
"""
Ensure honcho can also be invoked using runpy (python -m)
"""
cmd = [sys.executable, '-m', 'honcho', 'version']
output = subprocess.check_output(cmd, universal_newlines=True)
... | <commit_before><commit_msg>Add test to capture than honcho can invoke under runpy.<commit_after>import sys
import subprocess
import re
def test_runpy_invoke():
"""
Ensure honcho can also be invoked using runpy (python -m)
"""
cmd = [sys.executable, '-m', 'honcho', 'version']
output = subprocess.ch... | |
f65bfcef8da9537a69db8ea7e24fa11dbb630100 | tests/test_validation.py | tests/test_validation.py | """Test the validation module"""
from pytest import mark
from json import loads
from gobble.collection import Collection
from gobble.config import EXAMPLES_DIR
from gobble.validation import Validator
collection = Collection(EXAMPLES_DIR, flavour='fiscal')
packages = collection.packages
is_valid = map(lambda path: '... | Write the tests for the Validation class. | Write the tests for the Validation class.
| Python | mit | openspending/gobble | Write the tests for the Validation class. | """Test the validation module"""
from pytest import mark
from json import loads
from gobble.collection import Collection
from gobble.config import EXAMPLES_DIR
from gobble.validation import Validator
collection = Collection(EXAMPLES_DIR, flavour='fiscal')
packages = collection.packages
is_valid = map(lambda path: '... | <commit_before><commit_msg>Write the tests for the Validation class.<commit_after> | """Test the validation module"""
from pytest import mark
from json import loads
from gobble.collection import Collection
from gobble.config import EXAMPLES_DIR
from gobble.validation import Validator
collection = Collection(EXAMPLES_DIR, flavour='fiscal')
packages = collection.packages
is_valid = map(lambda path: '... | Write the tests for the Validation class."""Test the validation module"""
from pytest import mark
from json import loads
from gobble.collection import Collection
from gobble.config import EXAMPLES_DIR
from gobble.validation import Validator
collection = Collection(EXAMPLES_DIR, flavour='fiscal')
packages = collecti... | <commit_before><commit_msg>Write the tests for the Validation class.<commit_after>"""Test the validation module"""
from pytest import mark
from json import loads
from gobble.collection import Collection
from gobble.config import EXAMPLES_DIR
from gobble.validation import Validator
collection = Collection(EXAMPLES_D... | |
d509596cc6990c18fcf77488f22751f77b5e38ef | tests/tests/test_init.py | tests/tests/test_init.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest import TestCase
import channels
class ChannelsModuleTestCase(TestCase):
def test_load_module(self):
import channels.backends.slack
name = "channels.backends.slack"
module = channels._load_module(name)
se... | Add some test for channels module | Add some test for channels module
| Python | mit | ymyzk/django-channels,ymyzk/kawasemi | Add some test for channels module | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest import TestCase
import channels
class ChannelsModuleTestCase(TestCase):
def test_load_module(self):
import channels.backends.slack
name = "channels.backends.slack"
module = channels._load_module(name)
se... | <commit_before><commit_msg>Add some test for channels module<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest import TestCase
import channels
class ChannelsModuleTestCase(TestCase):
def test_load_module(self):
import channels.backends.slack
name = "channels.backends.slack"
module = channels._load_module(name)
se... | Add some test for channels module# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest import TestCase
import channels
class ChannelsModuleTestCase(TestCase):
def test_load_module(self):
import channels.backends.slack
name = "channels.backends.slack"
module = chann... | <commit_before><commit_msg>Add some test for channels module<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest import TestCase
import channels
class ChannelsModuleTestCase(TestCase):
def test_load_module(self):
import channels.backends.slack
name = "channe... | |
b8c3faca98688507554d952e8eb0ee71ee205bd5 | ps3.py | ps3.py | """
Team Challenge: Predicting Turn Types
Authors: Tong, Will, and Ryan
"""
import os
import sys
import csv
import argparse
def read_csv(path):
output = []
with open(path, 'rb') as f:
reader = csv.reader(f, delimiter=",")
for row in reader:
output.append(row)
return output
def ... | Read in the directory of CSVs | Read in the directory of CSVs
| Python | unlicense | dropofwill/nlp-predicting-turn-types | Read in the directory of CSVs | """
Team Challenge: Predicting Turn Types
Authors: Tong, Will, and Ryan
"""
import os
import sys
import csv
import argparse
def read_csv(path):
output = []
with open(path, 'rb') as f:
reader = csv.reader(f, delimiter=",")
for row in reader:
output.append(row)
return output
def ... | <commit_before><commit_msg>Read in the directory of CSVs<commit_after> | """
Team Challenge: Predicting Turn Types
Authors: Tong, Will, and Ryan
"""
import os
import sys
import csv
import argparse
def read_csv(path):
output = []
with open(path, 'rb') as f:
reader = csv.reader(f, delimiter=",")
for row in reader:
output.append(row)
return output
def ... | Read in the directory of CSVs"""
Team Challenge: Predicting Turn Types
Authors: Tong, Will, and Ryan
"""
import os
import sys
import csv
import argparse
def read_csv(path):
output = []
with open(path, 'rb') as f:
reader = csv.reader(f, delimiter=",")
for row in reader:
output.append... | <commit_before><commit_msg>Read in the directory of CSVs<commit_after>"""
Team Challenge: Predicting Turn Types
Authors: Tong, Will, and Ryan
"""
import os
import sys
import csv
import argparse
def read_csv(path):
output = []
with open(path, 'rb') as f:
reader = csv.reader(f, delimiter=",")
for... | |
3bf03b8fee78d6950b4e3cec875392a70b2d577f | grokapi/cli.py | grokapi/cli.py | # -*- coding: utf-8 -*-
from queries import Grok
def print_monthly_views(site, pages, year, month):
grok = Grok(site)
for page in pages:
result = grok.get_views_for_month(page, year, month)
print result['daily_views']
def main():
""" main script. """
from argparse import ArgumentPar... | Add commande-line interface for grokapi | Add commande-line interface for grokapi
Using an ArgumentParser
Closes #4
| Python | mit | Commonists/Grokapi | Add commande-line interface for grokapi
Using an ArgumentParser
Closes #4 | # -*- coding: utf-8 -*-
from queries import Grok
def print_monthly_views(site, pages, year, month):
grok = Grok(site)
for page in pages:
result = grok.get_views_for_month(page, year, month)
print result['daily_views']
def main():
""" main script. """
from argparse import ArgumentPar... | <commit_before><commit_msg>Add commande-line interface for grokapi
Using an ArgumentParser
Closes #4<commit_after> | # -*- coding: utf-8 -*-
from queries import Grok
def print_monthly_views(site, pages, year, month):
grok = Grok(site)
for page in pages:
result = grok.get_views_for_month(page, year, month)
print result['daily_views']
def main():
""" main script. """
from argparse import ArgumentPar... | Add commande-line interface for grokapi
Using an ArgumentParser
Closes #4# -*- coding: utf-8 -*-
from queries import Grok
def print_monthly_views(site, pages, year, month):
grok = Grok(site)
for page in pages:
result = grok.get_views_for_month(page, year, month)
print result['daily_views']
... | <commit_before><commit_msg>Add commande-line interface for grokapi
Using an ArgumentParser
Closes #4<commit_after># -*- coding: utf-8 -*-
from queries import Grok
def print_monthly_views(site, pages, year, month):
grok = Grok(site)
for page in pages:
result = grok.get_views_for_month(page, year, mo... | |
8ed003a193f721dc0f076171ee11e9ecbb4f6fed | run_story.py | run_story.py | #!/usr/bin/env python
import sys
import os.path
from zvm import zmachine
def usage():
print """Usage: %s <story file>
Run a Z-Machine story under ZVM.
""" % sys.argv[0]
sys.exit(1)
def main():
if len(sys.argv) != 2:
usage()
story_file = sys.argv[1]
if not os.path.isfile(story_file):
... | Implement a simple launcher for ZVM, to help test the machine. | Implement a simple launcher for ZVM, to help test the machine.
| Python | bsd-3-clause | sussman/zvm,sussman/zvm | Implement a simple launcher for ZVM, to help test the machine. | #!/usr/bin/env python
import sys
import os.path
from zvm import zmachine
def usage():
print """Usage: %s <story file>
Run a Z-Machine story under ZVM.
""" % sys.argv[0]
sys.exit(1)
def main():
if len(sys.argv) != 2:
usage()
story_file = sys.argv[1]
if not os.path.isfile(story_file):
... | <commit_before><commit_msg>Implement a simple launcher for ZVM, to help test the machine.<commit_after> | #!/usr/bin/env python
import sys
import os.path
from zvm import zmachine
def usage():
print """Usage: %s <story file>
Run a Z-Machine story under ZVM.
""" % sys.argv[0]
sys.exit(1)
def main():
if len(sys.argv) != 2:
usage()
story_file = sys.argv[1]
if not os.path.isfile(story_file):
... | Implement a simple launcher for ZVM, to help test the machine.#!/usr/bin/env python
import sys
import os.path
from zvm import zmachine
def usage():
print """Usage: %s <story file>
Run a Z-Machine story under ZVM.
""" % sys.argv[0]
sys.exit(1)
def main():
if len(sys.argv) != 2:
usage()
story_... | <commit_before><commit_msg>Implement a simple launcher for ZVM, to help test the machine.<commit_after>#!/usr/bin/env python
import sys
import os.path
from zvm import zmachine
def usage():
print """Usage: %s <story file>
Run a Z-Machine story under ZVM.
""" % sys.argv[0]
sys.exit(1)
def main():
if len(s... | |
083f28cf3af37864a6638ac4a0c1361f65094de2 | list_objects.py | list_objects.py | #!/usr/bin/env python2
import git
import sys
def main(args):
if len(args) != 1:
sys.stderr.write("Need path to the repo\n")
sys.exit(1)
repo = git.Repo(args[0], odbt=git.GitCmdObjectDB)
vmap = set()
i = 0
for c in repo.iter_commits('--all'):
traverse(c.tree, vmap)
... | Add a tool to list all large objects in the repo | Add a tool to list all large objects in the repo
| Python | mit | usovalx/bzr-export | Add a tool to list all large objects in the repo | #!/usr/bin/env python2
import git
import sys
def main(args):
if len(args) != 1:
sys.stderr.write("Need path to the repo\n")
sys.exit(1)
repo = git.Repo(args[0], odbt=git.GitCmdObjectDB)
vmap = set()
i = 0
for c in repo.iter_commits('--all'):
traverse(c.tree, vmap)
... | <commit_before><commit_msg>Add a tool to list all large objects in the repo<commit_after> | #!/usr/bin/env python2
import git
import sys
def main(args):
if len(args) != 1:
sys.stderr.write("Need path to the repo\n")
sys.exit(1)
repo = git.Repo(args[0], odbt=git.GitCmdObjectDB)
vmap = set()
i = 0
for c in repo.iter_commits('--all'):
traverse(c.tree, vmap)
... | Add a tool to list all large objects in the repo#!/usr/bin/env python2
import git
import sys
def main(args):
if len(args) != 1:
sys.stderr.write("Need path to the repo\n")
sys.exit(1)
repo = git.Repo(args[0], odbt=git.GitCmdObjectDB)
vmap = set()
i = 0
for c in repo.iter_commits('... | <commit_before><commit_msg>Add a tool to list all large objects in the repo<commit_after>#!/usr/bin/env python2
import git
import sys
def main(args):
if len(args) != 1:
sys.stderr.write("Need path to the repo\n")
sys.exit(1)
repo = git.Repo(args[0], odbt=git.GitCmdObjectDB)
vmap = set()
... | |
138a84d07e050a23989eedfe414fcbb29a7266ab | mygpo/users/migrations/0015_case_insensitive_username.py | mygpo/users/migrations/0015_case_insensitive_username.py | from django.db import migrations
class Migration(migrations.Migration):
""" Create a unique case-insensitive index on the username column """
dependencies = [
('auth', '0001_initial'),
('users', '0014_django_uuidfield'),
]
operations = [
migrations.RunSQL(
'CREATE... | Add case-insensitive index for username | Add case-insensitive index for username
| Python | agpl-3.0 | gpodder/mygpo,gpodder/mygpo,gpodder/mygpo,gpodder/mygpo | Add case-insensitive index for username | from django.db import migrations
class Migration(migrations.Migration):
""" Create a unique case-insensitive index on the username column """
dependencies = [
('auth', '0001_initial'),
('users', '0014_django_uuidfield'),
]
operations = [
migrations.RunSQL(
'CREATE... | <commit_before><commit_msg>Add case-insensitive index for username<commit_after> | from django.db import migrations
class Migration(migrations.Migration):
""" Create a unique case-insensitive index on the username column """
dependencies = [
('auth', '0001_initial'),
('users', '0014_django_uuidfield'),
]
operations = [
migrations.RunSQL(
'CREATE... | Add case-insensitive index for usernamefrom django.db import migrations
class Migration(migrations.Migration):
""" Create a unique case-insensitive index on the username column """
dependencies = [
('auth', '0001_initial'),
('users', '0014_django_uuidfield'),
]
operations = [
... | <commit_before><commit_msg>Add case-insensitive index for username<commit_after>from django.db import migrations
class Migration(migrations.Migration):
""" Create a unique case-insensitive index on the username column """
dependencies = [
('auth', '0001_initial'),
('users', '0014_django_uuidf... | |
fd1e1cf80d8ca0bbbf9f17951c54615c39bde80d | test/test_extrusion_entities.py | test/test_extrusion_entities.py | # -*- coding: utf-8 -*-
"""Create several entities by extrusion, check that the expected
sub-entities are returned and the resulting mesh is correct.
"""
import pygmsh
import numpy as np
def test():
kernels = [pygmsh.built_in, pygmsh.opencascade]
for kernel in kernels:
geom = kernel.Geometry()
... | Add extrusion test for points and lines | Add extrusion test for points and lines
| Python | bsd-3-clause | nschloe/python4gmsh | Add extrusion test for points and lines | # -*- coding: utf-8 -*-
"""Create several entities by extrusion, check that the expected
sub-entities are returned and the resulting mesh is correct.
"""
import pygmsh
import numpy as np
def test():
kernels = [pygmsh.built_in, pygmsh.opencascade]
for kernel in kernels:
geom = kernel.Geometry()
... | <commit_before><commit_msg>Add extrusion test for points and lines<commit_after> | # -*- coding: utf-8 -*-
"""Create several entities by extrusion, check that the expected
sub-entities are returned and the resulting mesh is correct.
"""
import pygmsh
import numpy as np
def test():
kernels = [pygmsh.built_in, pygmsh.opencascade]
for kernel in kernels:
geom = kernel.Geometry()
... | Add extrusion test for points and lines# -*- coding: utf-8 -*-
"""Create several entities by extrusion, check that the expected
sub-entities are returned and the resulting mesh is correct.
"""
import pygmsh
import numpy as np
def test():
kernels = [pygmsh.built_in, pygmsh.opencascade]
for kernel in kernels:
... | <commit_before><commit_msg>Add extrusion test for points and lines<commit_after># -*- coding: utf-8 -*-
"""Create several entities by extrusion, check that the expected
sub-entities are returned and the resulting mesh is correct.
"""
import pygmsh
import numpy as np
def test():
kernels = [pygmsh.built_in, pygmsh.... | |
dd21cb62d08d5f293b04426afbdb256f386ee17f | test/ut/test_plugin_verbatim.py | test/ut/test_plugin_verbatim.py | #!/usr/bin/env python3
#-*- encoding: utf-8 -*-
import os, sys, tempfile, unittest
import lxml.etree as etree
ECMDS_INSTALL_DIR = os.path.normpath(os.path.join(
os.path.dirname(os.path.realpath(sys.argv[0])),
"..", ".."
))
sys.path.insert(1, ECMDS_INSTALL_DIR + os.sep + 'lib')
from net.ecromedos.error impor... | Add test for verbatim plugin | Add test for verbatim plugin
| Python | mit | tobijk/ecromedos,tobijk/ecromedos | Add test for verbatim plugin | #!/usr/bin/env python3
#-*- encoding: utf-8 -*-
import os, sys, tempfile, unittest
import lxml.etree as etree
ECMDS_INSTALL_DIR = os.path.normpath(os.path.join(
os.path.dirname(os.path.realpath(sys.argv[0])),
"..", ".."
))
sys.path.insert(1, ECMDS_INSTALL_DIR + os.sep + 'lib')
from net.ecromedos.error impor... | <commit_before><commit_msg>Add test for verbatim plugin<commit_after> | #!/usr/bin/env python3
#-*- encoding: utf-8 -*-
import os, sys, tempfile, unittest
import lxml.etree as etree
ECMDS_INSTALL_DIR = os.path.normpath(os.path.join(
os.path.dirname(os.path.realpath(sys.argv[0])),
"..", ".."
))
sys.path.insert(1, ECMDS_INSTALL_DIR + os.sep + 'lib')
from net.ecromedos.error impor... | Add test for verbatim plugin#!/usr/bin/env python3
#-*- encoding: utf-8 -*-
import os, sys, tempfile, unittest
import lxml.etree as etree
ECMDS_INSTALL_DIR = os.path.normpath(os.path.join(
os.path.dirname(os.path.realpath(sys.argv[0])),
"..", ".."
))
sys.path.insert(1, ECMDS_INSTALL_DIR + os.sep + 'lib')
fr... | <commit_before><commit_msg>Add test for verbatim plugin<commit_after>#!/usr/bin/env python3
#-*- encoding: utf-8 -*-
import os, sys, tempfile, unittest
import lxml.etree as etree
ECMDS_INSTALL_DIR = os.path.normpath(os.path.join(
os.path.dirname(os.path.realpath(sys.argv[0])),
"..", ".."
))
sys.path.insert(1... | |
c1cbdb300bd18b2d376f51f8ed368f2e166fa798 | gen/code.rs.py | gen/code.rs.py | import parser
def gen_header():
print "// This file was generated automatically."
print "// See the gen/ folder at the project root."
print
print "use std::fmt;"
print "use std::str;"
def gen_enum(codes):
print "#[derive(Clone, Copy, Debug, Eq, PartialEq)]"
print "pub enum Code {"
for ... | Add a generator for the Code enum | Add a generator for the Code enum
| Python | mit | celavy/irc,SBSTP/loirc,celavy/irc,SBSTP/loirc,SBSTP/loirc,celavy/irc | Add a generator for the Code enum | import parser
def gen_header():
print "// This file was generated automatically."
print "// See the gen/ folder at the project root."
print
print "use std::fmt;"
print "use std::str;"
def gen_enum(codes):
print "#[derive(Clone, Copy, Debug, Eq, PartialEq)]"
print "pub enum Code {"
for ... | <commit_before><commit_msg>Add a generator for the Code enum<commit_after> | import parser
def gen_header():
print "// This file was generated automatically."
print "// See the gen/ folder at the project root."
print
print "use std::fmt;"
print "use std::str;"
def gen_enum(codes):
print "#[derive(Clone, Copy, Debug, Eq, PartialEq)]"
print "pub enum Code {"
for ... | Add a generator for the Code enumimport parser
def gen_header():
print "// This file was generated automatically."
print "// See the gen/ folder at the project root."
print
print "use std::fmt;"
print "use std::str;"
def gen_enum(codes):
print "#[derive(Clone, Copy, Debug, Eq, PartialEq)]"
... | <commit_before><commit_msg>Add a generator for the Code enum<commit_after>import parser
def gen_header():
print "// This file was generated automatically."
print "// See the gen/ folder at the project root."
print
print "use std::fmt;"
print "use std::str;"
def gen_enum(codes):
print "#[derive... | |
5b139fce10c1451e3d7df2f73fe63cebfd983fdb | host-test/host-sample.py | host-test/host-sample.py | #!/usr/local/bin/python
import sys
import struct
import json
def send(msg):
sys.stdout.write(struct.pack("=I", len(msg)))
sys.stdout.write(msg)
sys.stdout.flush()
def invalid_argument(msg):
send(json.dumps({'result': 'invalid_argument', 'message': msg}))
def fail(msg):
invalid_argument(msg)
... | Add a sample mock host implementation in Python | Add a sample mock host implementation in Python
| Python | lgpl-2.1 | cristiano-andrade/chrome-token-signing,metsma/chrome-token-signing,fabiorusso/chrome-token-signing,open-eid/chrome-token-signing,metsma/chrome-token-signing,open-eid/chrome-token-signing,cristiano-andrade/chrome-token-signing,open-eid/chrome-token-signing,fabiorusso/chrome-token-signing,metsma/chrome-token-signing,fabi... | Add a sample mock host implementation in Python | #!/usr/local/bin/python
import sys
import struct
import json
def send(msg):
sys.stdout.write(struct.pack("=I", len(msg)))
sys.stdout.write(msg)
sys.stdout.flush()
def invalid_argument(msg):
send(json.dumps({'result': 'invalid_argument', 'message': msg}))
def fail(msg):
invalid_argument(msg)
... | <commit_before><commit_msg>Add a sample mock host implementation in Python<commit_after> | #!/usr/local/bin/python
import sys
import struct
import json
def send(msg):
sys.stdout.write(struct.pack("=I", len(msg)))
sys.stdout.write(msg)
sys.stdout.flush()
def invalid_argument(msg):
send(json.dumps({'result': 'invalid_argument', 'message': msg}))
def fail(msg):
invalid_argument(msg)
... | Add a sample mock host implementation in Python#!/usr/local/bin/python
import sys
import struct
import json
def send(msg):
sys.stdout.write(struct.pack("=I", len(msg)))
sys.stdout.write(msg)
sys.stdout.flush()
def invalid_argument(msg):
send(json.dumps({'result': 'invalid_argument', 'message': msg}))... | <commit_before><commit_msg>Add a sample mock host implementation in Python<commit_after>#!/usr/local/bin/python
import sys
import struct
import json
def send(msg):
sys.stdout.write(struct.pack("=I", len(msg)))
sys.stdout.write(msg)
sys.stdout.flush()
def invalid_argument(msg):
send(json.dumps({'resul... | |
2b45fc6a3e1c5b98bceece7917de9699036b77d7 | hbmqtt/utils.py | hbmqtt/utils.py | # Copyright (c) 2015 Nicolas JOUANIN
#
# See the file license.txt for copying permission.
def bytes_to_hex_str(data):
return '0x' + ''.join(format(b, '02x') for b in data)
def hex_to_int(data):
return int.from_bytes(data, byteorder='big') | Add some byte conversion utilities | Add some byte conversion utilities
| Python | mit | beerfactory/hbmqtt | Add some byte conversion utilities | # Copyright (c) 2015 Nicolas JOUANIN
#
# See the file license.txt for copying permission.
def bytes_to_hex_str(data):
return '0x' + ''.join(format(b, '02x') for b in data)
def hex_to_int(data):
return int.from_bytes(data, byteorder='big') | <commit_before><commit_msg>Add some byte conversion utilities<commit_after> | # Copyright (c) 2015 Nicolas JOUANIN
#
# See the file license.txt for copying permission.
def bytes_to_hex_str(data):
return '0x' + ''.join(format(b, '02x') for b in data)
def hex_to_int(data):
return int.from_bytes(data, byteorder='big') | Add some byte conversion utilities# Copyright (c) 2015 Nicolas JOUANIN
#
# See the file license.txt for copying permission.
def bytes_to_hex_str(data):
return '0x' + ''.join(format(b, '02x') for b in data)
def hex_to_int(data):
return int.from_bytes(data, byteorder='big') | <commit_before><commit_msg>Add some byte conversion utilities<commit_after># Copyright (c) 2015 Nicolas JOUANIN
#
# See the file license.txt for copying permission.
def bytes_to_hex_str(data):
return '0x' + ''.join(format(b, '02x') for b in data)
def hex_to_int(data):
return int.from_bytes(data, byteorder='b... | |
5c479bbb873bd200dda12c292e51612a8e9f26ed | examples/plot_data.py | examples/plot_data.py | import hexgrid
import numpy as np
import matplotlib.pyplot as plt
points = hexgrid.create_spiral(hexgrid.HexPoints(0, 0, 0), 4)
points.data['id'] = np.arange(len(points))
points.data['random'] = np.random.normal(size=len(points))
fig, (ax1, ax2) = plt.subplots(1, 2)
fig.set_size_inches(9, 3)
for ax in (ax1, ax2):... | Add example for plotting data | Add example for plotting data
| Python | mit | MaxNoe/pyhexgrid | Add example for plotting data | import hexgrid
import numpy as np
import matplotlib.pyplot as plt
points = hexgrid.create_spiral(hexgrid.HexPoints(0, 0, 0), 4)
points.data['id'] = np.arange(len(points))
points.data['random'] = np.random.normal(size=len(points))
fig, (ax1, ax2) = plt.subplots(1, 2)
fig.set_size_inches(9, 3)
for ax in (ax1, ax2):... | <commit_before><commit_msg>Add example for plotting data<commit_after> | import hexgrid
import numpy as np
import matplotlib.pyplot as plt
points = hexgrid.create_spiral(hexgrid.HexPoints(0, 0, 0), 4)
points.data['id'] = np.arange(len(points))
points.data['random'] = np.random.normal(size=len(points))
fig, (ax1, ax2) = plt.subplots(1, 2)
fig.set_size_inches(9, 3)
for ax in (ax1, ax2):... | Add example for plotting dataimport hexgrid
import numpy as np
import matplotlib.pyplot as plt
points = hexgrid.create_spiral(hexgrid.HexPoints(0, 0, 0), 4)
points.data['id'] = np.arange(len(points))
points.data['random'] = np.random.normal(size=len(points))
fig, (ax1, ax2) = plt.subplots(1, 2)
fig.set_size_inches... | <commit_before><commit_msg>Add example for plotting data<commit_after>import hexgrid
import numpy as np
import matplotlib.pyplot as plt
points = hexgrid.create_spiral(hexgrid.HexPoints(0, 0, 0), 4)
points.data['id'] = np.arange(len(points))
points.data['random'] = np.random.normal(size=len(points))
fig, (ax1, ax2)... | |
6962ba127dc2e4551901131426395fcfb3f53cee | extra/docker_tools.py | extra/docker_tools.py | import subprocess
import sys
def task_docker_ready():
"""Check that docker can be executed inside the container."""
def _docker_ready():
try:
subprocess.check_call('docker ps >/dev/null 2>&1', shell=True)
return True
except subprocess.CalledProcessError:
pr... | Add a module with tools for using docker from doit | Add a module with tools for using docker from doit | Python | mit | waltermoreira/doit_in_docker,waltermoreira/doit_in_docker | Add a module with tools for using docker from doit | import subprocess
import sys
def task_docker_ready():
"""Check that docker can be executed inside the container."""
def _docker_ready():
try:
subprocess.check_call('docker ps >/dev/null 2>&1', shell=True)
return True
except subprocess.CalledProcessError:
pr... | <commit_before><commit_msg>Add a module with tools for using docker from doit<commit_after> | import subprocess
import sys
def task_docker_ready():
"""Check that docker can be executed inside the container."""
def _docker_ready():
try:
subprocess.check_call('docker ps >/dev/null 2>&1', shell=True)
return True
except subprocess.CalledProcessError:
pr... | Add a module with tools for using docker from doitimport subprocess
import sys
def task_docker_ready():
"""Check that docker can be executed inside the container."""
def _docker_ready():
try:
subprocess.check_call('docker ps >/dev/null 2>&1', shell=True)
return True
ex... | <commit_before><commit_msg>Add a module with tools for using docker from doit<commit_after>import subprocess
import sys
def task_docker_ready():
"""Check that docker can be executed inside the container."""
def _docker_ready():
try:
subprocess.check_call('docker ps >/dev/null 2>&1', shell... | |
b5700995316d999cae9f2284a21d1f373d419b21 | euler016.py | euler016.py | #!/usr/bin/python
from math import pow
x = int(pow(2, 1000))
a = str(x)
res = 0
for i in range(len(a)):
res += int(a[i])
print(res)
| Add solution for problem 16 | Add solution for problem 16
| Python | mit | cifvts/PyEuler | Add solution for problem 16 | #!/usr/bin/python
from math import pow
x = int(pow(2, 1000))
a = str(x)
res = 0
for i in range(len(a)):
res += int(a[i])
print(res)
| <commit_before><commit_msg>Add solution for problem 16<commit_after> | #!/usr/bin/python
from math import pow
x = int(pow(2, 1000))
a = str(x)
res = 0
for i in range(len(a)):
res += int(a[i])
print(res)
| Add solution for problem 16#!/usr/bin/python
from math import pow
x = int(pow(2, 1000))
a = str(x)
res = 0
for i in range(len(a)):
res += int(a[i])
print(res)
| <commit_before><commit_msg>Add solution for problem 16<commit_after>#!/usr/bin/python
from math import pow
x = int(pow(2, 1000))
a = str(x)
res = 0
for i in range(len(a)):
res += int(a[i])
print(res)
| |
b5ff1b9f24214d6508ebf58a676b6df10e51a655 | euler033.py | euler033.py | #!/usr/bin/python
from fractions import gcd
num = 1
den = 1
for c in range(1, 10):
for b in range(1, c):
for a in range(1, b):
x = a * 10 + c
y = c * 10 + b
if (a / b) == (x / y):
num *= a
den *= b
print(den // gcd(den, num))
| Add solution for problem 33, after long time... | Add solution for problem 33, after long time...
| Python | mit | cifvts/PyEuler | Add solution for problem 33, after long time... | #!/usr/bin/python
from fractions import gcd
num = 1
den = 1
for c in range(1, 10):
for b in range(1, c):
for a in range(1, b):
x = a * 10 + c
y = c * 10 + b
if (a / b) == (x / y):
num *= a
den *= b
print(den // gcd(den, num))
| <commit_before><commit_msg>Add solution for problem 33, after long time...<commit_after> | #!/usr/bin/python
from fractions import gcd
num = 1
den = 1
for c in range(1, 10):
for b in range(1, c):
for a in range(1, b):
x = a * 10 + c
y = c * 10 + b
if (a / b) == (x / y):
num *= a
den *= b
print(den // gcd(den, num))
| Add solution for problem 33, after long time...#!/usr/bin/python
from fractions import gcd
num = 1
den = 1
for c in range(1, 10):
for b in range(1, c):
for a in range(1, b):
x = a * 10 + c
y = c * 10 + b
if (a / b) == (x / y):
num *= a
d... | <commit_before><commit_msg>Add solution for problem 33, after long time...<commit_after>#!/usr/bin/python
from fractions import gcd
num = 1
den = 1
for c in range(1, 10):
for b in range(1, c):
for a in range(1, b):
x = a * 10 + c
y = c * 10 + b
if (a / b) == (x / y):
... | |
af3222f934a812b5f4a57d3c86f8ca3604f956cc | python/ranks.py | python/ranks.py | """
Rank Vectors
Given an array (or list) of scores, return the array of ranks for each value in the array. The largest value has rank 1, the second largest value has rank 2, and so on. Ties should be handled by assigning the same rank to all tied values. For example:
ranks([9,3,6,10]) = [2,4,3,1] and ranks([3,3,3,3,... | Add score ranking problem and solution | Add score ranking problem and solution
| Python | unlicense | alanc10n/snippets | Add score ranking problem and solution | """
Rank Vectors
Given an array (or list) of scores, return the array of ranks for each value in the array. The largest value has rank 1, the second largest value has rank 2, and so on. Ties should be handled by assigning the same rank to all tied values. For example:
ranks([9,3,6,10]) = [2,4,3,1] and ranks([3,3,3,3,... | <commit_before><commit_msg>Add score ranking problem and solution<commit_after> | """
Rank Vectors
Given an array (or list) of scores, return the array of ranks for each value in the array. The largest value has rank 1, the second largest value has rank 2, and so on. Ties should be handled by assigning the same rank to all tied values. For example:
ranks([9,3,6,10]) = [2,4,3,1] and ranks([3,3,3,3,... | Add score ranking problem and solution"""
Rank Vectors
Given an array (or list) of scores, return the array of ranks for each value in the array. The largest value has rank 1, the second largest value has rank 2, and so on. Ties should be handled by assigning the same rank to all tied values. For example:
ranks([9,3,... | <commit_before><commit_msg>Add score ranking problem and solution<commit_after>"""
Rank Vectors
Given an array (or list) of scores, return the array of ranks for each value in the array. The largest value has rank 1, the second largest value has rank 2, and so on. Ties should be handled by assigning the same rank to a... | |
4a17b636fc405e61be19ed21c44b37fdd5371aa2 | django_vend/stores/forms.py | django_vend/stores/forms.py | from django import forms
from django_vend.core.forms import VendDateTimeField
from .models import VendOutlet
class VendOutletForm(forms.ModelForm):
deleted_at = VendDateTimeField(required=False)
def __init__(self, data=None, *args, **kwargs):
if data:
uid = data.pop('id', None)
... | Create VendOutletForm to use for validating data received from Vend API | Create VendOutletForm to use for validating data received from Vend API
| Python | bsd-3-clause | remarkablerocket/django-vend,remarkablerocket/django-vend | Create VendOutletForm to use for validating data received from Vend API | from django import forms
from django_vend.core.forms import VendDateTimeField
from .models import VendOutlet
class VendOutletForm(forms.ModelForm):
deleted_at = VendDateTimeField(required=False)
def __init__(self, data=None, *args, **kwargs):
if data:
uid = data.pop('id', None)
... | <commit_before><commit_msg>Create VendOutletForm to use for validating data received from Vend API<commit_after> | from django import forms
from django_vend.core.forms import VendDateTimeField
from .models import VendOutlet
class VendOutletForm(forms.ModelForm):
deleted_at = VendDateTimeField(required=False)
def __init__(self, data=None, *args, **kwargs):
if data:
uid = data.pop('id', None)
... | Create VendOutletForm to use for validating data received from Vend APIfrom django import forms
from django_vend.core.forms import VendDateTimeField
from .models import VendOutlet
class VendOutletForm(forms.ModelForm):
deleted_at = VendDateTimeField(required=False)
def __init__(self, data=None, *args, **kw... | <commit_before><commit_msg>Create VendOutletForm to use for validating data received from Vend API<commit_after>from django import forms
from django_vend.core.forms import VendDateTimeField
from .models import VendOutlet
class VendOutletForm(forms.ModelForm):
deleted_at = VendDateTimeField(required=False)
... | |
53b8d4089299e85caef8b65aaa3b074acb243ccb | Next_Greater_Element_I.py | Next_Greater_Element_I.py | # You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums2.
# The Next Greater Number of a number x in nums1 is the first greater number to its right in nums2. If it does not exi... | Solve Next Greater Element I | Solve Next Greater Element I
| Python | mit | Kunal57/Python_Algorithms | Solve Next Greater Element I | # You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums2.
# The Next Greater Number of a number x in nums1 is the first greater number to its right in nums2. If it does not exi... | <commit_before><commit_msg>Solve Next Greater Element I<commit_after> | # You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums2.
# The Next Greater Number of a number x in nums1 is the first greater number to its right in nums2. If it does not exi... | Solve Next Greater Element I# You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums2.
# The Next Greater Number of a number x in nums1 is the first greater number to its right ... | <commit_before><commit_msg>Solve Next Greater Element I<commit_after># You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums2.
# The Next Greater Number of a number x in nums1 ... | |
8a08a5c40e890a63ee1e6b1d30ad16155245df70 | mltsp/ext/celeryconfig.py | mltsp/ext/celeryconfig.py | #CELERY_RESULT_BACKEND = 'mltsp.ext.rethinkdb_backend:RethinkBackend'
CELERY_RESULT_BACKEND = "amqp"
#CELERY_RETHINKDB_BACKEND_SETTINGS = {
# 'host': '127.0.0.1',
# 'port': 28015,
# 'db': 'celery_test',
# 'auth_key': '',
# 'timeout': 20,
# 'table': 'celery_taskmeta',
# 'options': {}
#}
CE... | Use RethinkDB as Celery backend | Use RethinkDB as Celery backend
| Python | bsd-3-clause | mltsp/mltsp,bnaul/mltsp,bnaul/mltsp,bnaul/mltsp,mltsp/mltsp,mltsp/mltsp,mltsp/mltsp,acrellin/mltsp,acrellin/mltsp,acrellin/mltsp,acrellin/mltsp,acrellin/mltsp,mltsp/mltsp,acrellin/mltsp,bnaul/mltsp,bnaul/mltsp,mltsp/mltsp,bnaul/mltsp | Use RethinkDB as Celery backend | #CELERY_RESULT_BACKEND = 'mltsp.ext.rethinkdb_backend:RethinkBackend'
CELERY_RESULT_BACKEND = "amqp"
#CELERY_RETHINKDB_BACKEND_SETTINGS = {
# 'host': '127.0.0.1',
# 'port': 28015,
# 'db': 'celery_test',
# 'auth_key': '',
# 'timeout': 20,
# 'table': 'celery_taskmeta',
# 'options': {}
#}
CE... | <commit_before><commit_msg>Use RethinkDB as Celery backend<commit_after> | #CELERY_RESULT_BACKEND = 'mltsp.ext.rethinkdb_backend:RethinkBackend'
CELERY_RESULT_BACKEND = "amqp"
#CELERY_RETHINKDB_BACKEND_SETTINGS = {
# 'host': '127.0.0.1',
# 'port': 28015,
# 'db': 'celery_test',
# 'auth_key': '',
# 'timeout': 20,
# 'table': 'celery_taskmeta',
# 'options': {}
#}
CE... | Use RethinkDB as Celery backend#CELERY_RESULT_BACKEND = 'mltsp.ext.rethinkdb_backend:RethinkBackend'
CELERY_RESULT_BACKEND = "amqp"
#CELERY_RETHINKDB_BACKEND_SETTINGS = {
# 'host': '127.0.0.1',
# 'port': 28015,
# 'db': 'celery_test',
# 'auth_key': '',
# 'timeout': 20,
# 'table': 'celery_taskme... | <commit_before><commit_msg>Use RethinkDB as Celery backend<commit_after>#CELERY_RESULT_BACKEND = 'mltsp.ext.rethinkdb_backend:RethinkBackend'
CELERY_RESULT_BACKEND = "amqp"
#CELERY_RETHINKDB_BACKEND_SETTINGS = {
# 'host': '127.0.0.1',
# 'port': 28015,
# 'db': 'celery_test',
# 'auth_key': '',
# 'ti... | |
642734303e2a95d156cd01f7ca17f07ee9bc97e6 | maud/tests_support.py | maud/tests_support.py | import numpy as np
from numpy import ma
from numpy.random import random
def inputsizes_f2D(f):
l = 3
# 1D input
#x = np.arange(10)
#y = x
#z = random(x.shape)
#h = wmean_2D(x, y, z, l)
# 2D input
x = np.arange(10)
y = np.arange(3)
X, Y = np.meshgrid(x, y)
Z = random(X.sha... | Set of functions used in the tests. | Set of functions used in the tests.
| Python | bsd-3-clause | castelao/maud | Set of functions used in the tests. | import numpy as np
from numpy import ma
from numpy.random import random
def inputsizes_f2D(f):
l = 3
# 1D input
#x = np.arange(10)
#y = x
#z = random(x.shape)
#h = wmean_2D(x, y, z, l)
# 2D input
x = np.arange(10)
y = np.arange(3)
X, Y = np.meshgrid(x, y)
Z = random(X.sha... | <commit_before><commit_msg>Set of functions used in the tests.<commit_after> | import numpy as np
from numpy import ma
from numpy.random import random
def inputsizes_f2D(f):
l = 3
# 1D input
#x = np.arange(10)
#y = x
#z = random(x.shape)
#h = wmean_2D(x, y, z, l)
# 2D input
x = np.arange(10)
y = np.arange(3)
X, Y = np.meshgrid(x, y)
Z = random(X.sha... | Set of functions used in the tests.import numpy as np
from numpy import ma
from numpy.random import random
def inputsizes_f2D(f):
l = 3
# 1D input
#x = np.arange(10)
#y = x
#z = random(x.shape)
#h = wmean_2D(x, y, z, l)
# 2D input
x = np.arange(10)
y = np.arange(3)
X, Y = np.... | <commit_before><commit_msg>Set of functions used in the tests.<commit_after>import numpy as np
from numpy import ma
from numpy.random import random
def inputsizes_f2D(f):
l = 3
# 1D input
#x = np.arange(10)
#y = x
#z = random(x.shape)
#h = wmean_2D(x, y, z, l)
# 2D input
x = np.arang... | |
65838da6a7353ae084a13565ea2dd55368a27176 | history/migrations/0007_auto_20141026_2348.py | history/migrations/0007_auto_20141026_2348.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('history', '0006_committeemember_member'),
]
operations = [
migrations.AlterField(
model_name='meetingminutes',
... | Update meeting minutes model (committees) | Update meeting minutes model (committees)
| Python | apache-2.0 | tbpmig/mig-website,tbpmig/mig-website,tbpmig/mig-website | Update meeting minutes model (committees) | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('history', '0006_committeemember_member'),
]
operations = [
migrations.AlterField(
model_name='meetingminutes',
... | <commit_before><commit_msg>Update meeting minutes model (committees)<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('history', '0006_committeemember_member'),
]
operations = [
migrations.AlterField(
model_name='meetingminutes',
... | Update meeting minutes model (committees)# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('history', '0006_committeemember_member'),
]
operations = [
migrations.AlterField(
... | <commit_before><commit_msg>Update meeting minutes model (committees)<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('history', '0006_committeemember_member'),
]
operat... | |
a778bc11b10aaa8cab1907ea1be43a9334d78ce2 | modules/mod_chatterbot.py | modules/mod_chatterbot.py | from modules.module_base import ModuleBase
from bot import Bot
from chatterbot import ChatBot
class ModuleChatterBot(ModuleBase):
def __init__(self, bot):
ModuleBase.__init__(self, bot)
self.name = "ChatterBot"
self.chatbot = ChatBot("Ron Obvious", database='modules/resources/chatterbot.d... | Add new module for ChatterBot | Add new module for ChatterBot
| Python | mit | mamaddeveloper/teleadmin,mamaddeveloper/teleadmin,mamaddeveloper/telegrambot,mamaddeveloper/telegrambot | Add new module for ChatterBot | from modules.module_base import ModuleBase
from bot import Bot
from chatterbot import ChatBot
class ModuleChatterBot(ModuleBase):
def __init__(self, bot):
ModuleBase.__init__(self, bot)
self.name = "ChatterBot"
self.chatbot = ChatBot("Ron Obvious", database='modules/resources/chatterbot.d... | <commit_before><commit_msg>Add new module for ChatterBot<commit_after> | from modules.module_base import ModuleBase
from bot import Bot
from chatterbot import ChatBot
class ModuleChatterBot(ModuleBase):
def __init__(self, bot):
ModuleBase.__init__(self, bot)
self.name = "ChatterBot"
self.chatbot = ChatBot("Ron Obvious", database='modules/resources/chatterbot.d... | Add new module for ChatterBotfrom modules.module_base import ModuleBase
from bot import Bot
from chatterbot import ChatBot
class ModuleChatterBot(ModuleBase):
def __init__(self, bot):
ModuleBase.__init__(self, bot)
self.name = "ChatterBot"
self.chatbot = ChatBot("Ron Obvious", database='m... | <commit_before><commit_msg>Add new module for ChatterBot<commit_after>from modules.module_base import ModuleBase
from bot import Bot
from chatterbot import ChatBot
class ModuleChatterBot(ModuleBase):
def __init__(self, bot):
ModuleBase.__init__(self, bot)
self.name = "ChatterBot"
self.cha... | |
f584fc98f7cdfe97caeb31d9abc742eafa6cac03 | software/tests/test_buildtermpages.py | software/tests/test_buildtermpages.py | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import os
import sys
import unittest
for path in (os.getcwd(), "software/util", "software/SchemaTerms"):
sys.path.insert(1, path) #Pickup libs from local directories
import buildtermpages
import schemaexamples
import sdoterm
class TestTermFileName(unittest.TestCase)... | Speed up generation of term pages. | Speed up generation of term pages.
| Python | apache-2.0 | schemaorg/schemaorg,schemaorg/schemaorg,schemaorg/schemaorg,schemaorg/schemaorg,schemaorg/schemaorg | Speed up generation of term pages. | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import os
import sys
import unittest
for path in (os.getcwd(), "software/util", "software/SchemaTerms"):
sys.path.insert(1, path) #Pickup libs from local directories
import buildtermpages
import schemaexamples
import sdoterm
class TestTermFileName(unittest.TestCase)... | <commit_before><commit_msg>Speed up generation of term pages.<commit_after> | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import os
import sys
import unittest
for path in (os.getcwd(), "software/util", "software/SchemaTerms"):
sys.path.insert(1, path) #Pickup libs from local directories
import buildtermpages
import schemaexamples
import sdoterm
class TestTermFileName(unittest.TestCase)... | Speed up generation of term pages.#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import os
import sys
import unittest
for path in (os.getcwd(), "software/util", "software/SchemaTerms"):
sys.path.insert(1, path) #Pickup libs from local directories
import buildtermpages
import schemaexamples
import sdoterm
class T... | <commit_before><commit_msg>Speed up generation of term pages.<commit_after>#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import os
import sys
import unittest
for path in (os.getcwd(), "software/util", "software/SchemaTerms"):
sys.path.insert(1, path) #Pickup libs from local directories
import buildtermpages
impor... | |
bf4b048280151e1fd83600fa4aa592da187ca229 | sahara/tests/unit/plugins/ambari/test_common.py | sahara/tests/unit/plugins/ambari/test_common.py | # Copyright (c) 2017 EasyStack Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | Add missing tests to plugin ambari | Add missing tests to plugin ambari
The tests for plugins ambari is not completed.
Add:
test_get_ambari_proc_list()
test_get_clients()
test_instances_have_process()
Change-Id: Id835131c9715b24adf523a252849143ede711fdf
| Python | apache-2.0 | openstack/sahara,openstack/sahara | Add missing tests to plugin ambari
The tests for plugins ambari is not completed.
Add:
test_get_ambari_proc_list()
test_get_clients()
test_instances_have_process()
Change-Id: Id835131c9715b24adf523a252849143ede711fdf | # Copyright (c) 2017 EasyStack Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | <commit_before><commit_msg>Add missing tests to plugin ambari
The tests for plugins ambari is not completed.
Add:
test_get_ambari_proc_list()
test_get_clients()
test_instances_have_process()
Change-Id: Id835131c9715b24adf523a252849143ede711fdf<commit_after> | # Copyright (c) 2017 EasyStack Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | Add missing tests to plugin ambari
The tests for plugins ambari is not completed.
Add:
test_get_ambari_proc_list()
test_get_clients()
test_instances_have_process()
Change-Id: Id835131c9715b24adf523a252849143ede711fdf# Copyright (c) 2017 EasyStack Inc.
#
# Licensed under the Apache License, Version 2.0 (the "Licens... | <commit_before><commit_msg>Add missing tests to plugin ambari
The tests for plugins ambari is not completed.
Add:
test_get_ambari_proc_list()
test_get_clients()
test_instances_have_process()
Change-Id: Id835131c9715b24adf523a252849143ede711fdf<commit_after># Copyright (c) 2017 EasyStack Inc.
#
# Licensed under the... | |
990f792e67ae9d7c6dd194f08a3812e29fa594ac | amivapi/tests/test_hidden_passwords.py | amivapi/tests/test_hidden_passwords.py | from amivapi.tests import util
class TestHiddenPasswords(util.WebTestNoAuth):
def test_passwords_hidden(self):
user = self.new_user()
response = self.api.get("/users/%i" % user.id,
query_string='projection:{"password":1}',
status_co... | Test if passwords are visible through API | Tests: Test if passwords are visible through API
| Python | agpl-3.0 | amiv-eth/amivapi,amiv-eth/amivapi,amiv-eth/amivapi | Tests: Test if passwords are visible through API | from amivapi.tests import util
class TestHiddenPasswords(util.WebTestNoAuth):
def test_passwords_hidden(self):
user = self.new_user()
response = self.api.get("/users/%i" % user.id,
query_string='projection:{"password":1}',
status_co... | <commit_before><commit_msg>Tests: Test if passwords are visible through API<commit_after> | from amivapi.tests import util
class TestHiddenPasswords(util.WebTestNoAuth):
def test_passwords_hidden(self):
user = self.new_user()
response = self.api.get("/users/%i" % user.id,
query_string='projection:{"password":1}',
status_co... | Tests: Test if passwords are visible through APIfrom amivapi.tests import util
class TestHiddenPasswords(util.WebTestNoAuth):
def test_passwords_hidden(self):
user = self.new_user()
response = self.api.get("/users/%i" % user.id,
query_string='projection:{"password... | <commit_before><commit_msg>Tests: Test if passwords are visible through API<commit_after>from amivapi.tests import util
class TestHiddenPasswords(util.WebTestNoAuth):
def test_passwords_hidden(self):
user = self.new_user()
response = self.api.get("/users/%i" % user.id,
... | |
f2e91b0c47560a047789e31c618d3c60de1decb6 | build/android/pylib/thermal_throttle.py | build/android/pylib/thermal_throttle.py | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
class ThermalThrottle(object):
"""Class to detect and track thermal throttling
Usage:
Wait for IsThrottled() to be False before ... | Add a class for management of thermal throttling | Add a class for management of thermal throttling
The new class allows detection of whether the device is now, or has been, thermally throttled, hence allowing rejection of performance results affected by thermal throttling.
BUG=158575
Review URL: https://chromiumcodereview.appspot.com/11352004
git-svn-id: de016e52... | Python | bsd-3-clause | krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,dednal/chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,M4sse/chromium.src... | Add a class for management of thermal throttling
The new class allows detection of whether the device is now, or has been, thermally throttled, hence allowing rejection of performance results affected by thermal throttling.
BUG=158575
Review URL: https://chromiumcodereview.appspot.com/11352004
git-svn-id: de016e52... | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
class ThermalThrottle(object):
"""Class to detect and track thermal throttling
Usage:
Wait for IsThrottled() to be False before ... | <commit_before><commit_msg>Add a class for management of thermal throttling
The new class allows detection of whether the device is now, or has been, thermally throttled, hence allowing rejection of performance results affected by thermal throttling.
BUG=158575
Review URL: https://chromiumcodereview.appspot.com/113... | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
class ThermalThrottle(object):
"""Class to detect and track thermal throttling
Usage:
Wait for IsThrottled() to be False before ... | Add a class for management of thermal throttling
The new class allows detection of whether the device is now, or has been, thermally throttled, hence allowing rejection of performance results affected by thermal throttling.
BUG=158575
Review URL: https://chromiumcodereview.appspot.com/11352004
git-svn-id: de016e52... | <commit_before><commit_msg>Add a class for management of thermal throttling
The new class allows detection of whether the device is now, or has been, thermally throttled, hence allowing rejection of performance results affected by thermal throttling.
BUG=158575
Review URL: https://chromiumcodereview.appspot.com/113... | |
2789c7a4436cc7623350eb16b226d07a920107d4 | mchimp_amorendarrerides.py | mchimp_amorendarrerides.py | #!/usr/bin/env python
#-*- coding: utf8 -*-
import psycopg2
import config
import dbutils
import codecs
import sys
from consolemsg import step, error, fail, warn
from namespace import namespace as ns
def esPersonaFisica(soci) :
return 0 if soci.nif[2] in "ABCDEFGHJNPQRSUVW" else 1
def ambPuntDeMilers(numero) :
... | Add script apologize mortizations not sent | Add script apologize mortizations not sent
| Python | agpl-3.0 | Som-Energia/somenergia-dataexports,Som-Energia/somenergia-dataexports | Add script apologize mortizations not sent | #!/usr/bin/env python
#-*- coding: utf8 -*-
import psycopg2
import config
import dbutils
import codecs
import sys
from consolemsg import step, error, fail, warn
from namespace import namespace as ns
def esPersonaFisica(soci) :
return 0 if soci.nif[2] in "ABCDEFGHJNPQRSUVW" else 1
def ambPuntDeMilers(numero) :
... | <commit_before><commit_msg>Add script apologize mortizations not sent<commit_after> | #!/usr/bin/env python
#-*- coding: utf8 -*-
import psycopg2
import config
import dbutils
import codecs
import sys
from consolemsg import step, error, fail, warn
from namespace import namespace as ns
def esPersonaFisica(soci) :
return 0 if soci.nif[2] in "ABCDEFGHJNPQRSUVW" else 1
def ambPuntDeMilers(numero) :
... | Add script apologize mortizations not sent#!/usr/bin/env python
#-*- coding: utf8 -*-
import psycopg2
import config
import dbutils
import codecs
import sys
from consolemsg import step, error, fail, warn
from namespace import namespace as ns
def esPersonaFisica(soci) :
return 0 if soci.nif[2] in "ABCDEFGHJNPQRSUVW... | <commit_before><commit_msg>Add script apologize mortizations not sent<commit_after>#!/usr/bin/env python
#-*- coding: utf8 -*-
import psycopg2
import config
import dbutils
import codecs
import sys
from consolemsg import step, error, fail, warn
from namespace import namespace as ns
def esPersonaFisica(soci) :
retu... | |
f58a9c6aff57ccd157d8734b6d89411fc29da706 | src/poliastro/tests/test_patched_conics.py | src/poliastro/tests/test_patched_conics.py | # coding: utf-8
from astropy import units as u
from astropy.tests.helper import assert_quantity_allclose
from poliastro.bodies import Sun, Mercury, Venus, Earth, Moon, Mars
from poliastro.bodies import Jupiter, Saturn, Uranus, Neptune, Pluto
from poliastro.patched_conics import compute_soi
def test_compute_soi():
... | Add test to r_SOI computation | Add test to r_SOI computation
| Python | mit | Juanlu001/poliastro,newlawrence/poliastro,poliastro/poliastro,newlawrence/poliastro,anhiga/poliastro,anhiga/poliastro,Juanlu001/poliastro,anhiga/poliastro,Juanlu001/poliastro,newlawrence/poliastro | Add test to r_SOI computation | # coding: utf-8
from astropy import units as u
from astropy.tests.helper import assert_quantity_allclose
from poliastro.bodies import Sun, Mercury, Venus, Earth, Moon, Mars
from poliastro.bodies import Jupiter, Saturn, Uranus, Neptune, Pluto
from poliastro.patched_conics import compute_soi
def test_compute_soi():
... | <commit_before><commit_msg>Add test to r_SOI computation<commit_after> | # coding: utf-8
from astropy import units as u
from astropy.tests.helper import assert_quantity_allclose
from poliastro.bodies import Sun, Mercury, Venus, Earth, Moon, Mars
from poliastro.bodies import Jupiter, Saturn, Uranus, Neptune, Pluto
from poliastro.patched_conics import compute_soi
def test_compute_soi():
... | Add test to r_SOI computation# coding: utf-8
from astropy import units as u
from astropy.tests.helper import assert_quantity_allclose
from poliastro.bodies import Sun, Mercury, Venus, Earth, Moon, Mars
from poliastro.bodies import Jupiter, Saturn, Uranus, Neptune, Pluto
from poliastro.patched_conics import compute_so... | <commit_before><commit_msg>Add test to r_SOI computation<commit_after># coding: utf-8
from astropy import units as u
from astropy.tests.helper import assert_quantity_allclose
from poliastro.bodies import Sun, Mercury, Venus, Earth, Moon, Mars
from poliastro.bodies import Jupiter, Saturn, Uranus, Neptune, Pluto
from p... | |
3be77c10bfc10b78f9074e36f8b7ec2132ad4c04 | coherence/upnp/core/test/test_action.py | coherence/upnp/core/test/test_action.py | # -*- coding: utf-8 -*-
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2014, Hartmut Goebel <h.goebel@goebel-consult.de>
"""
Test cases for L{upnp.core.action}
"""
import time
from twisted.trial import unittest
from twisted.internet import protocol
from twisted.test i... | Add simple test-cases for upnp.core.action.Argument. | Add simple test-cases for upnp.core.action.Argument.
| Python | mit | furbrain/Coherence,unintended/Cohen,ismaelgaudioso/Coherence,coherence-project/Coherence,ismaelgaudioso/Coherence,coherence-project/Coherence,unintended/Cohen,furbrain/Coherence | Add simple test-cases for upnp.core.action.Argument. | # -*- coding: utf-8 -*-
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2014, Hartmut Goebel <h.goebel@goebel-consult.de>
"""
Test cases for L{upnp.core.action}
"""
import time
from twisted.trial import unittest
from twisted.internet import protocol
from twisted.test i... | <commit_before><commit_msg>Add simple test-cases for upnp.core.action.Argument.<commit_after> | # -*- coding: utf-8 -*-
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2014, Hartmut Goebel <h.goebel@goebel-consult.de>
"""
Test cases for L{upnp.core.action}
"""
import time
from twisted.trial import unittest
from twisted.internet import protocol
from twisted.test i... | Add simple test-cases for upnp.core.action.Argument.# -*- coding: utf-8 -*-
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2014, Hartmut Goebel <h.goebel@goebel-consult.de>
"""
Test cases for L{upnp.core.action}
"""
import time
from twisted.trial import unittest
from ... | <commit_before><commit_msg>Add simple test-cases for upnp.core.action.Argument.<commit_after># -*- coding: utf-8 -*-
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2014, Hartmut Goebel <h.goebel@goebel-consult.de>
"""
Test cases for L{upnp.core.action}
"""
import time
... | |
97a60b5cc41cf6824d45be1e5a1ce48343dced4a | apps/feedback/migrations/0002_auto_20150623_2055.py | apps/feedback/migrations/0002_auto_20150623_2055.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('feedback', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='ratinganswer',
name=... | Add that **** strange feedback migration again. 2nd time that has happened. | Add that **** strange feedback migration again. 2nd time that has happened.
| Python | mit | dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4 | Add that **** strange feedback migration again. 2nd time that has happened. | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('feedback', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='ratinganswer',
name=... | <commit_before><commit_msg>Add that **** strange feedback migration again. 2nd time that has happened.<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('feedback', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='ratinganswer',
name=... | Add that **** strange feedback migration again. 2nd time that has happened.# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('feedback', '0001_initial'),
]
operations = [
migr... | <commit_before><commit_msg>Add that **** strange feedback migration again. 2nd time that has happened.<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('feedback', '0001_initial'... | |
6be49752c7e6f34c53229c755285a0e140128a0e | bidb/buildinfo/buildinfo_submissions/migrations/0002_remove_submissions_without_keys.py | bidb/buildinfo/buildinfo_submissions/migrations/0002_remove_submissions_without_keys.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-03 20:30
from __future__ import unicode_literals
from django.db import migrations
def forwards(apps, schema_editor):
if not schema_editor.connection.alias == 'default':
return
Submission = apps.get_model('buildinfo_submissions', 'Submiss... | Delete submissions with no (ie. blank) uid | Delete submissions with no (ie. blank) uid
Signed-off-by: Chris Lamb <29e6d179a8d73471df7861382db6dd7e64138033@debian.org>
| Python | agpl-3.0 | lamby/buildinfo.debian.net,lamby/buildinfo.debian.net | Delete submissions with no (ie. blank) uid
Signed-off-by: Chris Lamb <29e6d179a8d73471df7861382db6dd7e64138033@debian.org> | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-03 20:30
from __future__ import unicode_literals
from django.db import migrations
def forwards(apps, schema_editor):
if not schema_editor.connection.alias == 'default':
return
Submission = apps.get_model('buildinfo_submissions', 'Submiss... | <commit_before><commit_msg>Delete submissions with no (ie. blank) uid
Signed-off-by: Chris Lamb <29e6d179a8d73471df7861382db6dd7e64138033@debian.org><commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-03 20:30
from __future__ import unicode_literals
from django.db import migrations
def forwards(apps, schema_editor):
if not schema_editor.connection.alias == 'default':
return
Submission = apps.get_model('buildinfo_submissions', 'Submiss... | Delete submissions with no (ie. blank) uid
Signed-off-by: Chris Lamb <29e6d179a8d73471df7861382db6dd7e64138033@debian.org># -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-03 20:30
from __future__ import unicode_literals
from django.db import migrations
def forwards(apps, schema_editor):
if not sch... | <commit_before><commit_msg>Delete submissions with no (ie. blank) uid
Signed-off-by: Chris Lamb <29e6d179a8d73471df7861382db6dd7e64138033@debian.org><commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-03 20:30
from __future__ import unicode_literals
from django.db import migrations
def forw... | |
fa0842d36dc4df14a41887e7ff2427142b2f993e | tests/template_compile_race.py | tests/template_compile_race.py | import threading
from wolis.test_case import WolisTestCase
from wolis import utils
thread_count = 5
requests_per_thread = 20
stop = False
failed = False
def test_fn(s, case, url):
global stop, failed
for i in range(requests_per_thread):
if stop:
break
s.get(url)
case.... | Test for template race condition only | Test for template race condition only
| Python | bsd-2-clause | p/wolis-phpbb,p/wolis-phpbb | Test for template race condition only | import threading
from wolis.test_case import WolisTestCase
from wolis import utils
thread_count = 5
requests_per_thread = 20
stop = False
failed = False
def test_fn(s, case, url):
global stop, failed
for i in range(requests_per_thread):
if stop:
break
s.get(url)
case.... | <commit_before><commit_msg>Test for template race condition only<commit_after> | import threading
from wolis.test_case import WolisTestCase
from wolis import utils
thread_count = 5
requests_per_thread = 20
stop = False
failed = False
def test_fn(s, case, url):
global stop, failed
for i in range(requests_per_thread):
if stop:
break
s.get(url)
case.... | Test for template race condition onlyimport threading
from wolis.test_case import WolisTestCase
from wolis import utils
thread_count = 5
requests_per_thread = 20
stop = False
failed = False
def test_fn(s, case, url):
global stop, failed
for i in range(requests_per_thread):
if stop:
b... | <commit_before><commit_msg>Test for template race condition only<commit_after>import threading
from wolis.test_case import WolisTestCase
from wolis import utils
thread_count = 5
requests_per_thread = 20
stop = False
failed = False
def test_fn(s, case, url):
global stop, failed
for i in range(requests_pe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.