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
886dae7cbf433f2b0d65016164db62883cae0925
tests/unit/spec_tests.py
tests/unit/spec_tests.py
# -*- coding: utf8 -*- """ Tests for pika.spec """ import unittest from pika import spec class BasicPropertiesTests(unittest.TestCase): def test_equality(self): a = spec.BasicProperties(content_type='text/plain') self.assertEqual(a, a) self.assertNotEqual(a, None) b = spec.Basic...
Add explicit BasicProperties equality test
Add explicit BasicProperties equality test In Python equality of objects, if not defined otherwise, is based on the objects hash. By extending amqp_objects with an __eq__ method we can now test equality of two BasicProperties objects and can expect True if their internal __dict__'s are equal.
Python
bsd-3-clause
pika/pika
Add explicit BasicProperties equality test In Python equality of objects, if not defined otherwise, is based on the objects hash. By extending amqp_objects with an __eq__ method we can now test equality of two BasicProperties objects and can expect True if their internal __dict__'s are equal.
# -*- coding: utf8 -*- """ Tests for pika.spec """ import unittest from pika import spec class BasicPropertiesTests(unittest.TestCase): def test_equality(self): a = spec.BasicProperties(content_type='text/plain') self.assertEqual(a, a) self.assertNotEqual(a, None) b = spec.Basic...
<commit_before><commit_msg>Add explicit BasicProperties equality test In Python equality of objects, if not defined otherwise, is based on the objects hash. By extending amqp_objects with an __eq__ method we can now test equality of two BasicProperties objects and can expect True if their internal __dict__'s are equal...
# -*- coding: utf8 -*- """ Tests for pika.spec """ import unittest from pika import spec class BasicPropertiesTests(unittest.TestCase): def test_equality(self): a = spec.BasicProperties(content_type='text/plain') self.assertEqual(a, a) self.assertNotEqual(a, None) b = spec.Basic...
Add explicit BasicProperties equality test In Python equality of objects, if not defined otherwise, is based on the objects hash. By extending amqp_objects with an __eq__ method we can now test equality of two BasicProperties objects and can expect True if their internal __dict__'s are equal.# -*- coding: utf8 -*- """...
<commit_before><commit_msg>Add explicit BasicProperties equality test In Python equality of objects, if not defined otherwise, is based on the objects hash. By extending amqp_objects with an __eq__ method we can now test equality of two BasicProperties objects and can expect True if their internal __dict__'s are equal...
27b74424e6a9193636bc533dbf758d40b5dc0d3e
lazyblacksmith/utils/crestutils.py
lazyblacksmith/utils/crestutils.py
# -*- encoding: utf-8 -*- import pycrest import config def get_crest(): """ Return a CREST object initialized """ crest = pycrest.EVE() crest() return crest def get_by_attr(objlist, attr, val): ''' Searches list of dicts for a dict with dict[attr] == val ''' matches = [getattr(obj, attr) == ...
Add utils functions for the crest api
Add utils functions for the crest api
Python
bsd-3-clause
Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith
Add utils functions for the crest api
# -*- encoding: utf-8 -*- import pycrest import config def get_crest(): """ Return a CREST object initialized """ crest = pycrest.EVE() crest() return crest def get_by_attr(objlist, attr, val): ''' Searches list of dicts for a dict with dict[attr] == val ''' matches = [getattr(obj, attr) == ...
<commit_before><commit_msg>Add utils functions for the crest api<commit_after>
# -*- encoding: utf-8 -*- import pycrest import config def get_crest(): """ Return a CREST object initialized """ crest = pycrest.EVE() crest() return crest def get_by_attr(objlist, attr, val): ''' Searches list of dicts for a dict with dict[attr] == val ''' matches = [getattr(obj, attr) == ...
Add utils functions for the crest api# -*- encoding: utf-8 -*- import pycrest import config def get_crest(): """ Return a CREST object initialized """ crest = pycrest.EVE() crest() return crest def get_by_attr(objlist, attr, val): ''' Searches list of dicts for a dict with dict[attr] == val ''' ...
<commit_before><commit_msg>Add utils functions for the crest api<commit_after># -*- encoding: utf-8 -*- import pycrest import config def get_crest(): """ Return a CREST object initialized """ crest = pycrest.EVE() crest() return crest def get_by_attr(objlist, attr, val): ''' Searches list of dic...
b0cf9904023c5ee20c5f29b3e88899420405550b
examples/puttiff.py
examples/puttiff.py
# Copyright 2014 Open Connectome Project (http://openconnecto.me) # # 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 ...
Migrate this version to new workstation.
Migrate this version to new workstation.
Python
apache-2.0
neurodata/ndstore,openconnectome/open-connectome,openconnectome/open-connectome,openconnectome/open-connectome,neurodata/ndstore,openconnectome/open-connectome,neurodata/ndstore,openconnectome/open-connectome,openconnectome/open-connectome,neurodata/ndstore
Migrate this version to new workstation.
# Copyright 2014 Open Connectome Project (http://openconnecto.me) # # 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>Migrate this version to new workstation.<commit_after>
# Copyright 2014 Open Connectome Project (http://openconnecto.me) # # 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 ...
Migrate this version to new workstation.# Copyright 2014 Open Connectome Project (http://openconnecto.me) # # 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/licen...
<commit_before><commit_msg>Migrate this version to new workstation.<commit_after># Copyright 2014 Open Connectome Project (http://openconnecto.me) # # 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 Licens...
01d35d13aaedea0ef87ae1d78ee1368e5e0f407c
corehq/apps/locations/management/commands/set_location_id.py
corehq/apps/locations/management/commands/set_location_id.py
from django.core.management.base import BaseCommand from dimagi.utils.couch.database import iter_docs from corehq.apps.users.models import CouchUser, CommCareUser class Command(BaseCommand): help = '' def handle(self, *args, **options): self.stdout.write("Population location_id field...\n") ...
Move migration into main branch
Move migration into main branch
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq
Move migration into main branch
from django.core.management.base import BaseCommand from dimagi.utils.couch.database import iter_docs from corehq.apps.users.models import CouchUser, CommCareUser class Command(BaseCommand): help = '' def handle(self, *args, **options): self.stdout.write("Population location_id field...\n") ...
<commit_before><commit_msg>Move migration into main branch<commit_after>
from django.core.management.base import BaseCommand from dimagi.utils.couch.database import iter_docs from corehq.apps.users.models import CouchUser, CommCareUser class Command(BaseCommand): help = '' def handle(self, *args, **options): self.stdout.write("Population location_id field...\n") ...
Move migration into main branchfrom django.core.management.base import BaseCommand from dimagi.utils.couch.database import iter_docs from corehq.apps.users.models import CouchUser, CommCareUser class Command(BaseCommand): help = '' def handle(self, *args, **options): self.stdout.write("Population loc...
<commit_before><commit_msg>Move migration into main branch<commit_after>from django.core.management.base import BaseCommand from dimagi.utils.couch.database import iter_docs from corehq.apps.users.models import CouchUser, CommCareUser class Command(BaseCommand): help = '' def handle(self, *args, **options): ...
1b28330beda151cc2660143926a9bf9178b6af2b
openfisca_france_data/tests/test_fake_survey_simulation.py
openfisca_france_data/tests/test_fake_survey_simulation.py
# -*- coding: utf-8 -*- # OpenFisca -- A versatile microsimulation software # By: OpenFisca Team <contact@openfisca.fr> # # Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team # https://github.com/openfisca # # This file is part of OpenFisca. # # OpenFisca is free software; you can redistribute it and/or modify...
Move fake survey simulation to a separate file
Move fake survey simulation to a separate file
Python
agpl-3.0
adrienpacifico/openfisca-france-data,openfisca/openfisca-france-data,LouisePaulDelvaux/openfisca-france-data,openfisca/openfisca-france-data,LouisePaulDelvaux/openfisca-france-data,benjello/openfisca-france-data,MalkIPP/openfisca-france-data,benjello/openfisca-france-data,openfisca/openfisca-france-data,adrienpacifico/...
Move fake survey simulation to a separate file
# -*- coding: utf-8 -*- # OpenFisca -- A versatile microsimulation software # By: OpenFisca Team <contact@openfisca.fr> # # Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team # https://github.com/openfisca # # This file is part of OpenFisca. # # OpenFisca is free software; you can redistribute it and/or modify...
<commit_before><commit_msg>Move fake survey simulation to a separate file<commit_after>
# -*- coding: utf-8 -*- # OpenFisca -- A versatile microsimulation software # By: OpenFisca Team <contact@openfisca.fr> # # Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team # https://github.com/openfisca # # This file is part of OpenFisca. # # OpenFisca is free software; you can redistribute it and/or modify...
Move fake survey simulation to a separate file# -*- coding: utf-8 -*- # OpenFisca -- A versatile microsimulation software # By: OpenFisca Team <contact@openfisca.fr> # # Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team # https://github.com/openfisca # # This file is part of OpenFisca. # # OpenFisca is free s...
<commit_before><commit_msg>Move fake survey simulation to a separate file<commit_after># -*- coding: utf-8 -*- # OpenFisca -- A versatile microsimulation software # By: OpenFisca Team <contact@openfisca.fr> # # Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team # https://github.com/openfisca # # This file is p...
420a1a76c7c9460768e6d41e7508f36d3215fbfb
kolibri/core/exams/migrations/0003_auto_20190426_1015.py
kolibri/core/exams/migrations/0003_auto_20190426_1015.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-26 17:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('exams', '0002_update_exam_data_model'), ] operations = [ migrations.AlterF...
Add migration for new Exam data_model_version default
Add migration for new Exam data_model_version default
Python
mit
learningequality/kolibri,indirectlylit/kolibri,lyw07/kolibri,learningequality/kolibri,mrpau/kolibri,lyw07/kolibri,lyw07/kolibri,learningequality/kolibri,indirectlylit/kolibri,mrpau/kolibri,indirectlylit/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,lyw07/kolibri,indirectlylit/kolibri
Add migration for new Exam data_model_version default
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-26 17:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('exams', '0002_update_exam_data_model'), ] operations = [ migrations.AlterF...
<commit_before><commit_msg>Add migration for new Exam data_model_version default<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-26 17:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('exams', '0002_update_exam_data_model'), ] operations = [ migrations.AlterF...
Add migration for new Exam data_model_version default# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-26 17:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('exams', '0002_update_exam_data_model')...
<commit_before><commit_msg>Add migration for new Exam data_model_version default<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-26 17:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ...
f84284b14d21669f9a9aae5d482f1e626f42df03
src/clincoded/upgrade/pathogenicity.py
src/clincoded/upgrade/pathogenicity.py
from contentbase.upgrader import upgrade_step @upgrade_step('pathogenicity', '1', '2') def pathogenicity_1_2(value, system): # https://github.com/ClinGen/clincoded/issues/1507 # Add affiliation property and update schema version return
Add affiliation property and update schema version
Add affiliation property and update schema version
Python
mit
ClinGen/clincoded,ClinGen/clincoded,ClinGen/clincoded,ClinGen/clincoded,ClinGen/clincoded
Add affiliation property and update schema version
from contentbase.upgrader import upgrade_step @upgrade_step('pathogenicity', '1', '2') def pathogenicity_1_2(value, system): # https://github.com/ClinGen/clincoded/issues/1507 # Add affiliation property and update schema version return
<commit_before><commit_msg>Add affiliation property and update schema version<commit_after>
from contentbase.upgrader import upgrade_step @upgrade_step('pathogenicity', '1', '2') def pathogenicity_1_2(value, system): # https://github.com/ClinGen/clincoded/issues/1507 # Add affiliation property and update schema version return
Add affiliation property and update schema versionfrom contentbase.upgrader import upgrade_step @upgrade_step('pathogenicity', '1', '2') def pathogenicity_1_2(value, system): # https://github.com/ClinGen/clincoded/issues/1507 # Add affiliation property and update schema version return
<commit_before><commit_msg>Add affiliation property and update schema version<commit_after>from contentbase.upgrader import upgrade_step @upgrade_step('pathogenicity', '1', '2') def pathogenicity_1_2(value, system): # https://github.com/ClinGen/clincoded/issues/1507 # Add affiliation property and update schem...
2355ebd04ed8b5c14c42966b71415ae638c50551
app/models/datastore_adapter.py
app/models/datastore_adapter.py
from flask_user import DBAdapter class DataStoreAdapter(DBAdapter): """ An Wrapper to be use by Flask User to interact with the database in this case, the DataStore """ def __init__(self, db, objMOdel): super().__init__(db, objMOdel) def get_object(self, ObjectClass, pk): """ Ret...
Create a datastore adapter to use by flask user
Create a datastore adapter to use by flask user
Python
mit
oldani/nanodegree-blog,oldani/nanodegree-blog,oldani/nanodegree-blog
Create a datastore adapter to use by flask user
from flask_user import DBAdapter class DataStoreAdapter(DBAdapter): """ An Wrapper to be use by Flask User to interact with the database in this case, the DataStore """ def __init__(self, db, objMOdel): super().__init__(db, objMOdel) def get_object(self, ObjectClass, pk): """ Ret...
<commit_before><commit_msg>Create a datastore adapter to use by flask user<commit_after>
from flask_user import DBAdapter class DataStoreAdapter(DBAdapter): """ An Wrapper to be use by Flask User to interact with the database in this case, the DataStore """ def __init__(self, db, objMOdel): super().__init__(db, objMOdel) def get_object(self, ObjectClass, pk): """ Ret...
Create a datastore adapter to use by flask userfrom flask_user import DBAdapter class DataStoreAdapter(DBAdapter): """ An Wrapper to be use by Flask User to interact with the database in this case, the DataStore """ def __init__(self, db, objMOdel): super().__init__(db, objMOdel) def get...
<commit_before><commit_msg>Create a datastore adapter to use by flask user<commit_after>from flask_user import DBAdapter class DataStoreAdapter(DBAdapter): """ An Wrapper to be use by Flask User to interact with the database in this case, the DataStore """ def __init__(self, db, objMOdel): su...
6d46c1beb8f5f916e3fb2e08d086e5b4167383be
ftfy/test_unicode.py
ftfy/test_unicode.py
# -*- coding: utf-8 -*- from ftfy import fix_bad_encoding, WINDOWS_1252_GREMLINS import unicodedata # Most single-character strings which have been misencoded should be restored. def test_all_bmp_characters(): for index in xrange(0xa0, 0xfffd): char = unichr(index) # Exclude code points that are no...
Move this test from metanl.
Move this test from metanl.
Python
mit
rspeer/python-ftfy
Move this test from metanl.
# -*- coding: utf-8 -*- from ftfy import fix_bad_encoding, WINDOWS_1252_GREMLINS import unicodedata # Most single-character strings which have been misencoded should be restored. def test_all_bmp_characters(): for index in xrange(0xa0, 0xfffd): char = unichr(index) # Exclude code points that are no...
<commit_before><commit_msg>Move this test from metanl.<commit_after>
# -*- coding: utf-8 -*- from ftfy import fix_bad_encoding, WINDOWS_1252_GREMLINS import unicodedata # Most single-character strings which have been misencoded should be restored. def test_all_bmp_characters(): for index in xrange(0xa0, 0xfffd): char = unichr(index) # Exclude code points that are no...
Move this test from metanl.# -*- coding: utf-8 -*- from ftfy import fix_bad_encoding, WINDOWS_1252_GREMLINS import unicodedata # Most single-character strings which have been misencoded should be restored. def test_all_bmp_characters(): for index in xrange(0xa0, 0xfffd): char = unichr(index) # Excl...
<commit_before><commit_msg>Move this test from metanl.<commit_after># -*- coding: utf-8 -*- from ftfy import fix_bad_encoding, WINDOWS_1252_GREMLINS import unicodedata # Most single-character strings which have been misencoded should be restored. def test_all_bmp_characters(): for index in xrange(0xa0, 0xfffd): ...
d07dfe5392a0ea9bde4bff174c4dc4e4fdba33be
tests/rest/client/v2_alpha/__init__.py
tests/rest/client/v2_alpha/__init__.py
# -*- coding: utf-8 -*- # Copyright 2015 OpenMarket Ltd # # 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 la...
Create (empty) v2_alpha REST tests directory
Create (empty) v2_alpha REST tests directory
Python
apache-2.0
rzr/synapse,TribeMedia/synapse,matrix-org/synapse,illicitonion/synapse,howethomas/synapse,howethomas/synapse,TribeMedia/synapse,howethomas/synapse,illicitonion/synapse,illicitonion/synapse,matrix-org/synapse,iot-factory/synapse,rzr/synapse,matrix-org/synapse,rzr/synapse,TribeMedia/synapse,iot-factory/synapse,matrix-org...
Create (empty) v2_alpha REST tests directory
# -*- coding: utf-8 -*- # Copyright 2015 OpenMarket Ltd # # 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 la...
<commit_before><commit_msg>Create (empty) v2_alpha REST tests directory<commit_after>
# -*- coding: utf-8 -*- # Copyright 2015 OpenMarket Ltd # # 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 la...
Create (empty) v2_alpha REST tests directory# -*- coding: utf-8 -*- # Copyright 2015 OpenMarket Ltd # # 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/LICE...
<commit_before><commit_msg>Create (empty) v2_alpha REST tests directory<commit_after># -*- coding: utf-8 -*- # Copyright 2015 OpenMarket Ltd # # 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 # ...
955856171a4d689d1db68eb46c17d6b3fe92c2fc
examples/halt_asset.py
examples/halt_asset.py
from grapheneapi.grapheneclient import GrapheneClient import json symbol = "TOKEN" class Config(): wallet_host = "localhost" wallet_port = 8092 wallet_user = "" wallet_password = "" ## no edits below this line ##################### perm = {} perm["charge_market_fee...
Halt an asset, prevent people from transfers and trading
[example] Halt an asset, prevent people from transfers and trading
Python
mit
xeroc/python-graphenelib
[example] Halt an asset, prevent people from transfers and trading
from grapheneapi.grapheneclient import GrapheneClient import json symbol = "TOKEN" class Config(): wallet_host = "localhost" wallet_port = 8092 wallet_user = "" wallet_password = "" ## no edits below this line ##################### perm = {} perm["charge_market_fee...
<commit_before><commit_msg>[example] Halt an asset, prevent people from transfers and trading<commit_after>
from grapheneapi.grapheneclient import GrapheneClient import json symbol = "TOKEN" class Config(): wallet_host = "localhost" wallet_port = 8092 wallet_user = "" wallet_password = "" ## no edits below this line ##################### perm = {} perm["charge_market_fee...
[example] Halt an asset, prevent people from transfers and tradingfrom grapheneapi.grapheneclient import GrapheneClient import json symbol = "TOKEN" class Config(): wallet_host = "localhost" wallet_port = 8092 wallet_user = "" wallet_password = "" ## no edits below...
<commit_before><commit_msg>[example] Halt an asset, prevent people from transfers and trading<commit_after>from grapheneapi.grapheneclient import GrapheneClient import json symbol = "TOKEN" class Config(): wallet_host = "localhost" wallet_port = 8092 wallet_user = "" wall...
801c8c7463811af88f232e23d8496180d7b413ad
python/extract_duplicate_sets.py
python/extract_duplicate_sets.py
""" Copyright 2016 Ronald J. Nowling 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, softw...
Add script for extracting duplicate sets from SOLR dump
Add script for extracting duplicate sets from SOLR dump
Python
apache-2.0
rnowling/article-deduplication,rnowling/article-deduplication
Add script for extracting duplicate sets from SOLR dump
""" Copyright 2016 Ronald J. Nowling 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, softw...
<commit_before><commit_msg>Add script for extracting duplicate sets from SOLR dump<commit_after>
""" Copyright 2016 Ronald J. Nowling 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, softw...
Add script for extracting duplicate sets from SOLR dump""" Copyright 2016 Ronald J. Nowling 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 re...
<commit_before><commit_msg>Add script for extracting duplicate sets from SOLR dump<commit_after>""" Copyright 2016 Ronald J. Nowling 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.a...
7a3e7365569c18c971db9698cd7cdd1a82756463
table.py
table.py
import csv class Table(): '''A Table is an object which represents a 2-dimensional CSV file. Both rows and columns can be accessed via their key as in a dictionary. This means that keys cannot appear as both a row and column label.''' def __init__(self, filename): self._internal_table = self.l...
Create Table object for representing phonetic inventory
Create Table object for representing phonetic inventory
Python
mit
kdelwat/LangEvolve,kdelwat/LangEvolve,kdelwat/LangEvolve
Create Table object for representing phonetic inventory
import csv class Table(): '''A Table is an object which represents a 2-dimensional CSV file. Both rows and columns can be accessed via their key as in a dictionary. This means that keys cannot appear as both a row and column label.''' def __init__(self, filename): self._internal_table = self.l...
<commit_before><commit_msg>Create Table object for representing phonetic inventory<commit_after>
import csv class Table(): '''A Table is an object which represents a 2-dimensional CSV file. Both rows and columns can be accessed via their key as in a dictionary. This means that keys cannot appear as both a row and column label.''' def __init__(self, filename): self._internal_table = self.l...
Create Table object for representing phonetic inventoryimport csv class Table(): '''A Table is an object which represents a 2-dimensional CSV file. Both rows and columns can be accessed via their key as in a dictionary. This means that keys cannot appear as both a row and column label.''' def __init__...
<commit_before><commit_msg>Create Table object for representing phonetic inventory<commit_after>import csv class Table(): '''A Table is an object which represents a 2-dimensional CSV file. Both rows and columns can be accessed via their key as in a dictionary. This means that keys cannot appear as both a r...
cdaeb420e0cd817ebf570d5eda46362f4c61c691
tests/chainer_tests/functions_tests/utils_tests/test_forget.py
tests/chainer_tests/functions_tests/utils_tests/test_forget.py
import unittest import numpy import chainer from chainer import functions from chainer import gradient_check from chainer import testing class TestForget(unittest.TestCase): def setUp(self): self.x = numpy.random.uniform(-1, 1, (3, 4)).astype(numpy.float32) self.y = numpy.random.uniform(-1, 1, ...
Add test for forget function
Add test for forget function
Python
mit
wkentaro/chainer,keisuke-umezawa/chainer,okuta/chainer,wkentaro/chainer,hvy/chainer,niboshi/chainer,hvy/chainer,niboshi/chainer,hvy/chainer,niboshi/chainer,kiyukuta/chainer,okuta/chainer,okuta/chainer,cupy/cupy,keisuke-umezawa/chainer,ronekko/chainer,ktnyt/chainer,jnishi/chainer,hvy/chainer,tkerola/chainer,keisuke-umez...
Add test for forget function
import unittest import numpy import chainer from chainer import functions from chainer import gradient_check from chainer import testing class TestForget(unittest.TestCase): def setUp(self): self.x = numpy.random.uniform(-1, 1, (3, 4)).astype(numpy.float32) self.y = numpy.random.uniform(-1, 1, ...
<commit_before><commit_msg>Add test for forget function<commit_after>
import unittest import numpy import chainer from chainer import functions from chainer import gradient_check from chainer import testing class TestForget(unittest.TestCase): def setUp(self): self.x = numpy.random.uniform(-1, 1, (3, 4)).astype(numpy.float32) self.y = numpy.random.uniform(-1, 1, ...
Add test for forget functionimport unittest import numpy import chainer from chainer import functions from chainer import gradient_check from chainer import testing class TestForget(unittest.TestCase): def setUp(self): self.x = numpy.random.uniform(-1, 1, (3, 4)).astype(numpy.float32) self.y = ...
<commit_before><commit_msg>Add test for forget function<commit_after>import unittest import numpy import chainer from chainer import functions from chainer import gradient_check from chainer import testing class TestForget(unittest.TestCase): def setUp(self): self.x = numpy.random.uniform(-1, 1, (3, 4)...
d01ad432080446d94028f3d1de76692354871a77
bin/change-version.py
bin/change-version.py
#!/usr/bin/env python import glob import shutil import sys def change(filename, oldversion, newversion): tempfile = filename + '.tmp' fi = open(filename, 'r') fo = open(tempfile, 'w') for line in fi: nl = line.replace(oldversion, newversion) fo.write(nl) fo.close() fi.close() ...
Add script to change versions of all components
Add script to change versions of all components
Python
apache-2.0
zafarella/PredictionIO,dszeto/incubator-predictionio,net-shell/PredictionIO,alex9311/PredictionIO,arudenko/PredictionIO,thiagoveras/PredictionIO,himanshudhami/PredictionIO,jasonchaffee/PredictionIO,akaash-nigam/PredictionIO,wangmiao1981/PredictionIO,jlegendary/PredictionIO,tuxdna/PredictionIO,thiagoveras/PredictionIO,m...
Add script to change versions of all components
#!/usr/bin/env python import glob import shutil import sys def change(filename, oldversion, newversion): tempfile = filename + '.tmp' fi = open(filename, 'r') fo = open(tempfile, 'w') for line in fi: nl = line.replace(oldversion, newversion) fo.write(nl) fo.close() fi.close() ...
<commit_before><commit_msg>Add script to change versions of all components<commit_after>
#!/usr/bin/env python import glob import shutil import sys def change(filename, oldversion, newversion): tempfile = filename + '.tmp' fi = open(filename, 'r') fo = open(tempfile, 'w') for line in fi: nl = line.replace(oldversion, newversion) fo.write(nl) fo.close() fi.close() ...
Add script to change versions of all components#!/usr/bin/env python import glob import shutil import sys def change(filename, oldversion, newversion): tempfile = filename + '.tmp' fi = open(filename, 'r') fo = open(tempfile, 'w') for line in fi: nl = line.replace(oldversion, newversion) ...
<commit_before><commit_msg>Add script to change versions of all components<commit_after>#!/usr/bin/env python import glob import shutil import sys def change(filename, oldversion, newversion): tempfile = filename + '.tmp' fi = open(filename, 'r') fo = open(tempfile, 'w') for line in fi: nl = l...
f3b57ef7713086a86f51a8ed98d52367b02c8959
project_fish/whats_fresh/test_models.py
project_fish/whats_fresh/test_models.py
from django.test import TestCase from django.conf import settings from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class ImageTestCase(TestCase): def setUp(self): # Set MEDIA ROOT to sample data for this test TEST_ROOT = os...
Make preparation model tests actually work
Make preparation model tests actually work
Python
apache-2.0
iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api
Make preparation model tests actually work
from django.test import TestCase from django.conf import settings from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class ImageTestCase(TestCase): def setUp(self): # Set MEDIA ROOT to sample data for this test TEST_ROOT = os...
<commit_before><commit_msg>Make preparation model tests actually work<commit_after>
from django.test import TestCase from django.conf import settings from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class ImageTestCase(TestCase): def setUp(self): # Set MEDIA ROOT to sample data for this test TEST_ROOT = os...
Make preparation model tests actually workfrom django.test import TestCase from django.conf import settings from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class ImageTestCase(TestCase): def setUp(self): # Set MEDIA ROOT to sample...
<commit_before><commit_msg>Make preparation model tests actually work<commit_after>from django.test import TestCase from django.conf import settings from whats_fresh.models import * from django.contrib.gis.db import models import os import time import sys import datetime class ImageTestCase(TestCase): def setUp(...
7106568947142b472498def88d8cef59dd296934
ureport/contacts/migrations/0006_auto_20151007_1358.py
ureport/contacts/migrations/0006_auto_20151007_1358.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.core.cache import cache def clear_contacts(apps, schema_editor): Contact = apps.get_model('contacts', 'Contact') # delete fetched contacts Contact.objects.all().delete() # clear redi...
Add migrations to clear current contacts objects, and their redis keys
Add migrations to clear current contacts objects, and their redis keys
Python
agpl-3.0
xkmato/ureport,auduaboki/ureport,Ilhasoft/ureport,eHealthAfrica/ureport,Ilhasoft/ureport,xkmato/ureport,eHealthAfrica/ureport,rapidpro/ureport,rapidpro/ureport,auduaboki/ureport,Ilhasoft/ureport,eHealthAfrica/ureport,rapidpro/ureport,auduaboki/ureport,Ilhasoft/ureport,rapidpro/ureport,xkmato/ureport
Add migrations to clear current contacts objects, and their redis keys
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.core.cache import cache def clear_contacts(apps, schema_editor): Contact = apps.get_model('contacts', 'Contact') # delete fetched contacts Contact.objects.all().delete() # clear redi...
<commit_before><commit_msg>Add migrations to clear current contacts objects, and their redis keys<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.core.cache import cache def clear_contacts(apps, schema_editor): Contact = apps.get_model('contacts', 'Contact') # delete fetched contacts Contact.objects.all().delete() # clear redi...
Add migrations to clear current contacts objects, and their redis keys# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.core.cache import cache def clear_contacts(apps, schema_editor): Contact = apps.get_model('contacts', 'Contact') # delete...
<commit_before><commit_msg>Add migrations to clear current contacts objects, and their redis keys<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.core.cache import cache def clear_contacts(apps, schema_editor): Contact = apps.get_m...
a2565d27a8fcfd4c1bfa414a39d7f90b99f5ece3
top40.py
top40.py
import click import requests url = 'http://ben-major.co.uk/labs/top40/api/singles/' response = requests.get(url) print response.json()
Print basic json chart on command line
Print basic json chart on command line
Python
mit
kevgathuku/top40,andela-kndungu/top40
Print basic json chart on command line
import click import requests url = 'http://ben-major.co.uk/labs/top40/api/singles/' response = requests.get(url) print response.json()
<commit_before><commit_msg>Print basic json chart on command line<commit_after>
import click import requests url = 'http://ben-major.co.uk/labs/top40/api/singles/' response = requests.get(url) print response.json()
Print basic json chart on command lineimport click import requests url = 'http://ben-major.co.uk/labs/top40/api/singles/' response = requests.get(url) print response.json()
<commit_before><commit_msg>Print basic json chart on command line<commit_after>import click import requests url = 'http://ben-major.co.uk/labs/top40/api/singles/' response = requests.get(url) print response.json()
1ba3c03e6e68596dd969980af2c07d1d90ba83f6
examples/scf/16-h2_scan.py
examples/scf/16-h2_scan.py
#!/usr/bin/env python ''' Scan H2 molecule dissociation curve. ''' import numpy from pyscf import scf from pyscf import gto ehf = [] dm = None for b in numpy.arange(0.7, 4.01, 0.1): mol = gto.M(atom=[["H", 0., 0., 0.], ["H", 0., 0., b ]], basis='ccpvdz', verbose=0) mf = scf.RHF(mol) ...
Add example of HF PES scanning
Add example of HF PES scanning
Python
apache-2.0
sunqm/pyscf,sunqm/pyscf,gkc1000/pyscf,gkc1000/pyscf,gkc1000/pyscf,gkc1000/pyscf,sunqm/pyscf,gkc1000/pyscf,sunqm/pyscf
Add example of HF PES scanning
#!/usr/bin/env python ''' Scan H2 molecule dissociation curve. ''' import numpy from pyscf import scf from pyscf import gto ehf = [] dm = None for b in numpy.arange(0.7, 4.01, 0.1): mol = gto.M(atom=[["H", 0., 0., 0.], ["H", 0., 0., b ]], basis='ccpvdz', verbose=0) mf = scf.RHF(mol) ...
<commit_before><commit_msg>Add example of HF PES scanning<commit_after>
#!/usr/bin/env python ''' Scan H2 molecule dissociation curve. ''' import numpy from pyscf import scf from pyscf import gto ehf = [] dm = None for b in numpy.arange(0.7, 4.01, 0.1): mol = gto.M(atom=[["H", 0., 0., 0.], ["H", 0., 0., b ]], basis='ccpvdz', verbose=0) mf = scf.RHF(mol) ...
Add example of HF PES scanning#!/usr/bin/env python ''' Scan H2 molecule dissociation curve. ''' import numpy from pyscf import scf from pyscf import gto ehf = [] dm = None for b in numpy.arange(0.7, 4.01, 0.1): mol = gto.M(atom=[["H", 0., 0., 0.], ["H", 0., 0., b ]], basis='ccpvdz', verbo...
<commit_before><commit_msg>Add example of HF PES scanning<commit_after>#!/usr/bin/env python ''' Scan H2 molecule dissociation curve. ''' import numpy from pyscf import scf from pyscf import gto ehf = [] dm = None for b in numpy.arange(0.7, 4.01, 0.1): mol = gto.M(atom=[["H", 0., 0., 0.], ...
442e141ba3695e32d19cb6a263c63a4d6c31de90
examples/todo_app/setup.py
examples/todo_app/setup.py
from distutils.core import setup import sys import os import shutil def tree(src): return [(root, map(lambda f: os.path.join(root, f), filter(lambda f: os.path.splitext(f)[1] != ".map", files))) for (root, dirs, files) in os.walk(os.path.normpath(src))] APP = ['index.py'] DATA_FILES = tree('assets') OPTIONS_OS...
Add py2app script to todos_app
Add py2app script to todos_app
Python
bsd-3-clause
shivaprsdv/pywebview,shivaprsdv/pywebview,r0x0r/pywebview,shivaprsdv/pywebview,r0x0r/pywebview,shivaprsdv/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview
Add py2app script to todos_app
from distutils.core import setup import sys import os import shutil def tree(src): return [(root, map(lambda f: os.path.join(root, f), filter(lambda f: os.path.splitext(f)[1] != ".map", files))) for (root, dirs, files) in os.walk(os.path.normpath(src))] APP = ['index.py'] DATA_FILES = tree('assets') OPTIONS_OS...
<commit_before><commit_msg>Add py2app script to todos_app<commit_after>
from distutils.core import setup import sys import os import shutil def tree(src): return [(root, map(lambda f: os.path.join(root, f), filter(lambda f: os.path.splitext(f)[1] != ".map", files))) for (root, dirs, files) in os.walk(os.path.normpath(src))] APP = ['index.py'] DATA_FILES = tree('assets') OPTIONS_OS...
Add py2app script to todos_appfrom distutils.core import setup import sys import os import shutil def tree(src): return [(root, map(lambda f: os.path.join(root, f), filter(lambda f: os.path.splitext(f)[1] != ".map", files))) for (root, dirs, files) in os.walk(os.path.normpath(src))] APP = ['index.py'] DATA_FIL...
<commit_before><commit_msg>Add py2app script to todos_app<commit_after>from distutils.core import setup import sys import os import shutil def tree(src): return [(root, map(lambda f: os.path.join(root, f), filter(lambda f: os.path.splitext(f)[1] != ".map", files))) for (root, dirs, files) in os.walk(os.path.norm...
d3bbdce883b2a3880970f1923367ca8498b34a8d
tempest/tests/services/compute/test_floating_ip_pools_client.py
tempest/tests/services/compute/test_floating_ip_pools_client.py
# Copyright 2015 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
Add unit test for floating_ip_pools_client
Add unit test for floating_ip_pools_client This patch adds unit test for floating_ip_pools_client. Change-Id: Iba1dc372867f70742b73b5f4502bb7e94e4dc312
Python
apache-2.0
bigswitch/tempest,izadorozhna/tempest,xbezdick/tempest,openstack/tempest,Tesora/tesora-tempest,LIS/lis-tempest,sebrandon1/tempest,vedujoshi/tempest,zsoltdudas/lis-tempest,cisco-openstack/tempest,masayukig/tempest,flyingfish007/tempest,tonyli71/tempest,masayukig/tempest,xbezdick/tempest,Tesora/tesora-tempest,openstack/t...
Add unit test for floating_ip_pools_client This patch adds unit test for floating_ip_pools_client. Change-Id: Iba1dc372867f70742b73b5f4502bb7e94e4dc312
# Copyright 2015 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
<commit_before><commit_msg>Add unit test for floating_ip_pools_client This patch adds unit test for floating_ip_pools_client. Change-Id: Iba1dc372867f70742b73b5f4502bb7e94e4dc312<commit_after>
# Copyright 2015 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
Add unit test for floating_ip_pools_client This patch adds unit test for floating_ip_pools_client. Change-Id: Iba1dc372867f70742b73b5f4502bb7e94e4dc312# Copyright 2015 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in...
<commit_before><commit_msg>Add unit test for floating_ip_pools_client This patch adds unit test for floating_ip_pools_client. Change-Id: Iba1dc372867f70742b73b5f4502bb7e94e4dc312<commit_after># Copyright 2015 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License");...
dd7d3f77b691922c44c489844b1f278d58a790f4
xorry.py
xorry.py
#!/usr/bin/python import optparse import sys def xorobfuscator(plaintext, keyid): '''XOR Operation on a plaintext using keyid''' encoded = "" for i in range(0, len(plaintext), len(keyid)): start = i end = i + len(keyid) for x, y in zip(plaintext[start:end], keyid): ...
Refactor code - PEP8 Style.
Refactor code - PEP8 Style.
Python
cc0-1.0
JohnTroony/Scriptology,JohnTroony/Scriptology,JohnTroony/Scriptology,JohnTroony/Scriptology,JohnTroony/Scriptology,JohnTroony/Scriptology
Refactor code - PEP8 Style.
#!/usr/bin/python import optparse import sys def xorobfuscator(plaintext, keyid): '''XOR Operation on a plaintext using keyid''' encoded = "" for i in range(0, len(plaintext), len(keyid)): start = i end = i + len(keyid) for x, y in zip(plaintext[start:end], keyid): ...
<commit_before><commit_msg>Refactor code - PEP8 Style.<commit_after>
#!/usr/bin/python import optparse import sys def xorobfuscator(plaintext, keyid): '''XOR Operation on a plaintext using keyid''' encoded = "" for i in range(0, len(plaintext), len(keyid)): start = i end = i + len(keyid) for x, y in zip(plaintext[start:end], keyid): ...
Refactor code - PEP8 Style.#!/usr/bin/python import optparse import sys def xorobfuscator(plaintext, keyid): '''XOR Operation on a plaintext using keyid''' encoded = "" for i in range(0, len(plaintext), len(keyid)): start = i end = i + len(keyid) for x, y in zip(plaintext[start...
<commit_before><commit_msg>Refactor code - PEP8 Style.<commit_after>#!/usr/bin/python import optparse import sys def xorobfuscator(plaintext, keyid): '''XOR Operation on a plaintext using keyid''' encoded = "" for i in range(0, len(plaintext), len(keyid)): start = i end = i + len(keyid)...
f367df8baa9deba3c361620f87c98eb88c2e234c
alerts/ldap_password_spray.py
alerts/ldap_password_spray.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
Add prototype LDAP password spray alert
Add prototype LDAP password spray alert
Python
mpl-2.0
mpurzynski/MozDef,mozilla/MozDef,mpurzynski/MozDef,mpurzynski/MozDef,mozilla/MozDef,jeffbryner/MozDef,jeffbryner/MozDef,jeffbryner/MozDef,mpurzynski/MozDef,mozilla/MozDef,jeffbryner/MozDef,mozilla/MozDef
Add prototype LDAP password spray alert
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
<commit_before><commit_msg>Add prototype LDAP password spray alert<commit_after>
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
Add prototype LDAP password spray alert#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alertta...
<commit_before><commit_msg>Add prototype LDAP password spray alert<commit_after>#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 20...
58a3c9e6cbddba664c1c89c6039d9cc72fac526f
grader/grader/test/test_new.py
grader/grader/test/test_new.py
import os import pytest import yaml def test_new_without_repo(parse_and_run): """Test vanilla assignment initialization """ path = parse_and_run(["init", "cpl"]) parse_and_run(["new", "assignment1"]) a_path = os.path.join(path, "assignments", "assignment1") gs_path = os.path.join(a_path, "gra...
Add some tests for new assignments
Add some tests for new assignments
Python
mit
redkyn/grader,grade-it/grader,redkyn/grader
Add some tests for new assignments
import os import pytest import yaml def test_new_without_repo(parse_and_run): """Test vanilla assignment initialization """ path = parse_and_run(["init", "cpl"]) parse_and_run(["new", "assignment1"]) a_path = os.path.join(path, "assignments", "assignment1") gs_path = os.path.join(a_path, "gra...
<commit_before><commit_msg>Add some tests for new assignments<commit_after>
import os import pytest import yaml def test_new_without_repo(parse_and_run): """Test vanilla assignment initialization """ path = parse_and_run(["init", "cpl"]) parse_and_run(["new", "assignment1"]) a_path = os.path.join(path, "assignments", "assignment1") gs_path = os.path.join(a_path, "gra...
Add some tests for new assignmentsimport os import pytest import yaml def test_new_without_repo(parse_and_run): """Test vanilla assignment initialization """ path = parse_and_run(["init", "cpl"]) parse_and_run(["new", "assignment1"]) a_path = os.path.join(path, "assignments", "assignment1") g...
<commit_before><commit_msg>Add some tests for new assignments<commit_after>import os import pytest import yaml def test_new_without_repo(parse_and_run): """Test vanilla assignment initialization """ path = parse_and_run(["init", "cpl"]) parse_and_run(["new", "assignment1"]) a_path = os.path.join(...
509d4f1e6d22a373cfa20944ef388f7155443d4a
monroe/api.py
monroe/api.py
from flask import Flask import monroe api = Flask(__name__) @api.route('/') def aping(): return 'v0.1' @api.route('/start') def start_monroe(): monroe.main()
ADD Flask based RESTful API
ADD Flask based RESTful API
Python
apache-2.0
ecelis/monroe
ADD Flask based RESTful API
from flask import Flask import monroe api = Flask(__name__) @api.route('/') def aping(): return 'v0.1' @api.route('/start') def start_monroe(): monroe.main()
<commit_before><commit_msg>ADD Flask based RESTful API<commit_after>
from flask import Flask import monroe api = Flask(__name__) @api.route('/') def aping(): return 'v0.1' @api.route('/start') def start_monroe(): monroe.main()
ADD Flask based RESTful APIfrom flask import Flask import monroe api = Flask(__name__) @api.route('/') def aping(): return 'v0.1' @api.route('/start') def start_monroe(): monroe.main()
<commit_before><commit_msg>ADD Flask based RESTful API<commit_after>from flask import Flask import monroe api = Flask(__name__) @api.route('/') def aping(): return 'v0.1' @api.route('/start') def start_monroe(): monroe.main()
ce43d38cccd44464b1c777e99af540133033a3fc
pygraphc/clustering/MaxCliquesPercolationSA.py
pygraphc/clustering/MaxCliquesPercolationSA.py
from MaxCliquesPercolation import MaxCliquesPercolationWeighted class MaxCliquesPercolationSA(MaxCliquesPercolationWeighted): def __init__(self, graph, edges_weight, nodes_id, k, threshold): super(MaxCliquesPercolationSA, self).__init__(graph, edges_weight, nodes_id, k, threshold) def get_maxcliques_...
Add file for maximal cliques percolation using sa
Add file for maximal cliques percolation using sa
Python
mit
studiawan/pygraphc
Add file for maximal cliques percolation using sa
from MaxCliquesPercolation import MaxCliquesPercolationWeighted class MaxCliquesPercolationSA(MaxCliquesPercolationWeighted): def __init__(self, graph, edges_weight, nodes_id, k, threshold): super(MaxCliquesPercolationSA, self).__init__(graph, edges_weight, nodes_id, k, threshold) def get_maxcliques_...
<commit_before><commit_msg>Add file for maximal cliques percolation using sa<commit_after>
from MaxCliquesPercolation import MaxCliquesPercolationWeighted class MaxCliquesPercolationSA(MaxCliquesPercolationWeighted): def __init__(self, graph, edges_weight, nodes_id, k, threshold): super(MaxCliquesPercolationSA, self).__init__(graph, edges_weight, nodes_id, k, threshold) def get_maxcliques_...
Add file for maximal cliques percolation using safrom MaxCliquesPercolation import MaxCliquesPercolationWeighted class MaxCliquesPercolationSA(MaxCliquesPercolationWeighted): def __init__(self, graph, edges_weight, nodes_id, k, threshold): super(MaxCliquesPercolationSA, self).__init__(graph, edges_weight,...
<commit_before><commit_msg>Add file for maximal cliques percolation using sa<commit_after>from MaxCliquesPercolation import MaxCliquesPercolationWeighted class MaxCliquesPercolationSA(MaxCliquesPercolationWeighted): def __init__(self, graph, edges_weight, nodes_id, k, threshold): super(MaxCliquesPercolati...
83f1dab96d5e9f82137dbe4142ed415a3e3e3f48
biobox_cli/biobox_file.py
biobox_cli/biobox_file.py
import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def get_biobox_file_contents(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): ...
import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def get_biobox_file_contents(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): ...
Remove no longer needed biobox_directory function
Remove no longer needed biobox_directory function
Python
mit
michaelbarton/command-line-interface,michaelbarton/command-line-interface,bioboxes/command-line-interface,bioboxes/command-line-interface
import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def get_biobox_file_contents(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): ...
import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def get_biobox_file_contents(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): ...
<commit_before>import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def get_biobox_file_contents(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_ar...
import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def get_biobox_file_contents(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): ...
import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def get_biobox_file_contents(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): ...
<commit_before>import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def get_biobox_file_contents(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_ar...
d5beeaa933b08f80ce2b0d8b56e022cd5b23397c
mysql_test.py
mysql_test.py
#!/usr/bin/env python # blogware - a python blogging system # Copyright (C) 2016-2017 izrik # # This file is a part of blogware. # # Blogware is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either vers...
Include a simple mysql connection diagnostic tool.
Include a simple mysql connection diagnostic tool.
Python
agpl-3.0
izrik/wikiware,izrik/blogware,izrik/wikiware,izrik/blogware,izrik/blogware,izrik/wikiware
Include a simple mysql connection diagnostic tool.
#!/usr/bin/env python # blogware - a python blogging system # Copyright (C) 2016-2017 izrik # # This file is a part of blogware. # # Blogware is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either vers...
<commit_before><commit_msg>Include a simple mysql connection diagnostic tool.<commit_after>
#!/usr/bin/env python # blogware - a python blogging system # Copyright (C) 2016-2017 izrik # # This file is a part of blogware. # # Blogware is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either vers...
Include a simple mysql connection diagnostic tool.#!/usr/bin/env python # blogware - a python blogging system # Copyright (C) 2016-2017 izrik # # This file is a part of blogware. # # Blogware is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publis...
<commit_before><commit_msg>Include a simple mysql connection diagnostic tool.<commit_after>#!/usr/bin/env python # blogware - a python blogging system # Copyright (C) 2016-2017 izrik # # This file is a part of blogware. # # Blogware is free software: you can redistribute it and/or modify # it under the terms of the GN...
8486d506ac619b2bb6caceb435c20047d7398603
stacked_generalization/example/joblibed_classification.py
stacked_generalization/example/joblibed_classification.py
import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) from sklearn import datasets from sklearn.cross_validation import StratifiedKFold from sklearn.ensemble import RandomForestClassifier from sklearn.utils.validation import check_random_state from stacked_g...
Add example of joblibed classifier
Add example of joblibed classifier
Python
apache-2.0
fukatani/stacked_generalization
Add example of joblibed classifier
import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) from sklearn import datasets from sklearn.cross_validation import StratifiedKFold from sklearn.ensemble import RandomForestClassifier from sklearn.utils.validation import check_random_state from stacked_g...
<commit_before><commit_msg>Add example of joblibed classifier<commit_after>
import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) from sklearn import datasets from sklearn.cross_validation import StratifiedKFold from sklearn.ensemble import RandomForestClassifier from sklearn.utils.validation import check_random_state from stacked_g...
Add example of joblibed classifierimport os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) from sklearn import datasets from sklearn.cross_validation import StratifiedKFold from sklearn.ensemble import RandomForestClassifier from sklearn.utils.validation import...
<commit_before><commit_msg>Add example of joblibed classifier<commit_after>import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) from sklearn import datasets from sklearn.cross_validation import StratifiedKFold from sklearn.ensemble import RandomForestClassi...
bdbbddf86a6137c1edf96ab8505611a4fc2ab30e
sunbrella.py
sunbrella.py
import urllib2 import json import yaml from os.path import expanduser, isfile import datetime from dateutil import parser from pytz import reference CACHE_PATH = expanduser('~/.sunbrella_cache.json') def get_cache(api_key, latitude, longitude): if isfile(CACHE_PATH): try: cache = json.load(op...
Make working cached API call
Make working cached API call Signed-off-by: Adam Obeng <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@binaryeagle.com>
Python
mit
adamobeng/sunbrella
Make working cached API call Signed-off-by: Adam Obeng <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@binaryeagle.com>
import urllib2 import json import yaml from os.path import expanduser, isfile import datetime from dateutil import parser from pytz import reference CACHE_PATH = expanduser('~/.sunbrella_cache.json') def get_cache(api_key, latitude, longitude): if isfile(CACHE_PATH): try: cache = json.load(op...
<commit_before><commit_msg>Make working cached API call Signed-off-by: Adam Obeng <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@binaryeagle.com><commit_after>
import urllib2 import json import yaml from os.path import expanduser, isfile import datetime from dateutil import parser from pytz import reference CACHE_PATH = expanduser('~/.sunbrella_cache.json') def get_cache(api_key, latitude, longitude): if isfile(CACHE_PATH): try: cache = json.load(op...
Make working cached API call Signed-off-by: Adam Obeng <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@binaryeagle.com>import urllib2 import json import yaml from os.path import expanduser, isfile import datetime from dateutil import parser from pytz import reference CACHE_PATH = expanduser('~/.sunbrella_cache.json') def...
<commit_before><commit_msg>Make working cached API call Signed-off-by: Adam Obeng <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@binaryeagle.com><commit_after>import urllib2 import json import yaml from os.path import expanduser, isfile import datetime from dateutil import parser from pytz import reference CACHE_PATH = ex...
82da46fd16b89839036195ce862167f98c880f1f
github2fedmsg/custom_openid.py
github2fedmsg/custom_openid.py
import velruse.api import velruse.providers.openid as vr from pyramid.security import NO_PERMISSION_REQUIRED def add_openid_login(config, realm, identity_provider): provider = SingleOpenIDConsumer( 'openid', 'openid', realm=realm, identity_provider=identity_provider, storage=None,...
Add forgotten custom openid plugin to velruse.
Add forgotten custom openid plugin to velruse.
Python
agpl-3.0
pombredanne/github2fedmsg,fedora-infra/github2fedmsg,pombredanne/github2fedmsg,fedora-infra/github2fedmsg
Add forgotten custom openid plugin to velruse.
import velruse.api import velruse.providers.openid as vr from pyramid.security import NO_PERMISSION_REQUIRED def add_openid_login(config, realm, identity_provider): provider = SingleOpenIDConsumer( 'openid', 'openid', realm=realm, identity_provider=identity_provider, storage=None,...
<commit_before><commit_msg>Add forgotten custom openid plugin to velruse.<commit_after>
import velruse.api import velruse.providers.openid as vr from pyramid.security import NO_PERMISSION_REQUIRED def add_openid_login(config, realm, identity_provider): provider = SingleOpenIDConsumer( 'openid', 'openid', realm=realm, identity_provider=identity_provider, storage=None,...
Add forgotten custom openid plugin to velruse.import velruse.api import velruse.providers.openid as vr from pyramid.security import NO_PERMISSION_REQUIRED def add_openid_login(config, realm, identity_provider): provider = SingleOpenIDConsumer( 'openid', 'openid', realm=realm, identity_pro...
<commit_before><commit_msg>Add forgotten custom openid plugin to velruse.<commit_after>import velruse.api import velruse.providers.openid as vr from pyramid.security import NO_PERMISSION_REQUIRED def add_openid_login(config, realm, identity_provider): provider = SingleOpenIDConsumer( 'openid', 'openid', ...
d5b155f51eb4b204e5812e8339579e9d91066103
configstore/tests/test_docker_secret.py
configstore/tests/test_docker_secret.py
import os from unittest import TestCase try: from unittest import mock except ImportError: import mock from configstore.backends.docker_secret import DockerSecretBackend from .test_data import DEFAULT_KEY, DEFAULT_VALUE, CUSTOM_PATH class TestDockerSecretBackend(TestCase): def test_get_secret(self): ...
Add unittests for docker_secret backend
Add unittests for docker_secret backend
Python
mit
caravancoop/configstore
Add unittests for docker_secret backend
import os from unittest import TestCase try: from unittest import mock except ImportError: import mock from configstore.backends.docker_secret import DockerSecretBackend from .test_data import DEFAULT_KEY, DEFAULT_VALUE, CUSTOM_PATH class TestDockerSecretBackend(TestCase): def test_get_secret(self): ...
<commit_before><commit_msg>Add unittests for docker_secret backend<commit_after>
import os from unittest import TestCase try: from unittest import mock except ImportError: import mock from configstore.backends.docker_secret import DockerSecretBackend from .test_data import DEFAULT_KEY, DEFAULT_VALUE, CUSTOM_PATH class TestDockerSecretBackend(TestCase): def test_get_secret(self): ...
Add unittests for docker_secret backendimport os from unittest import TestCase try: from unittest import mock except ImportError: import mock from configstore.backends.docker_secret import DockerSecretBackend from .test_data import DEFAULT_KEY, DEFAULT_VALUE, CUSTOM_PATH class TestDockerSecretBackend(TestCas...
<commit_before><commit_msg>Add unittests for docker_secret backend<commit_after>import os from unittest import TestCase try: from unittest import mock except ImportError: import mock from configstore.backends.docker_secret import DockerSecretBackend from .test_data import DEFAULT_KEY, DEFAULT_VALUE, CUSTOM_PAT...
bcb30dbad2f86781ddd1ee9f38b16c4d68ac57da
maxwellbloch/ob_solve.py
maxwellbloch/ob_solve.py
# -*- coding: utf-8 -*- import os import sys import json import qutip as qu from maxwellbloch import ob_atom # Main class OBSolve(object): """docstring for OBSolve""" def __init__(self, ob_atom={}, t_min=0.0, t_max=1.0, t_steps=100, method='mesolve', opts={}): self.build_ob...
Add OBSolve class and from_json methods
Add OBSolve class and from_json methods
Python
mit
tommyogden/maxwellbloch,tommyogden/maxwellbloch
Add OBSolve class and from_json methods
# -*- coding: utf-8 -*- import os import sys import json import qutip as qu from maxwellbloch import ob_atom # Main class OBSolve(object): """docstring for OBSolve""" def __init__(self, ob_atom={}, t_min=0.0, t_max=1.0, t_steps=100, method='mesolve', opts={}): self.build_ob...
<commit_before><commit_msg>Add OBSolve class and from_json methods<commit_after>
# -*- coding: utf-8 -*- import os import sys import json import qutip as qu from maxwellbloch import ob_atom # Main class OBSolve(object): """docstring for OBSolve""" def __init__(self, ob_atom={}, t_min=0.0, t_max=1.0, t_steps=100, method='mesolve', opts={}): self.build_ob...
Add OBSolve class and from_json methods# -*- coding: utf-8 -*- import os import sys import json import qutip as qu from maxwellbloch import ob_atom # Main class OBSolve(object): """docstring for OBSolve""" def __init__(self, ob_atom={}, t_min=0.0, t_max=1.0, t_steps=100, method='mesolve...
<commit_before><commit_msg>Add OBSolve class and from_json methods<commit_after># -*- coding: utf-8 -*- import os import sys import json import qutip as qu from maxwellbloch import ob_atom # Main class OBSolve(object): """docstring for OBSolve""" def __init__(self, ob_atom={}, t_min=0.0, t_max=1.0, t_ste...
1e3853c231facac6e590b66de8d9c2cc37e7f540
download_and_unzip_files.py
download_and_unzip_files.py
import os import datetime current_year = datetime.datetime.now().year years_with_data = range(2011, current_year + 1) remote_path = "https://ssl.netfile.com/pub2/excel/COAKBrowsable/" for year in years_with_data: print "Downloading " + str(year) + " data..." filename_for_year = "efile_newest_COAK_" + str(year) + ...
Add script to download and unzip files for all years
Add script to download and unzip files for all years
Python
bsd-3-clause
daguar/netfile-etl,daguar/netfile-etl
Add script to download and unzip files for all years
import os import datetime current_year = datetime.datetime.now().year years_with_data = range(2011, current_year + 1) remote_path = "https://ssl.netfile.com/pub2/excel/COAKBrowsable/" for year in years_with_data: print "Downloading " + str(year) + " data..." filename_for_year = "efile_newest_COAK_" + str(year) + ...
<commit_before><commit_msg>Add script to download and unzip files for all years<commit_after>
import os import datetime current_year = datetime.datetime.now().year years_with_data = range(2011, current_year + 1) remote_path = "https://ssl.netfile.com/pub2/excel/COAKBrowsable/" for year in years_with_data: print "Downloading " + str(year) + " data..." filename_for_year = "efile_newest_COAK_" + str(year) + ...
Add script to download and unzip files for all yearsimport os import datetime current_year = datetime.datetime.now().year years_with_data = range(2011, current_year + 1) remote_path = "https://ssl.netfile.com/pub2/excel/COAKBrowsable/" for year in years_with_data: print "Downloading " + str(year) + " data..." fil...
<commit_before><commit_msg>Add script to download and unzip files for all years<commit_after>import os import datetime current_year = datetime.datetime.now().year years_with_data = range(2011, current_year + 1) remote_path = "https://ssl.netfile.com/pub2/excel/COAKBrowsable/" for year in years_with_data: print "Dow...
97074e1bf452f12821058c035aca15c692092074
src/circus/module/set_metrics.py
src/circus/module/set_metrics.py
#!/usr/bin/env python __cmdname__ = 'set_metrics' __cmdopts__ = '' import re import sys import log import util class Module(object): def __init__(self, api, account): self.api = api self.account = account def command(self, opts, pattern, *metrics_to_enable): """Set the active metrics...
Set metrics command (regex based metric enabling)
Set metrics command (regex based metric enabling)
Python
isc
omniti-labs/circus,omniti-labs/circus
Set metrics command (regex based metric enabling)
#!/usr/bin/env python __cmdname__ = 'set_metrics' __cmdopts__ = '' import re import sys import log import util class Module(object): def __init__(self, api, account): self.api = api self.account = account def command(self, opts, pattern, *metrics_to_enable): """Set the active metrics...
<commit_before><commit_msg>Set metrics command (regex based metric enabling)<commit_after>
#!/usr/bin/env python __cmdname__ = 'set_metrics' __cmdopts__ = '' import re import sys import log import util class Module(object): def __init__(self, api, account): self.api = api self.account = account def command(self, opts, pattern, *metrics_to_enable): """Set the active metrics...
Set metrics command (regex based metric enabling)#!/usr/bin/env python __cmdname__ = 'set_metrics' __cmdopts__ = '' import re import sys import log import util class Module(object): def __init__(self, api, account): self.api = api self.account = account def command(self, opts, pattern, *metr...
<commit_before><commit_msg>Set metrics command (regex based metric enabling)<commit_after>#!/usr/bin/env python __cmdname__ = 'set_metrics' __cmdopts__ = '' import re import sys import log import util class Module(object): def __init__(self, api, account): self.api = api self.account = account ...
5535fa4d9c5b70347bf16931887e3c5141698e31
languages/python/linux-info.py
languages/python/linux-info.py
#!/usr/bin/env python # # Print information about the current computer. # import os import re from socket import gethostname from platform import linux_distribution def gethost(): '''Extract host name''' try: return gethostname() except: return "NA" def processor(): '''Extract first pr...
Add python script to print Linux information.
Add python script to print Linux information.
Python
apache-2.0
sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-o...
Add python script to print Linux information.
#!/usr/bin/env python # # Print information about the current computer. # import os import re from socket import gethostname from platform import linux_distribution def gethost(): '''Extract host name''' try: return gethostname() except: return "NA" def processor(): '''Extract first pr...
<commit_before><commit_msg>Add python script to print Linux information.<commit_after>
#!/usr/bin/env python # # Print information about the current computer. # import os import re from socket import gethostname from platform import linux_distribution def gethost(): '''Extract host name''' try: return gethostname() except: return "NA" def processor(): '''Extract first pr...
Add python script to print Linux information.#!/usr/bin/env python # # Print information about the current computer. # import os import re from socket import gethostname from platform import linux_distribution def gethost(): '''Extract host name''' try: return gethostname() except: return "...
<commit_before><commit_msg>Add python script to print Linux information.<commit_after>#!/usr/bin/env python # # Print information about the current computer. # import os import re from socket import gethostname from platform import linux_distribution def gethost(): '''Extract host name''' try: return g...
05dd74f3721cb1997f45e3931d50329473b62df3
web/users/migrations/0003_alter_user.py
web/users/migrations/0003_alter_user.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.core.validators import django.contrib.auth.models class Migration(migrations.Migration): dependencies = [ ('users', '0002_auto_20150814_0805'), ] operations = [ migrati...
Add a migration for users.User model
Add a migration for users.User model
Python
agpl-3.0
matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo
Add a migration for users.User model
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.core.validators import django.contrib.auth.models class Migration(migrations.Migration): dependencies = [ ('users', '0002_auto_20150814_0805'), ] operations = [ migrati...
<commit_before><commit_msg>Add a migration for users.User model<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.core.validators import django.contrib.auth.models class Migration(migrations.Migration): dependencies = [ ('users', '0002_auto_20150814_0805'), ] operations = [ migrati...
Add a migration for users.User model# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.core.validators import django.contrib.auth.models class Migration(migrations.Migration): dependencies = [ ('users', '0002_auto_20150814_0805'), ]...
<commit_before><commit_msg>Add a migration for users.User model<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.core.validators import django.contrib.auth.models class Migration(migrations.Migration): dependencies = [ ('...
d216f2c2f6f6a8e94dbe0c79dafe03f1a4f9a886
tests/test_rest_track_history.py
tests/test_rest_track_history.py
""" .. Copyright 2017 EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applic...
Test for ensuring that the history functions are able to return
Test for ensuring that the history functions are able to return
Python
apache-2.0
Multiscale-Genomics/mg-rest-dm
Test for ensuring that the history functions are able to return
""" .. Copyright 2017 EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applic...
<commit_before><commit_msg>Test for ensuring that the history functions are able to return<commit_after>
""" .. Copyright 2017 EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applic...
Test for ensuring that the history functions are able to return""" .. Copyright 2017 EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://ww...
<commit_before><commit_msg>Test for ensuring that the history functions are able to return<commit_after>""" .. Copyright 2017 EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a...
e095cbdc5f6c74b54a518131692d5ab993c4fc9c
repo_to_submodule.py
repo_to_submodule.py
#!/usr/bin/python import os import sys import xml.etree.ElementTree as ET from termcolor import colored def repo_to_submodule(superproject): # FIXME remove this line os.system("rm " + superproject + " -rf") os.mkdir(superproject) MANIFEST_XML = "manifest.xml" # 1. Create a manifest from repo ...
Create a git superproject and add submodules
Create a git superproject and add submodules It does the following in order: 1. Generate a manifest.xml for repo 2. Create a git superproject 3. Add repo project as git submodules
Python
apache-2.0
clarkli86/repo_to_submodule
Create a git superproject and add submodules It does the following in order: 1. Generate a manifest.xml for repo 2. Create a git superproject 3. Add repo project as git submodules
#!/usr/bin/python import os import sys import xml.etree.ElementTree as ET from termcolor import colored def repo_to_submodule(superproject): # FIXME remove this line os.system("rm " + superproject + " -rf") os.mkdir(superproject) MANIFEST_XML = "manifest.xml" # 1. Create a manifest from repo ...
<commit_before><commit_msg>Create a git superproject and add submodules It does the following in order: 1. Generate a manifest.xml for repo 2. Create a git superproject 3. Add repo project as git submodules<commit_after>
#!/usr/bin/python import os import sys import xml.etree.ElementTree as ET from termcolor import colored def repo_to_submodule(superproject): # FIXME remove this line os.system("rm " + superproject + " -rf") os.mkdir(superproject) MANIFEST_XML = "manifest.xml" # 1. Create a manifest from repo ...
Create a git superproject and add submodules It does the following in order: 1. Generate a manifest.xml for repo 2. Create a git superproject 3. Add repo project as git submodules#!/usr/bin/python import os import sys import xml.etree.ElementTree as ET from termcolor import colored def repo_to_submodule(superproject...
<commit_before><commit_msg>Create a git superproject and add submodules It does the following in order: 1. Generate a manifest.xml for repo 2. Create a git superproject 3. Add repo project as git submodules<commit_after>#!/usr/bin/python import os import sys import xml.etree.ElementTree as ET from termcolor import co...
077699976adb8a6a25f5cb8c4ff3cbb1ae95440c
tools/database_dump_converter.py
tools/database_dump_converter.py
from sys import argv from xml.dom.minidom import parse from base64 import b64decode def Escape(text): text = text.replace('\\', '\\\\') for sample, replace in {'\'': '\\\'', '"': '\\"', '\n': '\\n', '\r': '\\r', '\x00': '\\0', '\x1a': '\\Z'}.iteritems(): text = text.replace(sample, replace); return text if len(...
Add database dump convert tool.
Add database dump convert tool.
Python
mit
thewizardplusplus/wizard-diary,thewizardplusplus/wizard-diary,thewizardplusplus/wizard-diary,thewizardplusplus/wizard-diary,thewizardplusplus/wizard-diary
Add database dump convert tool.
from sys import argv from xml.dom.minidom import parse from base64 import b64decode def Escape(text): text = text.replace('\\', '\\\\') for sample, replace in {'\'': '\\\'', '"': '\\"', '\n': '\\n', '\r': '\\r', '\x00': '\\0', '\x1a': '\\Z'}.iteritems(): text = text.replace(sample, replace); return text if len(...
<commit_before><commit_msg>Add database dump convert tool.<commit_after>
from sys import argv from xml.dom.minidom import parse from base64 import b64decode def Escape(text): text = text.replace('\\', '\\\\') for sample, replace in {'\'': '\\\'', '"': '\\"', '\n': '\\n', '\r': '\\r', '\x00': '\\0', '\x1a': '\\Z'}.iteritems(): text = text.replace(sample, replace); return text if len(...
Add database dump convert tool.from sys import argv from xml.dom.minidom import parse from base64 import b64decode def Escape(text): text = text.replace('\\', '\\\\') for sample, replace in {'\'': '\\\'', '"': '\\"', '\n': '\\n', '\r': '\\r', '\x00': '\\0', '\x1a': '\\Z'}.iteritems(): text = text.replace(sample, r...
<commit_before><commit_msg>Add database dump convert tool.<commit_after>from sys import argv from xml.dom.minidom import parse from base64 import b64decode def Escape(text): text = text.replace('\\', '\\\\') for sample, replace in {'\'': '\\\'', '"': '\\"', '\n': '\\n', '\r': '\\r', '\x00': '\\0', '\x1a': '\\Z'}.ite...
87818a138408752217d6a90041db5273116db228
python/opencv/opencv_2/image_precessing/hough_circle_transform.py
python/opencv/opencv_2/image_precessing/hough_circle_transform.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ OpenCV - Hough Circle Transform: find circles in an image. Required: opencv library (Debian: aptitude install python-opencv) See: https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_imgpr...
Add a snippet (Python OpenCV).
Add a snippet (Python OpenCV).
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 snippet (Python OpenCV).
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ OpenCV - Hough Circle Transform: find circles in an image. Required: opencv library (Debian: aptitude install python-opencv) See: https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_imgpr...
<commit_before><commit_msg>Add a snippet (Python OpenCV).<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ OpenCV - Hough Circle Transform: find circles in an image. Required: opencv library (Debian: aptitude install python-opencv) See: https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_imgpr...
Add a snippet (Python OpenCV).#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ OpenCV - Hough Circle Transform: find circles in an image. Required: opencv library (Debian: aptitude install python-opencv) See: https://opencv-python-tutroals.readthedocs.org/e...
<commit_before><commit_msg>Add a snippet (Python OpenCV).<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ OpenCV - Hough Circle Transform: find circles in an image. Required: opencv library (Debian: aptitude install python-opencv) See: https:/...
042844d918d34a16f18ea9ab2c09694e81c25623
bluebottle/categories/migrations/0008_authenticated-permissions.py
bluebottle/categories/migrations/0008_authenticated-permissions.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-02-22 08:58 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_group_permissions(apps, schema_editor): group_perms = { 'Authenticated': { 'pe...
Add read categories permission to authenticated users
Add read categories permission to authenticated users
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
Add read categories permission to authenticated users
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-02-22 08:58 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_group_permissions(apps, schema_editor): group_perms = { 'Authenticated': { 'pe...
<commit_before><commit_msg>Add read categories permission to authenticated users<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-02-22 08:58 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_group_permissions(apps, schema_editor): group_perms = { 'Authenticated': { 'pe...
Add read categories permission to authenticated users# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-02-22 08:58 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_group_permissions(apps, schema_editor): group...
<commit_before><commit_msg>Add read categories permission to authenticated users<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-02-22 08:58 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_group_pe...
388ca425168572cbcbaa3638d78e5f9933380fb7
tests/test_config.py
tests/test_config.py
import logging import socket import pytest from uvicorn import protocols from uvicorn.config import Config from uvicorn.middleware.debug import DebugMiddleware from uvicorn.middleware.wsgi import WSGIMiddleware async def asgi_app(): pass def wsgi_app(): pass def test_debug_app(): config = Config(app...
Add tests for most of Config class
Add tests for most of Config class
Python
bsd-3-clause
encode/uvicorn,encode/uvicorn
Add tests for most of Config class
import logging import socket import pytest from uvicorn import protocols from uvicorn.config import Config from uvicorn.middleware.debug import DebugMiddleware from uvicorn.middleware.wsgi import WSGIMiddleware async def asgi_app(): pass def wsgi_app(): pass def test_debug_app(): config = Config(app...
<commit_before><commit_msg>Add tests for most of Config class<commit_after>
import logging import socket import pytest from uvicorn import protocols from uvicorn.config import Config from uvicorn.middleware.debug import DebugMiddleware from uvicorn.middleware.wsgi import WSGIMiddleware async def asgi_app(): pass def wsgi_app(): pass def test_debug_app(): config = Config(app...
Add tests for most of Config classimport logging import socket import pytest from uvicorn import protocols from uvicorn.config import Config from uvicorn.middleware.debug import DebugMiddleware from uvicorn.middleware.wsgi import WSGIMiddleware async def asgi_app(): pass def wsgi_app(): pass def test_de...
<commit_before><commit_msg>Add tests for most of Config class<commit_after>import logging import socket import pytest from uvicorn import protocols from uvicorn.config import Config from uvicorn.middleware.debug import DebugMiddleware from uvicorn.middleware.wsgi import WSGIMiddleware async def asgi_app(): pass...
41f6dd8259a8e56a157930e809426f5e0e8113eb
tests/test_config.py
tests/test_config.py
# -*- coding: utf-8 -*- from __future__ import print_function import os import binascii import shutil import tempfile from timebook.config import parse_config def test_parse_config(capsys): seed = binascii.hexlify(os.urandom(4)) fname = os.path.join(tempfile.gettempdir(), 'test-%s' % seed, 'test_timebook_con...
Add config file parse test
Add config file parse test Increases coverage to 73% on Python 2.x and 74% on Python 3.x.
Python
mit
imiric/timebook
Add config file parse test Increases coverage to 73% on Python 2.x and 74% on Python 3.x.
# -*- coding: utf-8 -*- from __future__ import print_function import os import binascii import shutil import tempfile from timebook.config import parse_config def test_parse_config(capsys): seed = binascii.hexlify(os.urandom(4)) fname = os.path.join(tempfile.gettempdir(), 'test-%s' % seed, 'test_timebook_con...
<commit_before><commit_msg>Add config file parse test Increases coverage to 73% on Python 2.x and 74% on Python 3.x.<commit_after>
# -*- coding: utf-8 -*- from __future__ import print_function import os import binascii import shutil import tempfile from timebook.config import parse_config def test_parse_config(capsys): seed = binascii.hexlify(os.urandom(4)) fname = os.path.join(tempfile.gettempdir(), 'test-%s' % seed, 'test_timebook_con...
Add config file parse test Increases coverage to 73% on Python 2.x and 74% on Python 3.x.# -*- coding: utf-8 -*- from __future__ import print_function import os import binascii import shutil import tempfile from timebook.config import parse_config def test_parse_config(capsys): seed = binascii.hexlify(os.urando...
<commit_before><commit_msg>Add config file parse test Increases coverage to 73% on Python 2.x and 74% on Python 3.x.<commit_after># -*- coding: utf-8 -*- from __future__ import print_function import os import binascii import shutil import tempfile from timebook.config import parse_config def test_parse_config(capsy...
de44f28e266a9e8a730030029d47d6a262e7cf3c
utils/h5tobigfile.py
utils/h5tobigfile.py
import h5py import bigfile import logging import argparse ap = argparse.ArgumentParser('h5tobigfile') ap.add_argument("hdf5") ap.add_argument("bigfile") ap.add_argument("--verify", action='store_true', default=False) ap.add_argument("--include", action="append") ap.add_argument("--exclude", action="append") def trave...
Add a tool to convert hdf5 to bigfile.
Add a tool to convert hdf5 to bigfile. This shall work for a lot of cases but not all. It's incomplete.
Python
bsd-2-clause
rainwoodman/bigfile,rainwoodman/bigfile,rainwoodman/bigfile
Add a tool to convert hdf5 to bigfile. This shall work for a lot of cases but not all. It's incomplete.
import h5py import bigfile import logging import argparse ap = argparse.ArgumentParser('h5tobigfile') ap.add_argument("hdf5") ap.add_argument("bigfile") ap.add_argument("--verify", action='store_true', default=False) ap.add_argument("--include", action="append") ap.add_argument("--exclude", action="append") def trave...
<commit_before><commit_msg>Add a tool to convert hdf5 to bigfile. This shall work for a lot of cases but not all. It's incomplete.<commit_after>
import h5py import bigfile import logging import argparse ap = argparse.ArgumentParser('h5tobigfile') ap.add_argument("hdf5") ap.add_argument("bigfile") ap.add_argument("--verify", action='store_true', default=False) ap.add_argument("--include", action="append") ap.add_argument("--exclude", action="append") def trave...
Add a tool to convert hdf5 to bigfile. This shall work for a lot of cases but not all. It's incomplete.import h5py import bigfile import logging import argparse ap = argparse.ArgumentParser('h5tobigfile') ap.add_argument("hdf5") ap.add_argument("bigfile") ap.add_argument("--verify", action='store_true', default=False...
<commit_before><commit_msg>Add a tool to convert hdf5 to bigfile. This shall work for a lot of cases but not all. It's incomplete.<commit_after>import h5py import bigfile import logging import argparse ap = argparse.ArgumentParser('h5tobigfile') ap.add_argument("hdf5") ap.add_argument("bigfile") ap.add_argument("--ve...
6b4489e9e0362b75433f8a75fcfd041bab4e8a08
problem_3/solution2.py
problem_3/solution2.py
roots = []; product = 1; x = 2; n = 600851475143; y = n; while product != n: while (y % x == 0): roots.append(x) y /= x product *= roots[-1] x += 1 print max(roots)
Add a second python implementation for problem 3
Add a second python implementation for problem 3
Python
mit
mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler
Add a second python implementation for problem 3
roots = []; product = 1; x = 2; n = 600851475143; y = n; while product != n: while (y % x == 0): roots.append(x) y /= x product *= roots[-1] x += 1 print max(roots)
<commit_before><commit_msg>Add a second python implementation for problem 3<commit_after>
roots = []; product = 1; x = 2; n = 600851475143; y = n; while product != n: while (y % x == 0): roots.append(x) y /= x product *= roots[-1] x += 1 print max(roots)
Add a second python implementation for problem 3roots = []; product = 1; x = 2; n = 600851475143; y = n; while product != n: while (y % x == 0): roots.append(x) y /= x product *= roots[-1] x += 1 print max(roots)
<commit_before><commit_msg>Add a second python implementation for problem 3<commit_after>roots = []; product = 1; x = 2; n = 600851475143; y = n; while product != n: while (y % x == 0): roots.append(x) y /= x product *= roots[-1] x += 1 print max(roots)
a4f9f724e1a9b292abd9df46293d14759b864dc4
Send_Stack.py
Send_Stack.py
__author__ = 'ayost' import os import re import sys from time import sleep import boto.cloudformation import boto.cloudformation.stack SCRIPT_LOCATION = os.path.abspath(os.path.dirname(sys.argv[0])) def send(stacks): regions = [] for r in boto.cloudformation.regions(): regions.append(r.name.upper())...
Build stacks, wait for completion, show status of each
Build stacks, wait for completion, show status of each
Python
apache-2.0
careerbuilder/CloudSeed,careerbuilder/CloudSeed,careerbuilder/CloudSeed,careerbuilder/CloudSeed
Build stacks, wait for completion, show status of each
__author__ = 'ayost' import os import re import sys from time import sleep import boto.cloudformation import boto.cloudformation.stack SCRIPT_LOCATION = os.path.abspath(os.path.dirname(sys.argv[0])) def send(stacks): regions = [] for r in boto.cloudformation.regions(): regions.append(r.name.upper())...
<commit_before><commit_msg>Build stacks, wait for completion, show status of each<commit_after>
__author__ = 'ayost' import os import re import sys from time import sleep import boto.cloudformation import boto.cloudformation.stack SCRIPT_LOCATION = os.path.abspath(os.path.dirname(sys.argv[0])) def send(stacks): regions = [] for r in boto.cloudformation.regions(): regions.append(r.name.upper())...
Build stacks, wait for completion, show status of each__author__ = 'ayost' import os import re import sys from time import sleep import boto.cloudformation import boto.cloudformation.stack SCRIPT_LOCATION = os.path.abspath(os.path.dirname(sys.argv[0])) def send(stacks): regions = [] for r in boto.cloudforma...
<commit_before><commit_msg>Build stacks, wait for completion, show status of each<commit_after>__author__ = 'ayost' import os import re import sys from time import sleep import boto.cloudformation import boto.cloudformation.stack SCRIPT_LOCATION = os.path.abspath(os.path.dirname(sys.argv[0])) def send(stacks): ...
258bf91456db1f9c5c2b90bfdaf32a4af13de7df
states/common/bootstrap/bootstrap.dir/modules/utils/salt_output.py
states/common/bootstrap/bootstrap.dir/modules/utils/salt_output.py
#!/usr/bin/env python # import sys import yaml import logging ############################################################################### def load_yaml_data(file_path): """ Load YAML formated data from file_path. """ with open(file_path, 'r') as yaml_file: loaded_data = yaml.load(yaml_...
Add initial version of Salt output analyzer script
Add initial version of Salt output analyzer script
Python
apache-2.0
uvsmtid/common-salt-states,uvsmtid/common-salt-states,uvsmtid/common-salt-states,uvsmtid/common-salt-states
Add initial version of Salt output analyzer script
#!/usr/bin/env python # import sys import yaml import logging ############################################################################### def load_yaml_data(file_path): """ Load YAML formated data from file_path. """ with open(file_path, 'r') as yaml_file: loaded_data = yaml.load(yaml_...
<commit_before><commit_msg>Add initial version of Salt output analyzer script<commit_after>
#!/usr/bin/env python # import sys import yaml import logging ############################################################################### def load_yaml_data(file_path): """ Load YAML formated data from file_path. """ with open(file_path, 'r') as yaml_file: loaded_data = yaml.load(yaml_...
Add initial version of Salt output analyzer script#!/usr/bin/env python # import sys import yaml import logging ############################################################################### def load_yaml_data(file_path): """ Load YAML formated data from file_path. """ with open(file_path, 'r') a...
<commit_before><commit_msg>Add initial version of Salt output analyzer script<commit_after>#!/usr/bin/env python # import sys import yaml import logging ############################################################################### def load_yaml_data(file_path): """ Load YAML formated data from file_path....
91f90d5edd89a10cb652af001d6c076fdcf557d8
chapter3/collatzSequence.py
chapter3/collatzSequence.py
# Collatz Sequence practice project from Automate Boring Stuff - Chapter 3 # https://automatetheboringstuff.com/chapter3/ def collatz(number): if number%2==0: print(number//2) return number//2 else: output = 3*number+1 print(output) return output print("Enter a number") try: inputNumber = int(input()) r...
Add solution to chapter-3 collatzsequence
Add solution to chapter-3 collatzsequence
Python
mit
anirudhvarma12/learning-python
Add solution to chapter-3 collatzsequence
# Collatz Sequence practice project from Automate Boring Stuff - Chapter 3 # https://automatetheboringstuff.com/chapter3/ def collatz(number): if number%2==0: print(number//2) return number//2 else: output = 3*number+1 print(output) return output print("Enter a number") try: inputNumber = int(input()) r...
<commit_before><commit_msg>Add solution to chapter-3 collatzsequence<commit_after>
# Collatz Sequence practice project from Automate Boring Stuff - Chapter 3 # https://automatetheboringstuff.com/chapter3/ def collatz(number): if number%2==0: print(number//2) return number//2 else: output = 3*number+1 print(output) return output print("Enter a number") try: inputNumber = int(input()) r...
Add solution to chapter-3 collatzsequence# Collatz Sequence practice project from Automate Boring Stuff - Chapter 3 # https://automatetheboringstuff.com/chapter3/ def collatz(number): if number%2==0: print(number//2) return number//2 else: output = 3*number+1 print(output) return output print("Enter a num...
<commit_before><commit_msg>Add solution to chapter-3 collatzsequence<commit_after># Collatz Sequence practice project from Automate Boring Stuff - Chapter 3 # https://automatetheboringstuff.com/chapter3/ def collatz(number): if number%2==0: print(number//2) return number//2 else: output = 3*number+1 print(ou...
bb3fa58481d58ac7fe9a55e7fabd2b37ce9df7ac
tests/test_android.py
tests/test_android.py
# MIT licensed # Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al. import pytest pytestmark = pytest.mark.asyncio async def test_android_addon(get_version): assert await get_version("android-google-play-apk-expansion", {"android_sdk": "extras;google;market_apk_expansion", "repo": "addon"}) == "1.r03" ...
Add tests for Android SDK packages
Add tests for Android SDK packages
Python
mit
lilydjwg/nvchecker
Add tests for Android SDK packages
# MIT licensed # Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al. import pytest pytestmark = pytest.mark.asyncio async def test_android_addon(get_version): assert await get_version("android-google-play-apk-expansion", {"android_sdk": "extras;google;market_apk_expansion", "repo": "addon"}) == "1.r03" ...
<commit_before><commit_msg>Add tests for Android SDK packages<commit_after>
# MIT licensed # Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al. import pytest pytestmark = pytest.mark.asyncio async def test_android_addon(get_version): assert await get_version("android-google-play-apk-expansion", {"android_sdk": "extras;google;market_apk_expansion", "repo": "addon"}) == "1.r03" ...
Add tests for Android SDK packages# MIT licensed # Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al. import pytest pytestmark = pytest.mark.asyncio async def test_android_addon(get_version): assert await get_version("android-google-play-apk-expansion", {"android_sdk": "extras;google;market_apk_expansi...
<commit_before><commit_msg>Add tests for Android SDK packages<commit_after># MIT licensed # Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al. import pytest pytestmark = pytest.mark.asyncio async def test_android_addon(get_version): assert await get_version("android-google-play-apk-expansion", {"androi...
e084f83aea9c89b5fff0289dedf7bd6cd7434dcf
firecares/firestation/management/commands/update-erf-areas.py
firecares/firestation/management/commands/update-erf-areas.py
import os import argparse from django.core.management.base import BaseCommand from firecares.firestation.models import FireDepartment from firecares.tasks.update import update_parcel_department_effectivefirefighting_rollup class Command(BaseCommand): help = """Updates the Effective Response Force (ERF) areas for t...
Add django command for updating ERF areas
Add django command for updating ERF areas
Python
mit
FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,FireCARES/firecares
Add django command for updating ERF areas
import os import argparse from django.core.management.base import BaseCommand from firecares.firestation.models import FireDepartment from firecares.tasks.update import update_parcel_department_effectivefirefighting_rollup class Command(BaseCommand): help = """Updates the Effective Response Force (ERF) areas for t...
<commit_before><commit_msg>Add django command for updating ERF areas<commit_after>
import os import argparse from django.core.management.base import BaseCommand from firecares.firestation.models import FireDepartment from firecares.tasks.update import update_parcel_department_effectivefirefighting_rollup class Command(BaseCommand): help = """Updates the Effective Response Force (ERF) areas for t...
Add django command for updating ERF areasimport os import argparse from django.core.management.base import BaseCommand from firecares.firestation.models import FireDepartment from firecares.tasks.update import update_parcel_department_effectivefirefighting_rollup class Command(BaseCommand): help = """Updates the E...
<commit_before><commit_msg>Add django command for updating ERF areas<commit_after>import os import argparse from django.core.management.base import BaseCommand from firecares.firestation.models import FireDepartment from firecares.tasks.update import update_parcel_department_effectivefirefighting_rollup class Command(...
1293b101683462225f7c5f150b3c98767d032639
app/models.py
app/models.py
# models.py # # Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph> # Licensed under MIT # Version 0.0.0 from app import db from slugify import slugify class Crop(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(80), unique=False) crop_type = db.Column(db.String(80)...
Create crop and region model
Create crop and region model
Python
mit
ecsnavarretemit/sarai-interactive-maps-backend,ecsnavarretemit/sarai-interactive-maps-backend
Create crop and region model
# models.py # # Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph> # Licensed under MIT # Version 0.0.0 from app import db from slugify import slugify class Crop(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(80), unique=False) crop_type = db.Column(db.String(80)...
<commit_before><commit_msg>Create crop and region model<commit_after>
# models.py # # Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph> # Licensed under MIT # Version 0.0.0 from app import db from slugify import slugify class Crop(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(80), unique=False) crop_type = db.Column(db.String(80)...
Create crop and region model# models.py # # Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph> # Licensed under MIT # Version 0.0.0 from app import db from slugify import slugify class Crop(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(80), unique=False) crop_ty...
<commit_before><commit_msg>Create crop and region model<commit_after># models.py # # Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph> # Licensed under MIT # Version 0.0.0 from app import db from slugify import slugify class Crop(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Colu...
e6ceac9c547c9fae78d6cac57d62a510fddc9096
scripts/traces/merge_traces.py
scripts/traces/merge_traces.py
#!/usr/bin/python # Converts a bunch of processedTrace files from Second Life into a # single trace file, where all coordinates have been converted # properly. This assumes that the traces are laid out in a square # grid, that each server is 256m x 256m. if __name__ == "__main__": trace_file_fmt = '4x4/processe...
Add a script to merge a bunch of quake style traces and write some summary statistics.
Add a script to merge a bunch of quake style traces and write some summary statistics.
Python
bsd-3-clause
sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata,sirikata/sirikata
Add a script to merge a bunch of quake style traces and write some summary statistics.
#!/usr/bin/python # Converts a bunch of processedTrace files from Second Life into a # single trace file, where all coordinates have been converted # properly. This assumes that the traces are laid out in a square # grid, that each server is 256m x 256m. if __name__ == "__main__": trace_file_fmt = '4x4/processe...
<commit_before><commit_msg>Add a script to merge a bunch of quake style traces and write some summary statistics.<commit_after>
#!/usr/bin/python # Converts a bunch of processedTrace files from Second Life into a # single trace file, where all coordinates have been converted # properly. This assumes that the traces are laid out in a square # grid, that each server is 256m x 256m. if __name__ == "__main__": trace_file_fmt = '4x4/processe...
Add a script to merge a bunch of quake style traces and write some summary statistics.#!/usr/bin/python # Converts a bunch of processedTrace files from Second Life into a # single trace file, where all coordinates have been converted # properly. This assumes that the traces are laid out in a square # grid, that each ...
<commit_before><commit_msg>Add a script to merge a bunch of quake style traces and write some summary statistics.<commit_after>#!/usr/bin/python # Converts a bunch of processedTrace files from Second Life into a # single trace file, where all coordinates have been converted # properly. This assumes that the traces ar...
dd30a2c655e1f0fca4be0de8de1775b7ab5c8b85
handle_quit_player.py
handle_quit_player.py
import pygame import sys from pygame.locals import * from variables import * from Player import * from Card import * from create_board import * from create_game_options import * from create_player_info import * from handle_mouse_event import * from update_game_dice import * from handle_game import * # handles all th...
Handle withdrawal of a player
Handle withdrawal of a player Added function to handle all the changes after a player quits withdraws from the game
Python
mit
idnaninitesh/monopoly_python
Handle withdrawal of a player Added function to handle all the changes after a player quits withdraws from the game
import pygame import sys from pygame.locals import * from variables import * from Player import * from Card import * from create_board import * from create_game_options import * from create_player_info import * from handle_mouse_event import * from update_game_dice import * from handle_game import * # handles all th...
<commit_before><commit_msg>Handle withdrawal of a player Added function to handle all the changes after a player quits withdraws from the game<commit_after>
import pygame import sys from pygame.locals import * from variables import * from Player import * from Card import * from create_board import * from create_game_options import * from create_player_info import * from handle_mouse_event import * from update_game_dice import * from handle_game import * # handles all th...
Handle withdrawal of a player Added function to handle all the changes after a player quits withdraws from the gameimport pygame import sys from pygame.locals import * from variables import * from Player import * from Card import * from create_board import * from create_game_options import * from create_player_info i...
<commit_before><commit_msg>Handle withdrawal of a player Added function to handle all the changes after a player quits withdraws from the game<commit_after>import pygame import sys from pygame.locals import * from variables import * from Player import * from Card import * from create_board import * from create_game_o...
84d8cc4d41ce6ff18f1f96f21749332e980a86f0
zipline/examples/buy_and_hold.py
zipline/examples/buy_and_hold.py
#!/usr/bin/env python # # Copyright 2015 Quantopian, 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 ...
Add simple buy and hold example.
DOC: Add simple buy and hold example.
Python
apache-2.0
nborggren/zipline,alphaBenj/zipline,quantopian/zipline,umuzungu/zipline,humdings/zipline,Scapogo/zipline,magne-max/zipline-ja,florentchandelier/zipline,enigmampc/catalyst,umuzungu/zipline,nborggren/zipline,bartosh/zipline,enigmampc/catalyst,bartosh/zipline,grundgruen/zipline,wilsonkichoi/zipline,grundgruen/zipline,alph...
DOC: Add simple buy and hold example.
#!/usr/bin/env python # # Copyright 2015 Quantopian, 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 ...
<commit_before><commit_msg>DOC: Add simple buy and hold example.<commit_after>
#!/usr/bin/env python # # Copyright 2015 Quantopian, 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 ...
DOC: Add simple buy and hold example.#!/usr/bin/env python # # Copyright 2015 Quantopian, 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...
<commit_before><commit_msg>DOC: Add simple buy and hold example.<commit_after>#!/usr/bin/env python # # Copyright 2015 Quantopian, 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 # # ...
8261098405f4279209388f91e6fbc0d48600b129
scripts/cscap/wx/extract_colin.py
scripts/cscap/wx/extract_colin.py
""" Extract some data for Colin 1951-2010 Annual GDDs by climate district Apr 1 - Oct 31 1951-2010 Frost-free days ... """ import psycopg2 import pandas as pd pgconn = psycopg2.connect(database='coop', host='iemdb', user='nobody') cursor = pgconn.cursor() from pyiem.network import Table as NetworkTable nt = Networ...
Add extraction script as per request
Add extraction script as per request
Python
mit
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
Add extraction script as per request
""" Extract some data for Colin 1951-2010 Annual GDDs by climate district Apr 1 - Oct 31 1951-2010 Frost-free days ... """ import psycopg2 import pandas as pd pgconn = psycopg2.connect(database='coop', host='iemdb', user='nobody') cursor = pgconn.cursor() from pyiem.network import Table as NetworkTable nt = Networ...
<commit_before><commit_msg>Add extraction script as per request<commit_after>
""" Extract some data for Colin 1951-2010 Annual GDDs by climate district Apr 1 - Oct 31 1951-2010 Frost-free days ... """ import psycopg2 import pandas as pd pgconn = psycopg2.connect(database='coop', host='iemdb', user='nobody') cursor = pgconn.cursor() from pyiem.network import Table as NetworkTable nt = Networ...
Add extraction script as per request""" Extract some data for Colin 1951-2010 Annual GDDs by climate district Apr 1 - Oct 31 1951-2010 Frost-free days ... """ import psycopg2 import pandas as pd pgconn = psycopg2.connect(database='coop', host='iemdb', user='nobody') cursor = pgconn.cursor() from pyiem.network impor...
<commit_before><commit_msg>Add extraction script as per request<commit_after>""" Extract some data for Colin 1951-2010 Annual GDDs by climate district Apr 1 - Oct 31 1951-2010 Frost-free days ... """ import psycopg2 import pandas as pd pgconn = psycopg2.connect(database='coop', host='iemdb', user='nobody') cursor =...
356d11b5bce94e356fa39c6709375655cae105b7
scripts/file_to_string_literal.py
scripts/file_to_string_literal.py
#!/usr/bin/env python import sys with open(sys.argv[1], 'w') as outfile: with open(sys.argv[2], 'r') as infile: outfile.write('namespace {0} {{\n'.format(sys.argv[3])) outfile.write('char const* {0} =\n'.format(sys.argv[4])) outfile.write('"SHADER(\n') outfile.write(infile.read()) ...
Add script for generating headers from glsl
Add script for generating headers from glsl
Python
bsd-3-clause
mikezackles/gn_build
Add script for generating headers from glsl
#!/usr/bin/env python import sys with open(sys.argv[1], 'w') as outfile: with open(sys.argv[2], 'r') as infile: outfile.write('namespace {0} {{\n'.format(sys.argv[3])) outfile.write('char const* {0} =\n'.format(sys.argv[4])) outfile.write('"SHADER(\n') outfile.write(infile.read()) ...
<commit_before><commit_msg>Add script for generating headers from glsl<commit_after>
#!/usr/bin/env python import sys with open(sys.argv[1], 'w') as outfile: with open(sys.argv[2], 'r') as infile: outfile.write('namespace {0} {{\n'.format(sys.argv[3])) outfile.write('char const* {0} =\n'.format(sys.argv[4])) outfile.write('"SHADER(\n') outfile.write(infile.read()) ...
Add script for generating headers from glsl#!/usr/bin/env python import sys with open(sys.argv[1], 'w') as outfile: with open(sys.argv[2], 'r') as infile: outfile.write('namespace {0} {{\n'.format(sys.argv[3])) outfile.write('char const* {0} =\n'.format(sys.argv[4])) outfile.write('"SHADER...
<commit_before><commit_msg>Add script for generating headers from glsl<commit_after>#!/usr/bin/env python import sys with open(sys.argv[1], 'w') as outfile: with open(sys.argv[2], 'r') as infile: outfile.write('namespace {0} {{\n'.format(sys.argv[3])) outfile.write('char const* {0} =\n'.format(sys...
7e3811666e224dc2030f625f04db8a4e55529322
create.py
create.py
#!/usr/local/bin/python3 from argparse import ArgumentParser from argparse import ArgumentTypeError import itertools import os import string from shutil import copyfile import pathlib def validateProblemCount(value): ivalue = int(value) if ivalue < 1 or ivalue > 25: raise ArgumentTypeError(str(value) + " is not w...
Add script to generate templates
Add script to generate templates
Python
mit
szekizoli/GoogleCodeJamPractice,szekizoli/GoogleCodeJamPractice,szekizoli/GoogleCodeJamPractice
Add script to generate templates
#!/usr/local/bin/python3 from argparse import ArgumentParser from argparse import ArgumentTypeError import itertools import os import string from shutil import copyfile import pathlib def validateProblemCount(value): ivalue = int(value) if ivalue < 1 or ivalue > 25: raise ArgumentTypeError(str(value) + " is not w...
<commit_before><commit_msg>Add script to generate templates<commit_after>
#!/usr/local/bin/python3 from argparse import ArgumentParser from argparse import ArgumentTypeError import itertools import os import string from shutil import copyfile import pathlib def validateProblemCount(value): ivalue = int(value) if ivalue < 1 or ivalue > 25: raise ArgumentTypeError(str(value) + " is not w...
Add script to generate templates#!/usr/local/bin/python3 from argparse import ArgumentParser from argparse import ArgumentTypeError import itertools import os import string from shutil import copyfile import pathlib def validateProblemCount(value): ivalue = int(value) if ivalue < 1 or ivalue > 25: raise ArgumentT...
<commit_before><commit_msg>Add script to generate templates<commit_after>#!/usr/local/bin/python3 from argparse import ArgumentParser from argparse import ArgumentTypeError import itertools import os import string from shutil import copyfile import pathlib def validateProblemCount(value): ivalue = int(value) if iva...
a7ce715d184e11f7fe6d20bc22cd8b9a4733e04d
tests/test_image_xpress.py
tests/test_image_xpress.py
from microscopium.screens import image_xpress import collections as coll def test_ix_semantic_filename(): test_fn = "./Week1_22123/G10_s2_w11C3B9BCC-E48F-4C2F-9D31-8F46D8B5B972.tif" expected = coll.OrderedDict([('directory', './Week1_22123'), ('prefix', ''), ...
Add tests to image_xpress module
Add tests to image_xpress module
Python
bsd-3-clause
jni/microscopium,Don86/microscopium,microscopium/microscopium,Don86/microscopium,jni/microscopium,starcalibre/microscopium,microscopium/microscopium
Add tests to image_xpress module
from microscopium.screens import image_xpress import collections as coll def test_ix_semantic_filename(): test_fn = "./Week1_22123/G10_s2_w11C3B9BCC-E48F-4C2F-9D31-8F46D8B5B972.tif" expected = coll.OrderedDict([('directory', './Week1_22123'), ('prefix', ''), ...
<commit_before><commit_msg>Add tests to image_xpress module<commit_after>
from microscopium.screens import image_xpress import collections as coll def test_ix_semantic_filename(): test_fn = "./Week1_22123/G10_s2_w11C3B9BCC-E48F-4C2F-9D31-8F46D8B5B972.tif" expected = coll.OrderedDict([('directory', './Week1_22123'), ('prefix', ''), ...
Add tests to image_xpress modulefrom microscopium.screens import image_xpress import collections as coll def test_ix_semantic_filename(): test_fn = "./Week1_22123/G10_s2_w11C3B9BCC-E48F-4C2F-9D31-8F46D8B5B972.tif" expected = coll.OrderedDict([('directory', './Week1_22123'), ('prefi...
<commit_before><commit_msg>Add tests to image_xpress module<commit_after>from microscopium.screens import image_xpress import collections as coll def test_ix_semantic_filename(): test_fn = "./Week1_22123/G10_s2_w11C3B9BCC-E48F-4C2F-9D31-8F46D8B5B972.tif" expected = coll.OrderedDict([('directory', './Week1_221...
8760c50de32353664bb5291ac24205186e557de4
binterpret.py
binterpret.py
import sys import traceback import argparse from PIL import Image def binterpret(filename, abx, aby): try: img = Image.open(filename) except IOError: traceback.print_exc(file=sys.stdout) exit(3) blockx = img.size[0]/abx blocky = img.size[1]/aby print blockx, blocky if __nam...
Set up command with arguments
Set up command with arguments
Python
apache-2.0
flammified/binterpret
Set up command with arguments
import sys import traceback import argparse from PIL import Image def binterpret(filename, abx, aby): try: img = Image.open(filename) except IOError: traceback.print_exc(file=sys.stdout) exit(3) blockx = img.size[0]/abx blocky = img.size[1]/aby print blockx, blocky if __nam...
<commit_before><commit_msg>Set up command with arguments<commit_after>
import sys import traceback import argparse from PIL import Image def binterpret(filename, abx, aby): try: img = Image.open(filename) except IOError: traceback.print_exc(file=sys.stdout) exit(3) blockx = img.size[0]/abx blocky = img.size[1]/aby print blockx, blocky if __nam...
Set up command with argumentsimport sys import traceback import argparse from PIL import Image def binterpret(filename, abx, aby): try: img = Image.open(filename) except IOError: traceback.print_exc(file=sys.stdout) exit(3) blockx = img.size[0]/abx blocky = img.size[1]/aby p...
<commit_before><commit_msg>Set up command with arguments<commit_after>import sys import traceback import argparse from PIL import Image def binterpret(filename, abx, aby): try: img = Image.open(filename) except IOError: traceback.print_exc(file=sys.stdout) exit(3) blockx = img.size[...
9f11190cbd7ac97ab5e57c3af8c23b9884279cfa
lesson5/catch_multiple.py
lesson5/catch_multiple.py
def take_beer(fridge, number=1): if not isinstance(fridge, dict): raise TypeError("Invalid fridge") if "beer" not in fridge: raise ValueError("No more beer:(") if number > fridge["beer"]: raise ValueError("Not enough beer:(") fridge["beer"] -= number if __name__ == "__main__...
Add script for demostrating cathicng multiple exceptions
Add script for demostrating cathicng multiple exceptions
Python
bsd-2-clause
drednout/letspython,drednout/letspython
Add script for demostrating cathicng multiple exceptions
def take_beer(fridge, number=1): if not isinstance(fridge, dict): raise TypeError("Invalid fridge") if "beer" not in fridge: raise ValueError("No more beer:(") if number > fridge["beer"]: raise ValueError("Not enough beer:(") fridge["beer"] -= number if __name__ == "__main__...
<commit_before><commit_msg>Add script for demostrating cathicng multiple exceptions<commit_after>
def take_beer(fridge, number=1): if not isinstance(fridge, dict): raise TypeError("Invalid fridge") if "beer" not in fridge: raise ValueError("No more beer:(") if number > fridge["beer"]: raise ValueError("Not enough beer:(") fridge["beer"] -= number if __name__ == "__main__...
Add script for demostrating cathicng multiple exceptionsdef take_beer(fridge, number=1): if not isinstance(fridge, dict): raise TypeError("Invalid fridge") if "beer" not in fridge: raise ValueError("No more beer:(") if number > fridge["beer"]: raise ValueError("Not enough beer:(") ...
<commit_before><commit_msg>Add script for demostrating cathicng multiple exceptions<commit_after>def take_beer(fridge, number=1): if not isinstance(fridge, dict): raise TypeError("Invalid fridge") if "beer" not in fridge: raise ValueError("No more beer:(") if number > fridge["beer"]: ...
40b704b64ca1a4bf6f686710586c0856e9a8cf94
addons/response-encoding-converter-addon/__init__.py
addons/response-encoding-converter-addon/__init__.py
# -*- coding:utf-8 -*- from owlmixin import OwlMixin from modules.models import ResponseAddOnPayload import logging logger = logging.getLogger(__name__) class Config(OwlMixin): def __init__(self, encoding): self.encoding: str = encoding def main(payload: ResponseAddOnPayload, config_dict: dict): c...
Add change encoding add on
:new: Add change encoding add on
Python
mit
tadashi-aikawa/gemini
:new: Add change encoding add on
# -*- coding:utf-8 -*- from owlmixin import OwlMixin from modules.models import ResponseAddOnPayload import logging logger = logging.getLogger(__name__) class Config(OwlMixin): def __init__(self, encoding): self.encoding: str = encoding def main(payload: ResponseAddOnPayload, config_dict: dict): c...
<commit_before><commit_msg>:new: Add change encoding add on<commit_after>
# -*- coding:utf-8 -*- from owlmixin import OwlMixin from modules.models import ResponseAddOnPayload import logging logger = logging.getLogger(__name__) class Config(OwlMixin): def __init__(self, encoding): self.encoding: str = encoding def main(payload: ResponseAddOnPayload, config_dict: dict): c...
:new: Add change encoding add on# -*- coding:utf-8 -*- from owlmixin import OwlMixin from modules.models import ResponseAddOnPayload import logging logger = logging.getLogger(__name__) class Config(OwlMixin): def __init__(self, encoding): self.encoding: str = encoding def main(payload: ResponseAddOnPa...
<commit_before><commit_msg>:new: Add change encoding add on<commit_after># -*- coding:utf-8 -*- from owlmixin import OwlMixin from modules.models import ResponseAddOnPayload import logging logger = logging.getLogger(__name__) class Config(OwlMixin): def __init__(self, encoding): self.encoding: str = enc...
8ee17bf5a070c22700061198a7ecde01adaef3a9
tests/tests_tags/tests_spoiler.py
tests/tests_tags/tests_spoiler.py
""" SkCode spoiler tag test code. """ import unittest from skcode.etree import TreeNode from skcode.tags import (SpoilerTagOptions, DEFAULT_RECOGNIZED_TAGS) class HorizontalLineTagTestCase(unittest.TestCase): """ Tests suite for the spoiler tag module. """ def test_tag_and_aliases_...
Add tests suite for spoiler tag.
Add tests suite for spoiler tag.
Python
agpl-3.0
TamiaLab/PySkCode
Add tests suite for spoiler tag.
""" SkCode spoiler tag test code. """ import unittest from skcode.etree import TreeNode from skcode.tags import (SpoilerTagOptions, DEFAULT_RECOGNIZED_TAGS) class HorizontalLineTagTestCase(unittest.TestCase): """ Tests suite for the spoiler tag module. """ def test_tag_and_aliases_...
<commit_before><commit_msg>Add tests suite for spoiler tag.<commit_after>
""" SkCode spoiler tag test code. """ import unittest from skcode.etree import TreeNode from skcode.tags import (SpoilerTagOptions, DEFAULT_RECOGNIZED_TAGS) class HorizontalLineTagTestCase(unittest.TestCase): """ Tests suite for the spoiler tag module. """ def test_tag_and_aliases_...
Add tests suite for spoiler tag.""" SkCode spoiler tag test code. """ import unittest from skcode.etree import TreeNode from skcode.tags import (SpoilerTagOptions, DEFAULT_RECOGNIZED_TAGS) class HorizontalLineTagTestCase(unittest.TestCase): """ Tests suite for the spoiler tag module. ""...
<commit_before><commit_msg>Add tests suite for spoiler tag.<commit_after>""" SkCode spoiler tag test code. """ import unittest from skcode.etree import TreeNode from skcode.tags import (SpoilerTagOptions, DEFAULT_RECOGNIZED_TAGS) class HorizontalLineTagTestCase(unittest.TestCase): """ T...
5a0e28212e186b61138fa725cd2c22f475b245d7
ch7/atomic.py
ch7/atomic.py
''' Listing 7.8: Testing atomic operations ''' import numpy as np import pyopencl as cl import utility kernel_src = ''' __kernel void atomic(__global int* x) { __local int a, b; a = 0; b = 0; /* Increment without atomic add */ a++; /* Increment with atomic add */ atomic_inc(&b); x[0] = a;...
Add example from listing 7.8
Add example from listing 7.8
Python
mit
oysstu/pyopencl-in-action
Add example from listing 7.8
''' Listing 7.8: Testing atomic operations ''' import numpy as np import pyopencl as cl import utility kernel_src = ''' __kernel void atomic(__global int* x) { __local int a, b; a = 0; b = 0; /* Increment without atomic add */ a++; /* Increment with atomic add */ atomic_inc(&b); x[0] = a;...
<commit_before><commit_msg>Add example from listing 7.8<commit_after>
''' Listing 7.8: Testing atomic operations ''' import numpy as np import pyopencl as cl import utility kernel_src = ''' __kernel void atomic(__global int* x) { __local int a, b; a = 0; b = 0; /* Increment without atomic add */ a++; /* Increment with atomic add */ atomic_inc(&b); x[0] = a;...
Add example from listing 7.8''' Listing 7.8: Testing atomic operations ''' import numpy as np import pyopencl as cl import utility kernel_src = ''' __kernel void atomic(__global int* x) { __local int a, b; a = 0; b = 0; /* Increment without atomic add */ a++; /* Increment with atomic add */ a...
<commit_before><commit_msg>Add example from listing 7.8<commit_after>''' Listing 7.8: Testing atomic operations ''' import numpy as np import pyopencl as cl import utility kernel_src = ''' __kernel void atomic(__global int* x) { __local int a, b; a = 0; b = 0; /* Increment without atomic add */ a++;...
811d3e3c13cac36b6dd16e49690fca4a31a74266
tests/test_cython_funcs.py
tests/test_cython_funcs.py
from unittest import TestCase import numpy as np import numpy.testing as npt from nimble import Events import nimble.cyfunc.debounce as cy class TestAsArrayMethod(TestCase): def setUp(self): conditional_array = np.array([0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1]) events = Events((conditional_array > 0)) ...
Add unit tests for Cython functions that mirror pure Python tests
Add unit tests for Cython functions that mirror pure Python tests
Python
mit
rwhitt2049/trouve,rwhitt2049/nimble
Add unit tests for Cython functions that mirror pure Python tests
from unittest import TestCase import numpy as np import numpy.testing as npt from nimble import Events import nimble.cyfunc.debounce as cy class TestAsArrayMethod(TestCase): def setUp(self): conditional_array = np.array([0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1]) events = Events((conditional_array > 0)) ...
<commit_before><commit_msg>Add unit tests for Cython functions that mirror pure Python tests<commit_after>
from unittest import TestCase import numpy as np import numpy.testing as npt from nimble import Events import nimble.cyfunc.debounce as cy class TestAsArrayMethod(TestCase): def setUp(self): conditional_array = np.array([0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1]) events = Events((conditional_array > 0)) ...
Add unit tests for Cython functions that mirror pure Python testsfrom unittest import TestCase import numpy as np import numpy.testing as npt from nimble import Events import nimble.cyfunc.debounce as cy class TestAsArrayMethod(TestCase): def setUp(self): conditional_array = np.array([0, 0, 1, 1, 0, 0, 1,...
<commit_before><commit_msg>Add unit tests for Cython functions that mirror pure Python tests<commit_after>from unittest import TestCase import numpy as np import numpy.testing as npt from nimble import Events import nimble.cyfunc.debounce as cy class TestAsArrayMethod(TestCase): def setUp(self): condition...
498637bc947eb0e68b4a153fb5fa859bfa52ff75
acquisition/devops/deploy_adapter.py
acquisition/devops/deploy_adapter.py
import requests import json import argparse import uuid import pprint def main(): parser = argparse.ArgumentParser( description='Deploy adapter to Tomviz acquisition server ( the server ' 'must be running with the --dev option.') parser.add_argument('-u', '--url', help='the base url to the ser...
Add script to dynamically deploy adapters
Add script to dynamically deploy adapters
Python
bsd-3-clause
OpenChemistry/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,thewtex/tomviz,cryos/tomviz,thewtex/tomviz,OpenChemistry/tomviz,cjh1/tomviz,cjh1/tomviz,cryos/tomviz,thewtex/tomviz,mathturtle/tomviz,cjh1/tomviz,OpenChemistry/tomviz,mathturtle/tomviz,cryos/tomviz
Add script to dynamically deploy adapters
import requests import json import argparse import uuid import pprint def main(): parser = argparse.ArgumentParser( description='Deploy adapter to Tomviz acquisition server ( the server ' 'must be running with the --dev option.') parser.add_argument('-u', '--url', help='the base url to the ser...
<commit_before><commit_msg>Add script to dynamically deploy adapters<commit_after>
import requests import json import argparse import uuid import pprint def main(): parser = argparse.ArgumentParser( description='Deploy adapter to Tomviz acquisition server ( the server ' 'must be running with the --dev option.') parser.add_argument('-u', '--url', help='the base url to the ser...
Add script to dynamically deploy adaptersimport requests import json import argparse import uuid import pprint def main(): parser = argparse.ArgumentParser( description='Deploy adapter to Tomviz acquisition server ( the server ' 'must be running with the --dev option.') parser.add_argument('-u...
<commit_before><commit_msg>Add script to dynamically deploy adapters<commit_after>import requests import json import argparse import uuid import pprint def main(): parser = argparse.ArgumentParser( description='Deploy adapter to Tomviz acquisition server ( the server ' 'must be running with the --...
f16eb9e0dea35a2cb49c1e9cb879af1faa1f0c6a
PyGoogleMap.py
PyGoogleMap.py
import dpkt, socket, pygeoip, optparse def banner(): print "#### Use Python to build a Google Map #####" print "" def retKML(ip): rec = gi.record_by_name(ip) try: longitude = rec['longitude'] latitude = rec['latitude'] kml = ( '<Placemark>\n' '<name>&s</name\n' '<Point>\n' '<coordinates>%6f....
DEBUG and TEST. Plenty of Typos
DEBUG and TEST. Plenty of Typos
Python
mit
n1cfury/ViolentPython
DEBUG and TEST. Plenty of Typos
import dpkt, socket, pygeoip, optparse def banner(): print "#### Use Python to build a Google Map #####" print "" def retKML(ip): rec = gi.record_by_name(ip) try: longitude = rec['longitude'] latitude = rec['latitude'] kml = ( '<Placemark>\n' '<name>&s</name\n' '<Point>\n' '<coordinates>%6f....
<commit_before><commit_msg>DEBUG and TEST. Plenty of Typos<commit_after>
import dpkt, socket, pygeoip, optparse def banner(): print "#### Use Python to build a Google Map #####" print "" def retKML(ip): rec = gi.record_by_name(ip) try: longitude = rec['longitude'] latitude = rec['latitude'] kml = ( '<Placemark>\n' '<name>&s</name\n' '<Point>\n' '<coordinates>%6f....
DEBUG and TEST. Plenty of Typosimport dpkt, socket, pygeoip, optparse def banner(): print "#### Use Python to build a Google Map #####" print "" def retKML(ip): rec = gi.record_by_name(ip) try: longitude = rec['longitude'] latitude = rec['latitude'] kml = ( '<Placemark>\n' '<name>&s</name\n' '...
<commit_before><commit_msg>DEBUG and TEST. Plenty of Typos<commit_after>import dpkt, socket, pygeoip, optparse def banner(): print "#### Use Python to build a Google Map #####" print "" def retKML(ip): rec = gi.record_by_name(ip) try: longitude = rec['longitude'] latitude = rec['latitude'] kml = ( '...
422057651acf510f6c4c5ccb54781a9b85d4a5ad
airflow/migrations/versions/1968acfc09e3_add_is_encrypted_column_to_variable_.py
airflow/migrations/versions/1968acfc09e3_add_is_encrypted_column_to_variable_.py
"""add is_encrypted column to variable table Revision ID: 1968acfc09e3 Revises: bba5a7cfc896 Create Date: 2016-02-02 17:20:55.692295 """ # revision identifiers, used by Alembic. revision = '1968acfc09e3' down_revision = 'bba5a7cfc896' branch_labels = None depends_on = None from alembic import op import sqlalchemy a...
Add missing migration needed to support Variable value encryption
Add missing migration needed to support Variable value encryption
Python
apache-2.0
caseyching/incubator-airflow,N3da/incubator-airflow,gtoonstra/airflow,owlabs/incubator-airflow,lyft/incubator-airflow,dmitry-r/incubator-airflow,ty707/airflow,modsy/incubator-airflow,sdiazb/airflow,nathanielvarona/airflow,adamhaney/airflow,dgies/incubator-airflow,gtoonstra/airflow,jwi078/incubator-airflow,dhuang/incuba...
Add missing migration needed to support Variable value encryption
"""add is_encrypted column to variable table Revision ID: 1968acfc09e3 Revises: bba5a7cfc896 Create Date: 2016-02-02 17:20:55.692295 """ # revision identifiers, used by Alembic. revision = '1968acfc09e3' down_revision = 'bba5a7cfc896' branch_labels = None depends_on = None from alembic import op import sqlalchemy a...
<commit_before><commit_msg>Add missing migration needed to support Variable value encryption<commit_after>
"""add is_encrypted column to variable table Revision ID: 1968acfc09e3 Revises: bba5a7cfc896 Create Date: 2016-02-02 17:20:55.692295 """ # revision identifiers, used by Alembic. revision = '1968acfc09e3' down_revision = 'bba5a7cfc896' branch_labels = None depends_on = None from alembic import op import sqlalchemy a...
Add missing migration needed to support Variable value encryption"""add is_encrypted column to variable table Revision ID: 1968acfc09e3 Revises: bba5a7cfc896 Create Date: 2016-02-02 17:20:55.692295 """ # revision identifiers, used by Alembic. revision = '1968acfc09e3' down_revision = 'bba5a7cfc896' branch_labels = N...
<commit_before><commit_msg>Add missing migration needed to support Variable value encryption<commit_after>"""add is_encrypted column to variable table Revision ID: 1968acfc09e3 Revises: bba5a7cfc896 Create Date: 2016-02-02 17:20:55.692295 """ # revision identifiers, used by Alembic. revision = '1968acfc09e3' down_re...
594c9d8320b1eaac87b10fe9c93fbb1ce652799e
pydbus/tests/gnome_music.py
pydbus/tests/gnome_music.py
from pydbus import SessionBus from gi.repository import GObject, GLib import subprocess from time import sleep loop = GObject.MainLoop() subprocess.Popen("gnome-music") sleep(5) print("Waiting for GNOME Music to start...") b = SessionBus() m = b.get("org.mpris.MediaPlayer2.GnomeMusic", "/org/mpris/MediaPlayer2") m....
Add a trivial GNOME Music test.
Add a trivial GNOME Music test.
Python
lgpl-2.1
LEW21/pydbus,LEW21/pydbus
Add a trivial GNOME Music test.
from pydbus import SessionBus from gi.repository import GObject, GLib import subprocess from time import sleep loop = GObject.MainLoop() subprocess.Popen("gnome-music") sleep(5) print("Waiting for GNOME Music to start...") b = SessionBus() m = b.get("org.mpris.MediaPlayer2.GnomeMusic", "/org/mpris/MediaPlayer2") m....
<commit_before><commit_msg>Add a trivial GNOME Music test.<commit_after>
from pydbus import SessionBus from gi.repository import GObject, GLib import subprocess from time import sleep loop = GObject.MainLoop() subprocess.Popen("gnome-music") sleep(5) print("Waiting for GNOME Music to start...") b = SessionBus() m = b.get("org.mpris.MediaPlayer2.GnomeMusic", "/org/mpris/MediaPlayer2") m....
Add a trivial GNOME Music test.from pydbus import SessionBus from gi.repository import GObject, GLib import subprocess from time import sleep loop = GObject.MainLoop() subprocess.Popen("gnome-music") sleep(5) print("Waiting for GNOME Music to start...") b = SessionBus() m = b.get("org.mpris.MediaPlayer2.GnomeMusic",...
<commit_before><commit_msg>Add a trivial GNOME Music test.<commit_after>from pydbus import SessionBus from gi.repository import GObject, GLib import subprocess from time import sleep loop = GObject.MainLoop() subprocess.Popen("gnome-music") sleep(5) print("Waiting for GNOME Music to start...") b = SessionBus() m = b...
a64f3cf9c10d79576cc70d385f9124b7beda040e
nubank.py
nubank.py
import json import requests class NuException(BaseException): pass class Nubank: headers = { 'Content-Type': 'application/json', 'X-Correlation-Id': 'WEB-APP.pewW9', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' ...
Add Nubank class for handling the requests
Add Nubank class for handling the requests
Python
mit
andreroggeri/pynubank
Add Nubank class for handling the requests
import json import requests class NuException(BaseException): pass class Nubank: headers = { 'Content-Type': 'application/json', 'X-Correlation-Id': 'WEB-APP.pewW9', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' ...
<commit_before><commit_msg>Add Nubank class for handling the requests<commit_after>
import json import requests class NuException(BaseException): pass class Nubank: headers = { 'Content-Type': 'application/json', 'X-Correlation-Id': 'WEB-APP.pewW9', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' ...
Add Nubank class for handling the requestsimport json import requests class NuException(BaseException): pass class Nubank: headers = { 'Content-Type': 'application/json', 'X-Correlation-Id': 'WEB-APP.pewW9', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...
<commit_before><commit_msg>Add Nubank class for handling the requests<commit_after>import json import requests class NuException(BaseException): pass class Nubank: headers = { 'Content-Type': 'application/json', 'X-Correlation-Id': 'WEB-APP.pewW9', 'User-Agent': 'Mozilla/5.0 (Windows...
fa23f66fcae37731672f4cf646ad52964b4b206a
table/migrations/0001_initial.py
table/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
Add migration for Receipt model
Add migration for Receipt model
Python
mit
trimailov/finance,trimailov/finance,trimailov/finance
Add migration for Receipt model
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
<commit_before><commit_msg>Add migration for Receipt model<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
Add migration for Receipt model# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operation...
<commit_before><commit_msg>Add migration for Receipt model<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settin...
89f75bb894a6dee2d53708b8f4f5f3302d54a010
neblinaCore.py
neblinaCore.py
#!/usr/bin/env python ################################################################################### # # Copyright (c) 2010-2016 Motsai # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softwa...
Create NeblinaCore to handle sending and receiving packet.
Create NeblinaCore to handle sending and receiving packet.
Python
mit
Motsai/neblina-python,Motsai/neblina-python
Create NeblinaCore to handle sending and receiving packet.
#!/usr/bin/env python ################################################################################### # # Copyright (c) 2010-2016 Motsai # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softwa...
<commit_before><commit_msg>Create NeblinaCore to handle sending and receiving packet.<commit_after>
#!/usr/bin/env python ################################################################################### # # Copyright (c) 2010-2016 Motsai # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softwa...
Create NeblinaCore to handle sending and receiving packet.#!/usr/bin/env python ################################################################################### # # Copyright (c) 2010-2016 Motsai # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of thi...
<commit_before><commit_msg>Create NeblinaCore to handle sending and receiving packet.<commit_after>#!/usr/bin/env python ################################################################################### # # Copyright (c) 2010-2016 Motsai # # The MIT License (MIT) # # Permission is hereby granted, free of charge...
1fd87ad0cab5d45602192c83681340d5da27a6db
examples/custom_context.py
examples/custom_context.py
import random import discord from discord.ext import commands class MyContext(commands.Context): async def tick(self, value): # reacts to the message with an emoji # depending on whether value is True or False # if its True, it'll add a green check mark # otherwise, it'll add a re...
Add example on subclassing commands.Context
Add example on subclassing commands.Context
Python
mit
Rapptz/discord.py,Harmon758/discord.py,khazhyk/discord.py,rapptz/discord.py,Harmon758/discord.py
Add example on subclassing commands.Context
import random import discord from discord.ext import commands class MyContext(commands.Context): async def tick(self, value): # reacts to the message with an emoji # depending on whether value is True or False # if its True, it'll add a green check mark # otherwise, it'll add a re...
<commit_before><commit_msg>Add example on subclassing commands.Context<commit_after>
import random import discord from discord.ext import commands class MyContext(commands.Context): async def tick(self, value): # reacts to the message with an emoji # depending on whether value is True or False # if its True, it'll add a green check mark # otherwise, it'll add a re...
Add example on subclassing commands.Contextimport random import discord from discord.ext import commands class MyContext(commands.Context): async def tick(self, value): # reacts to the message with an emoji # depending on whether value is True or False # if its True, it'll add a green che...
<commit_before><commit_msg>Add example on subclassing commands.Context<commit_after>import random import discord from discord.ext import commands class MyContext(commands.Context): async def tick(self, value): # reacts to the message with an emoji # depending on whether value is True or False ...
ae9532fe2cf76a8d3f219093f373c05dc2eafc1d
benchexec/tools/abc.py
benchexec/tools/abc.py
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import re import logging import benchexec.result as result import benchexec.tools.templat...
Add a tool-info moduel for ABC
Add a tool-info moduel for ABC
Python
apache-2.0
sosy-lab/benchexec,dbeyer/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,sosy-lab/benchexec,sosy-lab/benchexec
Add a tool-info moduel for ABC
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import re import logging import benchexec.result as result import benchexec.tools.templat...
<commit_before><commit_msg>Add a tool-info moduel for ABC<commit_after>
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import re import logging import benchexec.result as result import benchexec.tools.templat...
Add a tool-info moduel for ABC# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import re import logging import benchexec.result as result ...
<commit_before><commit_msg>Add a tool-info moduel for ABC<commit_after># This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import re import lo...
3663a732727d2a2198b2fe1c77a3d73abb531d8e
pyfibot/util/twitter_application_auth.py
pyfibot/util/twitter_application_auth.py
import requests import base64 import sys if len(sys.argv) < 3: print "Usage: twitter_application_auth.py <consumer key> <consumer secret>" sys.exit(1) consumer_key = sys.argv[1] consumer_secret = sys.argv[2] token = consumer_key+":"+consumer_secret encoded_token = base64.b64encode(token) payload = {'grant_ty...
Add utility to generate bearer keys for twitter
Add utility to generate bearer keys for twitter
Python
bsd-3-clause
huqa/pyfibot,aapa/pyfibot,huqa/pyfibot,EArmour/pyfibot,lepinkainen/pyfibot,EArmour/pyfibot,rnyberg/pyfibot,lepinkainen/pyfibot,rnyberg/pyfibot,aapa/pyfibot
Add utility to generate bearer keys for twitter
import requests import base64 import sys if len(sys.argv) < 3: print "Usage: twitter_application_auth.py <consumer key> <consumer secret>" sys.exit(1) consumer_key = sys.argv[1] consumer_secret = sys.argv[2] token = consumer_key+":"+consumer_secret encoded_token = base64.b64encode(token) payload = {'grant_ty...
<commit_before><commit_msg>Add utility to generate bearer keys for twitter<commit_after>
import requests import base64 import sys if len(sys.argv) < 3: print "Usage: twitter_application_auth.py <consumer key> <consumer secret>" sys.exit(1) consumer_key = sys.argv[1] consumer_secret = sys.argv[2] token = consumer_key+":"+consumer_secret encoded_token = base64.b64encode(token) payload = {'grant_ty...
Add utility to generate bearer keys for twitterimport requests import base64 import sys if len(sys.argv) < 3: print "Usage: twitter_application_auth.py <consumer key> <consumer secret>" sys.exit(1) consumer_key = sys.argv[1] consumer_secret = sys.argv[2] token = consumer_key+":"+consumer_secret encoded_token ...
<commit_before><commit_msg>Add utility to generate bearer keys for twitter<commit_after>import requests import base64 import sys if len(sys.argv) < 3: print "Usage: twitter_application_auth.py <consumer key> <consumer secret>" sys.exit(1) consumer_key = sys.argv[1] consumer_secret = sys.argv[2] token = consum...
75aec1cbc64c667b0528cfc66ed087d7ea84db20
bin/process_coca_ngrams.py
bin/process_coca_ngrams.py
from data import data, process_common UNIGRAM_REFERENCE = 'data/g1m_1gram.txt' SRCS_PATTERN = 'data/corpus/coca/w%s_.txt' OUTS_PATTERN = 'data/coca_%sgram.txt' REFERENCE = {} def load_reference() -> None: with data.open_project_path(UNIGRAM_REFERENCE, mode='r') as src: for line in src: word, score = line...
Add script for processing COCA ngrams.
Add script for processing COCA ngrams.
Python
mit
PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge
Add script for processing COCA ngrams.
from data import data, process_common UNIGRAM_REFERENCE = 'data/g1m_1gram.txt' SRCS_PATTERN = 'data/corpus/coca/w%s_.txt' OUTS_PATTERN = 'data/coca_%sgram.txt' REFERENCE = {} def load_reference() -> None: with data.open_project_path(UNIGRAM_REFERENCE, mode='r') as src: for line in src: word, score = line...
<commit_before><commit_msg>Add script for processing COCA ngrams.<commit_after>
from data import data, process_common UNIGRAM_REFERENCE = 'data/g1m_1gram.txt' SRCS_PATTERN = 'data/corpus/coca/w%s_.txt' OUTS_PATTERN = 'data/coca_%sgram.txt' REFERENCE = {} def load_reference() -> None: with data.open_project_path(UNIGRAM_REFERENCE, mode='r') as src: for line in src: word, score = line...
Add script for processing COCA ngrams.from data import data, process_common UNIGRAM_REFERENCE = 'data/g1m_1gram.txt' SRCS_PATTERN = 'data/corpus/coca/w%s_.txt' OUTS_PATTERN = 'data/coca_%sgram.txt' REFERENCE = {} def load_reference() -> None: with data.open_project_path(UNIGRAM_REFERENCE, mode='r') as src: for...
<commit_before><commit_msg>Add script for processing COCA ngrams.<commit_after>from data import data, process_common UNIGRAM_REFERENCE = 'data/g1m_1gram.txt' SRCS_PATTERN = 'data/corpus/coca/w%s_.txt' OUTS_PATTERN = 'data/coca_%sgram.txt' REFERENCE = {} def load_reference() -> None: with data.open_project_path(UNI...
f7be5699265e123866f2e43e3e2920b39495dd80
tests/test_entities.py
tests/test_entities.py
from __future__ import unicode_literals from ftfy import fix_text, fix_text_segment from nose.tools import eq_ def test_entities(): example = '&amp;\n<html>\n&amp;' eq_(fix_text(example), '&\n<html>\n&amp;') eq_(fix_text_segment(example), '&amp;\n<html>\n&amp;') eq_(fix_text(example, fix_entities=True...
Add tests for the fix_entities parameter
Add tests for the fix_entities parameter
Python
mit
LuminosoInsight/python-ftfy
Add tests for the fix_entities parameter
from __future__ import unicode_literals from ftfy import fix_text, fix_text_segment from nose.tools import eq_ def test_entities(): example = '&amp;\n<html>\n&amp;' eq_(fix_text(example), '&\n<html>\n&amp;') eq_(fix_text_segment(example), '&amp;\n<html>\n&amp;') eq_(fix_text(example, fix_entities=True...
<commit_before><commit_msg>Add tests for the fix_entities parameter<commit_after>
from __future__ import unicode_literals from ftfy import fix_text, fix_text_segment from nose.tools import eq_ def test_entities(): example = '&amp;\n<html>\n&amp;' eq_(fix_text(example), '&\n<html>\n&amp;') eq_(fix_text_segment(example), '&amp;\n<html>\n&amp;') eq_(fix_text(example, fix_entities=True...
Add tests for the fix_entities parameterfrom __future__ import unicode_literals from ftfy import fix_text, fix_text_segment from nose.tools import eq_ def test_entities(): example = '&amp;\n<html>\n&amp;' eq_(fix_text(example), '&\n<html>\n&amp;') eq_(fix_text_segment(example), '&amp;\n<html>\n&amp;') ...
<commit_before><commit_msg>Add tests for the fix_entities parameter<commit_after>from __future__ import unicode_literals from ftfy import fix_text, fix_text_segment from nose.tools import eq_ def test_entities(): example = '&amp;\n<html>\n&amp;' eq_(fix_text(example), '&\n<html>\n&amp;') eq_(fix_text_segme...
c9ce5f7eafcfc3d15c9ff3d7c72b44d0192fd452
tests/test_handlers.py
tests/test_handlers.py
from __future__ import print_function import unittest import teres import teres.handlers import logging import os.path import shutil import StringIO import tempfile class LoggingHandlerSetUp(unittest.TestCase): def setUp(self): self.reporter = teres.Reporter.get_reporter() self.logger = logging....
Add basic tests for LoggingHandler.
Add basic tests for LoggingHandler.
Python
lgpl-2.1
tlamer/teres,tlamer/teres
Add basic tests for LoggingHandler.
from __future__ import print_function import unittest import teres import teres.handlers import logging import os.path import shutil import StringIO import tempfile class LoggingHandlerSetUp(unittest.TestCase): def setUp(self): self.reporter = teres.Reporter.get_reporter() self.logger = logging....
<commit_before><commit_msg>Add basic tests for LoggingHandler.<commit_after>
from __future__ import print_function import unittest import teres import teres.handlers import logging import os.path import shutil import StringIO import tempfile class LoggingHandlerSetUp(unittest.TestCase): def setUp(self): self.reporter = teres.Reporter.get_reporter() self.logger = logging....
Add basic tests for LoggingHandler.from __future__ import print_function import unittest import teres import teres.handlers import logging import os.path import shutil import StringIO import tempfile class LoggingHandlerSetUp(unittest.TestCase): def setUp(self): self.reporter = teres.Reporter.get_reporte...
<commit_before><commit_msg>Add basic tests for LoggingHandler.<commit_after>from __future__ import print_function import unittest import teres import teres.handlers import logging import os.path import shutil import StringIO import tempfile class LoggingHandlerSetUp(unittest.TestCase): def setUp(self): s...
a209ee1f7ab3be06d03e0eaa926dca5e4811ecc6
lesion/tests/test_lifio.py
lesion/tests/test_lifio.py
import os from lesion import lifio from numpy.testing.decorators import skipif from numpy.testing import assert_equal, assert_allclose currdir = os.path.abspath(os.path.dirname(__file__)) test_lif = os.path.join(currdir, 'mouse-kidney.lif') test_lif_unavailable = not os.path.isfile(test_lif) @skipif(test_lif_unavai...
Add functions to test LIF IO
Add functions to test LIF IO
Python
bsd-3-clause
jni/lesion
Add functions to test LIF IO
import os from lesion import lifio from numpy.testing.decorators import skipif from numpy.testing import assert_equal, assert_allclose currdir = os.path.abspath(os.path.dirname(__file__)) test_lif = os.path.join(currdir, 'mouse-kidney.lif') test_lif_unavailable = not os.path.isfile(test_lif) @skipif(test_lif_unavai...
<commit_before><commit_msg>Add functions to test LIF IO<commit_after>
import os from lesion import lifio from numpy.testing.decorators import skipif from numpy.testing import assert_equal, assert_allclose currdir = os.path.abspath(os.path.dirname(__file__)) test_lif = os.path.join(currdir, 'mouse-kidney.lif') test_lif_unavailable = not os.path.isfile(test_lif) @skipif(test_lif_unavai...
Add functions to test LIF IOimport os from lesion import lifio from numpy.testing.decorators import skipif from numpy.testing import assert_equal, assert_allclose currdir = os.path.abspath(os.path.dirname(__file__)) test_lif = os.path.join(currdir, 'mouse-kidney.lif') test_lif_unavailable = not os.path.isfile(test_l...
<commit_before><commit_msg>Add functions to test LIF IO<commit_after>import os from lesion import lifio from numpy.testing.decorators import skipif from numpy.testing import assert_equal, assert_allclose currdir = os.path.abspath(os.path.dirname(__file__)) test_lif = os.path.join(currdir, 'mouse-kidney.lif') test_li...
4b193e59a53717c80c6835374048ba71c5bfa208
tests/test_cli_common.py
tests/test_cli_common.py
from __future__ import absolute_import import unittest import os from mciutil.cli.common import get_config_filename class CliCommonTests(unittest.TestCase): def test_get_config_filename(self): """ check that package default config exists, otherwise fail this will show up on remote build w...
Check that mideu package config exists (assumes that home and current dir do not have config present)
Check that mideu package config exists (assumes that home and current dir do not have config present)
Python
bsd-3-clause
adelosa/mciutil
Check that mideu package config exists (assumes that home and current dir do not have config present)
from __future__ import absolute_import import unittest import os from mciutil.cli.common import get_config_filename class CliCommonTests(unittest.TestCase): def test_get_config_filename(self): """ check that package default config exists, otherwise fail this will show up on remote build w...
<commit_before><commit_msg>Check that mideu package config exists (assumes that home and current dir do not have config present)<commit_after>
from __future__ import absolute_import import unittest import os from mciutil.cli.common import get_config_filename class CliCommonTests(unittest.TestCase): def test_get_config_filename(self): """ check that package default config exists, otherwise fail this will show up on remote build w...
Check that mideu package config exists (assumes that home and current dir do not have config present)from __future__ import absolute_import import unittest import os from mciutil.cli.common import get_config_filename class CliCommonTests(unittest.TestCase): def test_get_config_filename(self): """ ...
<commit_before><commit_msg>Check that mideu package config exists (assumes that home and current dir do not have config present)<commit_after>from __future__ import absolute_import import unittest import os from mciutil.cli.common import get_config_filename class CliCommonTests(unittest.TestCase): def test_get_c...
9d02b311504c8babf876ce8c45262b7394650d14
tests/test_symmetrize.py
tests/test_symmetrize.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> """ Tests for the 'symmetrize' method. """ import copy import pytest import tbmodels @pytest.fixture def input_model(sample): return tbmodels.io.load(sample("In...
Add test for 'position_tolerance' when symmetrizing.
Add test for 'position_tolerance' when symmetrizing.
Python
apache-2.0
Z2PackDev/TBmodels,Z2PackDev/TBmodels
Add test for 'position_tolerance' when symmetrizing.
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> """ Tests for the 'symmetrize' method. """ import copy import pytest import tbmodels @pytest.fixture def input_model(sample): return tbmodels.io.load(sample("In...
<commit_before><commit_msg>Add test for 'position_tolerance' when symmetrizing.<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> """ Tests for the 'symmetrize' method. """ import copy import pytest import tbmodels @pytest.fixture def input_model(sample): return tbmodels.io.load(sample("In...
Add test for 'position_tolerance' when symmetrizing.#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> """ Tests for the 'symmetrize' method. """ import copy import pytest import tbmodels @pytest.fixture def input_m...
<commit_before><commit_msg>Add test for 'position_tolerance' when symmetrizing.<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> """ Tests for the 'symmetrize' method. """ import copy import pytest impo...
cd6efedc59924cef44dbddaa304483e09fe62d4e
testci/test_featureproducer.py
testci/test_featureproducer.py
import collections import datetime import pytest import numpy as np from PIL import Image #from pelops.datasets.chip import ChipDataset, Chip from pelops.datasets.featuredataset import FeatureDataset from pelops.features.feature_producer import FeatureProducer @pytest.fixture def chip_producer(): Chip = collecti...
Add first tests for `FeatureProducer()`
Add first tests for `FeatureProducer()` These tests do not test all code paths, but it is a start. We still need to add a test file to read.
Python
apache-2.0
dave-lab41/pelops,dave-lab41/pelops,Lab41/pelops,Lab41/pelops,d-grossman/pelops,d-grossman/pelops
Add first tests for `FeatureProducer()` These tests do not test all code paths, but it is a start. We still need to add a test file to read.
import collections import datetime import pytest import numpy as np from PIL import Image #from pelops.datasets.chip import ChipDataset, Chip from pelops.datasets.featuredataset import FeatureDataset from pelops.features.feature_producer import FeatureProducer @pytest.fixture def chip_producer(): Chip = collecti...
<commit_before><commit_msg>Add first tests for `FeatureProducer()` These tests do not test all code paths, but it is a start. We still need to add a test file to read.<commit_after>
import collections import datetime import pytest import numpy as np from PIL import Image #from pelops.datasets.chip import ChipDataset, Chip from pelops.datasets.featuredataset import FeatureDataset from pelops.features.feature_producer import FeatureProducer @pytest.fixture def chip_producer(): Chip = collecti...
Add first tests for `FeatureProducer()` These tests do not test all code paths, but it is a start. We still need to add a test file to read.import collections import datetime import pytest import numpy as np from PIL import Image #from pelops.datasets.chip import ChipDataset, Chip from pelops.datasets.featuredataset ...
<commit_before><commit_msg>Add first tests for `FeatureProducer()` These tests do not test all code paths, but it is a start. We still need to add a test file to read.<commit_after>import collections import datetime import pytest import numpy as np from PIL import Image #from pelops.datasets.chip import ChipDataset, ...
ea1b55dcd3d174888b7d0214fb1fa780cb9a4ebe
chstrings/chstrings_test.py
chstrings/chstrings_test.py
import chstrings import config import unittest class CHStringsTest(unittest.TestCase): @classmethod def add_smoke_test(cls, cfg): def test(self): # We just want to see if this will blow up chstrings.get_localized_strings(cfg, cfg.lang_code) name = 'test_' + cfg.lang_cod...
Add a quick check that we can preprocess strings.
Add a quick check that we can preprocess strings.
Python
mit
guilherme-pg/citationhunt,eggpi/citationhunt,eggpi/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt,guilherme-pg/citationhunt,eggpi/citationhunt,guilherme-pg/citationhunt
Add a quick check that we can preprocess strings.
import chstrings import config import unittest class CHStringsTest(unittest.TestCase): @classmethod def add_smoke_test(cls, cfg): def test(self): # We just want to see if this will blow up chstrings.get_localized_strings(cfg, cfg.lang_code) name = 'test_' + cfg.lang_cod...
<commit_before><commit_msg>Add a quick check that we can preprocess strings.<commit_after>
import chstrings import config import unittest class CHStringsTest(unittest.TestCase): @classmethod def add_smoke_test(cls, cfg): def test(self): # We just want to see if this will blow up chstrings.get_localized_strings(cfg, cfg.lang_code) name = 'test_' + cfg.lang_cod...
Add a quick check that we can preprocess strings.import chstrings import config import unittest class CHStringsTest(unittest.TestCase): @classmethod def add_smoke_test(cls, cfg): def test(self): # We just want to see if this will blow up chstrings.get_localized_strings(cfg, cfg...
<commit_before><commit_msg>Add a quick check that we can preprocess strings.<commit_after>import chstrings import config import unittest class CHStringsTest(unittest.TestCase): @classmethod def add_smoke_test(cls, cfg): def test(self): # We just want to see if this will blow up ...
05db0c76a2eefd2a490573973d417f29eb1303c9
testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py
testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py
""" Description: This file include basis functions lanqinglong@huawei.com """ import logging import os import time class foundation: def __init__(self): self.dir = os.path.join( os.getcwd(), 'log' ) def log (self, loginfo): """ Record log in log directory for deploying test e...
Write a simple adapter in functest project to run TESTON JIRA:FUNCTEST-46
Write a simple adapter in functest project to run TESTON JIRA:FUNCTEST-46 Change-Id: I146ec926da6cbbd2535d0997326a13bd545f42c6 Signed-off-by: Qinglong Lan <0cd11e1cd771fa5a3124ae83fdff3084638adefb@huawei.com>
Python
apache-2.0
opnfv/functest,mywulin/functest,mywulin/functest,opnfv/functest
Write a simple adapter in functest project to run TESTON JIRA:FUNCTEST-46 Change-Id: I146ec926da6cbbd2535d0997326a13bd545f42c6 Signed-off-by: Qinglong Lan <0cd11e1cd771fa5a3124ae83fdff3084638adefb@huawei.com>
""" Description: This file include basis functions lanqinglong@huawei.com """ import logging import os import time class foundation: def __init__(self): self.dir = os.path.join( os.getcwd(), 'log' ) def log (self, loginfo): """ Record log in log directory for deploying test e...
<commit_before><commit_msg>Write a simple adapter in functest project to run TESTON JIRA:FUNCTEST-46 Change-Id: I146ec926da6cbbd2535d0997326a13bd545f42c6 Signed-off-by: Qinglong Lan <0cd11e1cd771fa5a3124ae83fdff3084638adefb@huawei.com><commit_after>
""" Description: This file include basis functions lanqinglong@huawei.com """ import logging import os import time class foundation: def __init__(self): self.dir = os.path.join( os.getcwd(), 'log' ) def log (self, loginfo): """ Record log in log directory for deploying test e...
Write a simple adapter in functest project to run TESTON JIRA:FUNCTEST-46 Change-Id: I146ec926da6cbbd2535d0997326a13bd545f42c6 Signed-off-by: Qinglong Lan <0cd11e1cd771fa5a3124ae83fdff3084638adefb@huawei.com>""" Description: This file include basis functions lanqinglong@huawei.com """ import logging import os...
<commit_before><commit_msg>Write a simple adapter in functest project to run TESTON JIRA:FUNCTEST-46 Change-Id: I146ec926da6cbbd2535d0997326a13bd545f42c6 Signed-off-by: Qinglong Lan <0cd11e1cd771fa5a3124ae83fdff3084638adefb@huawei.com><commit_after>""" Description: This file include basis functions lanqinglong...
46b7667bf704e98c52dbd9eb41a7ccbf6de9229e
trump/tools/tests/test_sqla.py
trump/tools/tests/test_sqla.py
from ...orm import SetupTrump, SymbolManager class TestToolsSQLA(object): def setup_method(self, test_method): self.eng = SetupTrump() self.sm = SymbolManager(self.eng) def test_repr_mixin(self): sym = self.sm.create("testsym", overwrite=True) assert repr(sym) == """Symbol...
Add test for repr mixin
TST: Add test for repr mixin
Python
bsd-3-clause
Equitable/trump,Asiant/trump,jnmclarty/trump
TST: Add test for repr mixin
from ...orm import SetupTrump, SymbolManager class TestToolsSQLA(object): def setup_method(self, test_method): self.eng = SetupTrump() self.sm = SymbolManager(self.eng) def test_repr_mixin(self): sym = self.sm.create("testsym", overwrite=True) assert repr(sym) == """Symbol...
<commit_before><commit_msg>TST: Add test for repr mixin<commit_after>
from ...orm import SetupTrump, SymbolManager class TestToolsSQLA(object): def setup_method(self, test_method): self.eng = SetupTrump() self.sm = SymbolManager(self.eng) def test_repr_mixin(self): sym = self.sm.create("testsym", overwrite=True) assert repr(sym) == """Symbol...
TST: Add test for repr mixinfrom ...orm import SetupTrump, SymbolManager class TestToolsSQLA(object): def setup_method(self, test_method): self.eng = SetupTrump() self.sm = SymbolManager(self.eng) def test_repr_mixin(self): sym = self.sm.create("testsym", overwrite=True) a...
<commit_before><commit_msg>TST: Add test for repr mixin<commit_after>from ...orm import SetupTrump, SymbolManager class TestToolsSQLA(object): def setup_method(self, test_method): self.eng = SetupTrump() self.sm = SymbolManager(self.eng) def test_repr_mixin(self): sym = self.sm.cr...
af5b12f4fdda3f9ccfee19d2a7589fed6a7faee5
news/migrations/0004_auto_20160301_2235.py
news/migrations/0004_auto_20160301_2235.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def make_articles_boring(apps, schema_editor): Article = apps.get_model("news", "Article") for article in Article.objects.filter(url__contains='http://www.nu.nl/gadgets/'): for version in article....
Add migrations for boring articles.
Add migrations for boring articles.
Python
mit
flupzor/newsdiffs,flupzor/newsdiffs,flupzor/newsdiffs,flupzor/bijgeschaafd,flupzor/bijgeschaafd,flupzor/bijgeschaafd,flupzor/bijgeschaafd,flupzor/newsdiffs
Add migrations for boring articles.
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def make_articles_boring(apps, schema_editor): Article = apps.get_model("news", "Article") for article in Article.objects.filter(url__contains='http://www.nu.nl/gadgets/'): for version in article....
<commit_before><commit_msg>Add migrations for boring articles.<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def make_articles_boring(apps, schema_editor): Article = apps.get_model("news", "Article") for article in Article.objects.filter(url__contains='http://www.nu.nl/gadgets/'): for version in article....
Add migrations for boring articles.# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def make_articles_boring(apps, schema_editor): Article = apps.get_model("news", "Article") for article in Article.objects.filter(url__contains='http://www.nu.nl/gadgets/...
<commit_before><commit_msg>Add migrations for boring articles.<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def make_articles_boring(apps, schema_editor): Article = apps.get_model("news", "Article") for article in Article.objects.filter...
fb0e9e0d6de608a255cac00acbecdc445b2da93c
examples/act_experience_update.py
examples/act_experience_update.py
# Copyright 2020 Tensorforce Team. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
Update last commit: add act-experience-update example
Update last commit: add act-experience-update example
Python
apache-2.0
reinforceio/tensorforce
Update last commit: add act-experience-update example
# Copyright 2020 Tensorforce Team. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
<commit_before><commit_msg>Update last commit: add act-experience-update example<commit_after>
# Copyright 2020 Tensorforce Team. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
Update last commit: add act-experience-update example# Copyright 2020 Tensorforce Team. 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/lice...
<commit_before><commit_msg>Update last commit: add act-experience-update example<commit_after># Copyright 2020 Tensorforce Team. 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...
8ac380905f969eab9be64cc97d8e5ec4d7c53e26
sorting/merge_sort.py
sorting/merge_sort.py
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Merge Sort. Best, Average, Worst: O(nlogn). ''' def merge_sort(array, result, left, right, order): if right - left < 2: return if (right - left) == 2: if order == 'asc': if result[left] > result[right-1]: result[...
Implement the merge sort algorithm.
Implement the merge sort algorithm.
Python
mit
weichen2046/algorithm-study,weichen2046/algorithm-study
Implement the merge sort algorithm.
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Merge Sort. Best, Average, Worst: O(nlogn). ''' def merge_sort(array, result, left, right, order): if right - left < 2: return if (right - left) == 2: if order == 'asc': if result[left] > result[right-1]: result[...
<commit_before><commit_msg>Implement the merge sort algorithm.<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Merge Sort. Best, Average, Worst: O(nlogn). ''' def merge_sort(array, result, left, right, order): if right - left < 2: return if (right - left) == 2: if order == 'asc': if result[left] > result[right-1]: result[...
Implement the merge sort algorithm.#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Merge Sort. Best, Average, Worst: O(nlogn). ''' def merge_sort(array, result, left, right, order): if right - left < 2: return if (right - left) == 2: if order == 'asc': if result[left] > resul...
<commit_before><commit_msg>Implement the merge sort algorithm.<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Merge Sort. Best, Average, Worst: O(nlogn). ''' def merge_sort(array, result, left, right, order): if right - left < 2: return if (right - left) == 2: if order == '...
bfbeee63deecb424a528b44225b2dd4c67bbbc23
manage.py
manage.py
from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import db, create_app from app.models import User, BucketList, Item app = create_app("development") manager = Manager(app) migrate = Migrate(app, db) @manager.command def createdb(): db.create_all() print("database ta...
Add database migrations and creation script
Add database migrations and creation script
Python
mit
brayoh/bucket-list-api
Add database migrations and creation script
from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import db, create_app from app.models import User, BucketList, Item app = create_app("development") manager = Manager(app) migrate = Migrate(app, db) @manager.command def createdb(): db.create_all() print("database ta...
<commit_before><commit_msg>Add database migrations and creation script<commit_after>
from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import db, create_app from app.models import User, BucketList, Item app = create_app("development") manager = Manager(app) migrate = Migrate(app, db) @manager.command def createdb(): db.create_all() print("database ta...
Add database migrations and creation scriptfrom flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import db, create_app from app.models import User, BucketList, Item app = create_app("development") manager = Manager(app) migrate = Migrate(app, db) @manager.command def createdb():...
<commit_before><commit_msg>Add database migrations and creation script<commit_after>from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from app import db, create_app from app.models import User, BucketList, Item app = create_app("development") manager = Manager(app) migrate = Migrate(a...
77917be83586e1963fb3b11cdb9631a766acb294
pyagg/tests/test_canvas.py
pyagg/tests/test_canvas.py
import numpy as np from numpy.testing import assert_equal from pyagg import GraphicsState, Color, ndarray_canvas_rgb24 def test_line(): expected = np.zeros((100, 100, 3), dtype=np.uint8) buffer = np.zeros((100, 100, 3), dtype=np.uint8) canvas = ndarray_canvas_rgb24(buffer) gs = GraphicsState() g...
Add a test module where canvas unit tests will go
Add a test module where canvas unit tests will go Only a simple line drawing test there for now...
Python
mit
celiagg/celiagg,celiagg/celiagg,celiagg/celiagg,celiagg/celiagg,celiagg/celiagg
Add a test module where canvas unit tests will go Only a simple line drawing test there for now...
import numpy as np from numpy.testing import assert_equal from pyagg import GraphicsState, Color, ndarray_canvas_rgb24 def test_line(): expected = np.zeros((100, 100, 3), dtype=np.uint8) buffer = np.zeros((100, 100, 3), dtype=np.uint8) canvas = ndarray_canvas_rgb24(buffer) gs = GraphicsState() g...
<commit_before><commit_msg>Add a test module where canvas unit tests will go Only a simple line drawing test there for now...<commit_after>
import numpy as np from numpy.testing import assert_equal from pyagg import GraphicsState, Color, ndarray_canvas_rgb24 def test_line(): expected = np.zeros((100, 100, 3), dtype=np.uint8) buffer = np.zeros((100, 100, 3), dtype=np.uint8) canvas = ndarray_canvas_rgb24(buffer) gs = GraphicsState() g...
Add a test module where canvas unit tests will go Only a simple line drawing test there for now...import numpy as np from numpy.testing import assert_equal from pyagg import GraphicsState, Color, ndarray_canvas_rgb24 def test_line(): expected = np.zeros((100, 100, 3), dtype=np.uint8) buffer = np.zeros((100,...
<commit_before><commit_msg>Add a test module where canvas unit tests will go Only a simple line drawing test there for now...<commit_after>import numpy as np from numpy.testing import assert_equal from pyagg import GraphicsState, Color, ndarray_canvas_rgb24 def test_line(): expected = np.zeros((100, 100, 3), dt...
f118339ae2e55ed5d07480094f5706eef6ed858d
pmdarima/preprocessing/endog/tests/test_log.py
pmdarima/preprocessing/endog/tests/test_log.py
# -*- coding: utf-8 -*- import numpy as np from numpy.testing import assert_array_almost_equal from scipy import stats import pytest from pmdarima.preprocessing import LogEndogTransformer from pmdarima.preprocessing import BoxCoxEndogTransformer def test_same(): y = [1, 2, 3] trans = BoxCoxEndogTransformer()...
Add test for empty LogEndogTransformer
Add test for empty LogEndogTransformer
Python
mit
tgsmith61591/pyramid,tgsmith61591/pyramid,alkaline-ml/pmdarima,alkaline-ml/pmdarima,tgsmith61591/pyramid,alkaline-ml/pmdarima
Add test for empty LogEndogTransformer
# -*- coding: utf-8 -*- import numpy as np from numpy.testing import assert_array_almost_equal from scipy import stats import pytest from pmdarima.preprocessing import LogEndogTransformer from pmdarima.preprocessing import BoxCoxEndogTransformer def test_same(): y = [1, 2, 3] trans = BoxCoxEndogTransformer()...
<commit_before><commit_msg>Add test for empty LogEndogTransformer<commit_after>
# -*- coding: utf-8 -*- import numpy as np from numpy.testing import assert_array_almost_equal from scipy import stats import pytest from pmdarima.preprocessing import LogEndogTransformer from pmdarima.preprocessing import BoxCoxEndogTransformer def test_same(): y = [1, 2, 3] trans = BoxCoxEndogTransformer()...
Add test for empty LogEndogTransformer# -*- coding: utf-8 -*- import numpy as np from numpy.testing import assert_array_almost_equal from scipy import stats import pytest from pmdarima.preprocessing import LogEndogTransformer from pmdarima.preprocessing import BoxCoxEndogTransformer def test_same(): y = [1, 2, 3...
<commit_before><commit_msg>Add test for empty LogEndogTransformer<commit_after># -*- coding: utf-8 -*- import numpy as np from numpy.testing import assert_array_almost_equal from scipy import stats import pytest from pmdarima.preprocessing import LogEndogTransformer from pmdarima.preprocessing import BoxCoxEndogTrans...
099c0af192cabb11fad220296c327654b4c10b3e
tools/upload_build.py
tools/upload_build.py
"""This script upload a newly-build version of CocoMUD for Windows. The Download wiki page on Redmine are updated. Requirements: This script needs 'python-redmine', which you can obtain with pip install python-redmine """ import argparse from json import dumps import os import re import sys import urll...
Add a tool to upload a build
Add a tool to upload a build
Python
bsd-3-clause
vlegoff/cocomud
Add a tool to upload a build
"""This script upload a newly-build version of CocoMUD for Windows. The Download wiki page on Redmine are updated. Requirements: This script needs 'python-redmine', which you can obtain with pip install python-redmine """ import argparse from json import dumps import os import re import sys import urll...
<commit_before><commit_msg>Add a tool to upload a build<commit_after>
"""This script upload a newly-build version of CocoMUD for Windows. The Download wiki page on Redmine are updated. Requirements: This script needs 'python-redmine', which you can obtain with pip install python-redmine """ import argparse from json import dumps import os import re import sys import urll...
Add a tool to upload a build"""This script upload a newly-build version of CocoMUD for Windows. The Download wiki page on Redmine are updated. Requirements: This script needs 'python-redmine', which you can obtain with pip install python-redmine """ import argparse from json import dumps import os impo...
<commit_before><commit_msg>Add a tool to upload a build<commit_after>"""This script upload a newly-build version of CocoMUD for Windows. The Download wiki page on Redmine are updated. Requirements: This script needs 'python-redmine', which you can obtain with pip install python-redmine """ import argpa...
911cb1838dcb974dfa1e28712a1f884c89c2b600
migrations/versions/577ad345788e_.py
migrations/versions/577ad345788e_.py
"""empty message Revision ID: 577ad345788e Revises: 3b655c2d1a85 Create Date: 2015-11-17 11:18:22.685983 """ # revision identifiers, used by Alembic. revision = '577ad345788e' down_revision = '3b655c2d1a85' from alembic import op import sqlalchemy as sa def upgrade(): command = """ ALTER TABLE auth_provid...
Add cascade for easier deletion of users from database.
Add cascade for easier deletion of users from database.
Python
bsd-3-clause
uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal
Add cascade for easier deletion of users from database.
"""empty message Revision ID: 577ad345788e Revises: 3b655c2d1a85 Create Date: 2015-11-17 11:18:22.685983 """ # revision identifiers, used by Alembic. revision = '577ad345788e' down_revision = '3b655c2d1a85' from alembic import op import sqlalchemy as sa def upgrade(): command = """ ALTER TABLE auth_provid...
<commit_before><commit_msg>Add cascade for easier deletion of users from database.<commit_after>
"""empty message Revision ID: 577ad345788e Revises: 3b655c2d1a85 Create Date: 2015-11-17 11:18:22.685983 """ # revision identifiers, used by Alembic. revision = '577ad345788e' down_revision = '3b655c2d1a85' from alembic import op import sqlalchemy as sa def upgrade(): command = """ ALTER TABLE auth_provid...
Add cascade for easier deletion of users from database."""empty message Revision ID: 577ad345788e Revises: 3b655c2d1a85 Create Date: 2015-11-17 11:18:22.685983 """ # revision identifiers, used by Alembic. revision = '577ad345788e' down_revision = '3b655c2d1a85' from alembic import op import sqlalchemy as sa def u...
<commit_before><commit_msg>Add cascade for easier deletion of users from database.<commit_after>"""empty message Revision ID: 577ad345788e Revises: 3b655c2d1a85 Create Date: 2015-11-17 11:18:22.685983 """ # revision identifiers, used by Alembic. revision = '577ad345788e' down_revision = '3b655c2d1a85' from alembic ...
e8844c62571e85b38287048bac9666972ae674de
migrations/versions/888b56ed5dcb_.py
migrations/versions/888b56ed5dcb_.py
"""Add table for additional user attributes Revision ID: 888b56ed5dcb Revises: d5870fd2f2a4 Create Date: 2021-02-10 12:17:40.880224 """ # revision identifiers, used by Alembic. revision = '888b56ed5dcb' down_revision = 'd5870fd2f2a4' from alembic import op import sqlalchemy as sa def upgrade(): try: o...
Add DB migration script for attributes table
Add DB migration script for attributes table
Python
agpl-3.0
privacyidea/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea
Add DB migration script for attributes table
"""Add table for additional user attributes Revision ID: 888b56ed5dcb Revises: d5870fd2f2a4 Create Date: 2021-02-10 12:17:40.880224 """ # revision identifiers, used by Alembic. revision = '888b56ed5dcb' down_revision = 'd5870fd2f2a4' from alembic import op import sqlalchemy as sa def upgrade(): try: o...
<commit_before><commit_msg>Add DB migration script for attributes table<commit_after>
"""Add table for additional user attributes Revision ID: 888b56ed5dcb Revises: d5870fd2f2a4 Create Date: 2021-02-10 12:17:40.880224 """ # revision identifiers, used by Alembic. revision = '888b56ed5dcb' down_revision = 'd5870fd2f2a4' from alembic import op import sqlalchemy as sa def upgrade(): try: o...
Add DB migration script for attributes table"""Add table for additional user attributes Revision ID: 888b56ed5dcb Revises: d5870fd2f2a4 Create Date: 2021-02-10 12:17:40.880224 """ # revision identifiers, used by Alembic. revision = '888b56ed5dcb' down_revision = 'd5870fd2f2a4' from alembic import op import sqlalche...
<commit_before><commit_msg>Add DB migration script for attributes table<commit_after>"""Add table for additional user attributes Revision ID: 888b56ed5dcb Revises: d5870fd2f2a4 Create Date: 2021-02-10 12:17:40.880224 """ # revision identifiers, used by Alembic. revision = '888b56ed5dcb' down_revision = 'd5870fd2f2a4...
067c256fb9df4170c129b2bc36d1b1323fad6d25
generate_PSC.py
generate_PSC.py
from datetime import datetime as dt from datetime import timedelta as tdelta import numpy as np from astropy.io import fits import astropy.units as u from astropy.coordinates import SkyCoord sky_background = 1000. sky_sigma = 5. nx = 12 ny = 16 nt = 42 data_cube = np.random.normal(sky_background, sky_sigma, (nt,ny,nx)...
Add quick and dirty script to generate a fake postage stamp cue (PSC).
Add quick and dirty script to generate a fake postage stamp cue (PSC).
Python
mit
panoptes/PIAA
Add quick and dirty script to generate a fake postage stamp cue (PSC).
from datetime import datetime as dt from datetime import timedelta as tdelta import numpy as np from astropy.io import fits import astropy.units as u from astropy.coordinates import SkyCoord sky_background = 1000. sky_sigma = 5. nx = 12 ny = 16 nt = 42 data_cube = np.random.normal(sky_background, sky_sigma, (nt,ny,nx)...
<commit_before><commit_msg>Add quick and dirty script to generate a fake postage stamp cue (PSC).<commit_after>
from datetime import datetime as dt from datetime import timedelta as tdelta import numpy as np from astropy.io import fits import astropy.units as u from astropy.coordinates import SkyCoord sky_background = 1000. sky_sigma = 5. nx = 12 ny = 16 nt = 42 data_cube = np.random.normal(sky_background, sky_sigma, (nt,ny,nx)...
Add quick and dirty script to generate a fake postage stamp cue (PSC).from datetime import datetime as dt from datetime import timedelta as tdelta import numpy as np from astropy.io import fits import astropy.units as u from astropy.coordinates import SkyCoord sky_background = 1000. sky_sigma = 5. nx = 12 ny = 16 nt =...
<commit_before><commit_msg>Add quick and dirty script to generate a fake postage stamp cue (PSC).<commit_after>from datetime import datetime as dt from datetime import timedelta as tdelta import numpy as np from astropy.io import fits import astropy.units as u from astropy.coordinates import SkyCoord sky_background = ...
a4aea5e34f44d5f9183258978c85e20fb0fbc0b7
SMSFlyCRM/SMSApp/management/commands/sms_campaign_scheduler.py
SMSFlyCRM/SMSApp/management/commands/sms_campaign_scheduler.py
from datetime import datetime from django.core.management.base import BaseCommand from SMSFlyCRM.SMSApp.tasks import scheduleRecurringCampaignTasksFor class Command(BaseCommand): help = 'Schedules campaign sending for specified interval' def add_arguments(self, parser): parser.add_argument('min_inte...
Add django command for triggering campaigns scheduler
Add django command for triggering campaigns scheduler
Python
mit
wk-tech/crm-smsfly,wk-tech/crm-smsfly,wk-tech/crm-smsfly
Add django command for triggering campaigns scheduler
from datetime import datetime from django.core.management.base import BaseCommand from SMSFlyCRM.SMSApp.tasks import scheduleRecurringCampaignTasksFor class Command(BaseCommand): help = 'Schedules campaign sending for specified interval' def add_arguments(self, parser): parser.add_argument('min_inte...
<commit_before><commit_msg>Add django command for triggering campaigns scheduler<commit_after>
from datetime import datetime from django.core.management.base import BaseCommand from SMSFlyCRM.SMSApp.tasks import scheduleRecurringCampaignTasksFor class Command(BaseCommand): help = 'Schedules campaign sending for specified interval' def add_arguments(self, parser): parser.add_argument('min_inte...
Add django command for triggering campaigns schedulerfrom datetime import datetime from django.core.management.base import BaseCommand from SMSFlyCRM.SMSApp.tasks import scheduleRecurringCampaignTasksFor class Command(BaseCommand): help = 'Schedules campaign sending for specified interval' def add_arguments...
<commit_before><commit_msg>Add django command for triggering campaigns scheduler<commit_after>from datetime import datetime from django.core.management.base import BaseCommand from SMSFlyCRM.SMSApp.tasks import scheduleRecurringCampaignTasksFor class Command(BaseCommand): help = 'Schedules campaign sending for s...
9515bf68e15099582946f9765b2fa081d2570701
course_discovery/apps/course_metadata/migrations/0220_leveltype_remove_order.py
course_discovery/apps/course_metadata/migrations/0220_leveltype_remove_order.py
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('course_metadata', '0219_leveltype_ordering'), ] operations = [ migrations.RemoveField( model_name='leveltype', name='order', ...
Rename order field in LevelType (3/3)
Rename order field in LevelType (3/3) Stage 3: ONLY remove the old column via a migration. DE-1829
Python
agpl-3.0
edx/course-discovery,edx/course-discovery,edx/course-discovery,edx/course-discovery
Rename order field in LevelType (3/3) Stage 3: ONLY remove the old column via a migration. DE-1829
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('course_metadata', '0219_leveltype_ordering'), ] operations = [ migrations.RemoveField( model_name='leveltype', name='order', ...
<commit_before><commit_msg>Rename order field in LevelType (3/3) Stage 3: ONLY remove the old column via a migration. DE-1829<commit_after>
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('course_metadata', '0219_leveltype_ordering'), ] operations = [ migrations.RemoveField( model_name='leveltype', name='order', ...
Rename order field in LevelType (3/3) Stage 3: ONLY remove the old column via a migration. DE-1829from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('course_metadata', '0219_leveltype_ordering'), ] operations = [ ...
<commit_before><commit_msg>Rename order field in LevelType (3/3) Stage 3: ONLY remove the old column via a migration. DE-1829<commit_after>from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('course_metadata', '0219_leveltyp...
302e267c0f1374a11a661418c49aa63f25a38bf9
corehq/apps/export/migrations/0006_delete_dailysavedexportnotification.py
corehq/apps/export/migrations/0006_delete_dailysavedexportnotification.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-10-09 19:24 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('export', '0005_datafile_blobmeta'), ] operations = [ migrations.DeleteModel( ...
Revert "Hold off on migration"
Revert "Hold off on migration" This reverts commit d0cd939e90917bc06b71fb6a6a5aedd881f24840.
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Revert "Hold off on migration" This reverts commit d0cd939e90917bc06b71fb6a6a5aedd881f24840.
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-10-09 19:24 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('export', '0005_datafile_blobmeta'), ] operations = [ migrations.DeleteModel( ...
<commit_before><commit_msg>Revert "Hold off on migration" This reverts commit d0cd939e90917bc06b71fb6a6a5aedd881f24840.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-10-09 19:24 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('export', '0005_datafile_blobmeta'), ] operations = [ migrations.DeleteModel( ...
Revert "Hold off on migration" This reverts commit d0cd939e90917bc06b71fb6a6a5aedd881f24840.# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-10-09 19:24 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('export...
<commit_before><commit_msg>Revert "Hold off on migration" This reverts commit d0cd939e90917bc06b71fb6a6a5aedd881f24840.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-10-09 19:24 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration...
5e19645b4917bf2f0bc9c987ef6148a5833ff05c
aioriak/tests/test_datatypes.py
aioriak/tests/test_datatypes.py
import unittest from aioriak.bucket import Bucket, BucketType from aioriak import datatypes from aioriak.tests.base import IntegrationTest, AsyncUnitTestCase class DatatypeUnitTestBase: dtype = None bucket = Bucket(None, 'test', BucketType(None, 'datatypes')) def op(self, dtype): raise NotImpleme...
Add Riak counter datatype tests
Add Riak counter datatype tests
Python
mit
rambler-digital-solutions/aioriak
Add Riak counter datatype tests
import unittest from aioriak.bucket import Bucket, BucketType from aioriak import datatypes from aioriak.tests.base import IntegrationTest, AsyncUnitTestCase class DatatypeUnitTestBase: dtype = None bucket = Bucket(None, 'test', BucketType(None, 'datatypes')) def op(self, dtype): raise NotImpleme...
<commit_before><commit_msg>Add Riak counter datatype tests<commit_after>
import unittest from aioriak.bucket import Bucket, BucketType from aioriak import datatypes from aioriak.tests.base import IntegrationTest, AsyncUnitTestCase class DatatypeUnitTestBase: dtype = None bucket = Bucket(None, 'test', BucketType(None, 'datatypes')) def op(self, dtype): raise NotImpleme...
Add Riak counter datatype testsimport unittest from aioriak.bucket import Bucket, BucketType from aioriak import datatypes from aioriak.tests.base import IntegrationTest, AsyncUnitTestCase class DatatypeUnitTestBase: dtype = None bucket = Bucket(None, 'test', BucketType(None, 'datatypes')) def op(self, d...
<commit_before><commit_msg>Add Riak counter datatype tests<commit_after>import unittest from aioriak.bucket import Bucket, BucketType from aioriak import datatypes from aioriak.tests.base import IntegrationTest, AsyncUnitTestCase class DatatypeUnitTestBase: dtype = None bucket = Bucket(None, 'test', BucketTyp...
342da37f14c6ac991bd3f7c904bd5b7f1196493a
src/sentry/digests/backends/dummy.py
src/sentry/digests/backends/dummy.py
from __future__ import absolute_import from contextlib import contextmanager from sentry.digests.backends.base import Backend class DummyBackend(Backend): def add(self, key, record): pass @contextmanager def digest(self, key): yield [] def schedule(self, deadline): return ...
from __future__ import absolute_import from contextlib import contextmanager from sentry.digests.backends.base import Backend class DummyBackend(Backend): def add(self, key, record, increment_delay=None, maximum_delay=None): pass @contextmanager def digest(self, key, minimum_delay=None): ...
Fix digests `DummyBackend` method signatures.
Fix digests `DummyBackend` method signatures. This makes them consistent with the base backend API. RIP @tkaemming, stung by dynamic typing.
Python
bsd-3-clause
looker/sentry,mvaled/sentry,JamesMura/sentry,mvaled/sentry,zenefits/sentry,zenefits/sentry,fotinakis/sentry,alexm92/sentry,JamesMura/sentry,BuildingLink/sentry,mvaled/sentry,jean/sentry,JamesMura/sentry,BuildingLink/sentry,JackDanger/sentry,gencer/sentry,fotinakis/sentry,gencer/sentry,daevaorn/sentry,JackDanger/sentry,...
from __future__ import absolute_import from contextlib import contextmanager from sentry.digests.backends.base import Backend class DummyBackend(Backend): def add(self, key, record): pass @contextmanager def digest(self, key): yield [] def schedule(self, deadline): return ...
from __future__ import absolute_import from contextlib import contextmanager from sentry.digests.backends.base import Backend class DummyBackend(Backend): def add(self, key, record, increment_delay=None, maximum_delay=None): pass @contextmanager def digest(self, key, minimum_delay=None): ...
<commit_before>from __future__ import absolute_import from contextlib import contextmanager from sentry.digests.backends.base import Backend class DummyBackend(Backend): def add(self, key, record): pass @contextmanager def digest(self, key): yield [] def schedule(self, deadline): ...
from __future__ import absolute_import from contextlib import contextmanager from sentry.digests.backends.base import Backend class DummyBackend(Backend): def add(self, key, record, increment_delay=None, maximum_delay=None): pass @contextmanager def digest(self, key, minimum_delay=None): ...
from __future__ import absolute_import from contextlib import contextmanager from sentry.digests.backends.base import Backend class DummyBackend(Backend): def add(self, key, record): pass @contextmanager def digest(self, key): yield [] def schedule(self, deadline): return ...
<commit_before>from __future__ import absolute_import from contextlib import contextmanager from sentry.digests.backends.base import Backend class DummyBackend(Backend): def add(self, key, record): pass @contextmanager def digest(self, key): yield [] def schedule(self, deadline): ...