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
22f278b8b457f90a674a50fba121611b87bfdf2e
tests/unit/utils/which_test.py
tests/unit/utils/which_test.py
# Import python libs import os # Import Salt Testing libs from salttesting import TestCase from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs import integration import salt.utils class TestWhich(TestCase): def test_salt_utils_which(self): ''' Tests s...
Add unit test for salt.utils.which
Add unit test for salt.utils.which This is a Linux-only test, it will need some mock love to make it suitable to test for windows paths.
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
Add unit test for salt.utils.which This is a Linux-only test, it will need some mock love to make it suitable to test for windows paths.
# Import python libs import os # Import Salt Testing libs from salttesting import TestCase from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs import integration import salt.utils class TestWhich(TestCase): def test_salt_utils_which(self): ''' Tests s...
<commit_before><commit_msg>Add unit test for salt.utils.which This is a Linux-only test, it will need some mock love to make it suitable to test for windows paths.<commit_after>
# Import python libs import os # Import Salt Testing libs from salttesting import TestCase from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs import integration import salt.utils class TestWhich(TestCase): def test_salt_utils_which(self): ''' Tests s...
Add unit test for salt.utils.which This is a Linux-only test, it will need some mock love to make it suitable to test for windows paths.# Import python libs import os # Import Salt Testing libs from salttesting import TestCase from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import sal...
<commit_before><commit_msg>Add unit test for salt.utils.which This is a Linux-only test, it will need some mock love to make it suitable to test for windows paths.<commit_after># Import python libs import os # Import Salt Testing libs from salttesting import TestCase from salttesting.helpers import ensure_in_syspath ...
e55115a7301c02a7b953ec0a250448259a11a5ee
zou/debug.py
zou/debug.py
from flask_socketio import SocketIO from zou.app import app socketio = SocketIO(app) if __name__ == "__main__": socketio.run(app, debug=True)
Add binary for development server
[dev] Add binary for development server
Python
agpl-3.0
cgwire/zou
[dev] Add binary for development server
from flask_socketio import SocketIO from zou.app import app socketio = SocketIO(app) if __name__ == "__main__": socketio.run(app, debug=True)
<commit_before><commit_msg>[dev] Add binary for development server<commit_after>
from flask_socketio import SocketIO from zou.app import app socketio = SocketIO(app) if __name__ == "__main__": socketio.run(app, debug=True)
[dev] Add binary for development serverfrom flask_socketio import SocketIO from zou.app import app socketio = SocketIO(app) if __name__ == "__main__": socketio.run(app, debug=True)
<commit_before><commit_msg>[dev] Add binary for development server<commit_after>from flask_socketio import SocketIO from zou.app import app socketio = SocketIO(app) if __name__ == "__main__": socketio.run(app, debug=True)
067287c34527ae8a05fa2c13473b147c32b417b0
ielex/lexicon/migrations/0140_auto_20161221_1117.py
ielex/lexicon/migrations/0140_auto_20161221_1117.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-21 11:17 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lexicon', '0139_auto_20161220_1441'), ] operations = [ migrations.AlterFiel...
Add missing migration for d4db9f29f
Add missing migration for d4db9f29f - Commit d4db9f29f changed the attribute Source.ENTRYTYPE to be of a given choice, but the migration for this change was missing and is added by this commit.
Python
bsd-2-clause
lingdb/CoBL-public,lingdb/CoBL-public,lingdb/CoBL-public,lingdb/CoBL-public
Add missing migration for d4db9f29f - Commit d4db9f29f changed the attribute Source.ENTRYTYPE to be of a given choice, but the migration for this change was missing and is added by this commit.
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-21 11:17 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lexicon', '0139_auto_20161220_1441'), ] operations = [ migrations.AlterFiel...
<commit_before><commit_msg>Add missing migration for d4db9f29f - Commit d4db9f29f changed the attribute Source.ENTRYTYPE to be of a given choice, but the migration for this change was missing and is added by this commit.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-21 11:17 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lexicon', '0139_auto_20161220_1441'), ] operations = [ migrations.AlterFiel...
Add missing migration for d4db9f29f - Commit d4db9f29f changed the attribute Source.ENTRYTYPE to be of a given choice, but the migration for this change was missing and is added by this commit.# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-21 11:17 from __future__ import unicode_literals from djang...
<commit_before><commit_msg>Add missing migration for d4db9f29f - Commit d4db9f29f changed the attribute Source.ENTRYTYPE to be of a given choice, but the migration for this change was missing and is added by this commit.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-21 11:17 from __fut...
b9b93ff8f95f249836c1c872c126589a245798f0
recipes/py2dm/run_test.py
recipes/py2dm/run_test.py
#!/usr/bin/env python3 import unittest class Py2DMTestCase(unittest.TestCase): # The module will throw a warning if the C implementation cannot be # loaded. Make sure this warning is NOT thrown @unittest.expectedFailure def test_cimport(self): with self.assertWarns(UserWarning): im...
Test successful load of C extension
Test successful load of C extension
Python
bsd-3-clause
goanpeca/staged-recipes,conda-forge/staged-recipes,jakirkham/staged-recipes,goanpeca/staged-recipes,johanneskoester/staged-recipes,conda-forge/staged-recipes,ocefpaf/staged-recipes,ocefpaf/staged-recipes,johanneskoester/staged-recipes,jakirkham/staged-recipes
Test successful load of C extension
#!/usr/bin/env python3 import unittest class Py2DMTestCase(unittest.TestCase): # The module will throw a warning if the C implementation cannot be # loaded. Make sure this warning is NOT thrown @unittest.expectedFailure def test_cimport(self): with self.assertWarns(UserWarning): im...
<commit_before><commit_msg>Test successful load of C extension<commit_after>
#!/usr/bin/env python3 import unittest class Py2DMTestCase(unittest.TestCase): # The module will throw a warning if the C implementation cannot be # loaded. Make sure this warning is NOT thrown @unittest.expectedFailure def test_cimport(self): with self.assertWarns(UserWarning): im...
Test successful load of C extension#!/usr/bin/env python3 import unittest class Py2DMTestCase(unittest.TestCase): # The module will throw a warning if the C implementation cannot be # loaded. Make sure this warning is NOT thrown @unittest.expectedFailure def test_cimport(self): with self.asser...
<commit_before><commit_msg>Test successful load of C extension<commit_after>#!/usr/bin/env python3 import unittest class Py2DMTestCase(unittest.TestCase): # The module will throw a warning if the C implementation cannot be # loaded. Make sure this warning is NOT thrown @unittest.expectedFailure def te...
6e36732150295869a8ddaebbaf6ff07b76eb06b8
uwsgi-nginx/app/main.py
uwsgi-nginx/app/main.py
# test.py def application(env, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) #return [b"Hello World"] # python3 return ["Hello World"] # python2
Add default Python example app
Add default Python example app
Python
apache-2.0
tiangolo/uwsgi-nginx-docker,tiangolo/uwsgi-nginx-docker
Add default Python example app
# test.py def application(env, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) #return [b"Hello World"] # python3 return ["Hello World"] # python2
<commit_before><commit_msg>Add default Python example app<commit_after>
# test.py def application(env, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) #return [b"Hello World"] # python3 return ["Hello World"] # python2
Add default Python example app# test.py def application(env, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) #return [b"Hello World"] # python3 return ["Hello World"] # python2
<commit_before><commit_msg>Add default Python example app<commit_after># test.py def application(env, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) #return [b"Hello World"] # python3 return ["Hello World"] # python2
014caf2a13f93df60454b05bcc7c8381a424b24b
nap/actions.py
nap/actions.py
from django.utils.encoding import force_text class CSV(object): ''' A generator friendly, unicode aware CSV encoder class built for speed. ''' # What to put between fields SEP = u',' # What to wrap fields in, if they contain SEP QUOTE = u'"' # What to replace a QUOTE in a field with ...
Add simple CSV encoder and Export action
Add simple CSV encoder and Export action
Python
bsd-3-clause
limbera/django-nap,MarkusH/django-nap
Add simple CSV encoder and Export action
from django.utils.encoding import force_text class CSV(object): ''' A generator friendly, unicode aware CSV encoder class built for speed. ''' # What to put between fields SEP = u',' # What to wrap fields in, if they contain SEP QUOTE = u'"' # What to replace a QUOTE in a field with ...
<commit_before><commit_msg>Add simple CSV encoder and Export action<commit_after>
from django.utils.encoding import force_text class CSV(object): ''' A generator friendly, unicode aware CSV encoder class built for speed. ''' # What to put between fields SEP = u',' # What to wrap fields in, if they contain SEP QUOTE = u'"' # What to replace a QUOTE in a field with ...
Add simple CSV encoder and Export action from django.utils.encoding import force_text class CSV(object): ''' A generator friendly, unicode aware CSV encoder class built for speed. ''' # What to put between fields SEP = u',' # What to wrap fields in, if they contain SEP QUOTE = u'"' # Wh...
<commit_before><commit_msg>Add simple CSV encoder and Export action<commit_after> from django.utils.encoding import force_text class CSV(object): ''' A generator friendly, unicode aware CSV encoder class built for speed. ''' # What to put between fields SEP = u',' # What to wrap fields in, if t...
bbb3638374d748a91f9a1cdc5450b6b2a8474597
corehq/apps/commtrack/management/commands/fix_ipm.py
corehq/apps/commtrack/management/commands/fix_ipm.py
from django.core.management.base import BaseCommand from couchforms.models import XFormInstance from dimagi.utils.couch.database import iter_docs from corehq.apps.commtrack.models import SupplyPointCase class Command(BaseCommand): startkey = ['ipm-senegal', 'by_type', 'XFormInstance'] endkey = startkey + [{}]...
Add command to cleanup commtrack forms
Add command to cleanup commtrack forms
Python
bsd-3-clause
puttarajubr/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
Add command to cleanup commtrack forms
from django.core.management.base import BaseCommand from couchforms.models import XFormInstance from dimagi.utils.couch.database import iter_docs from corehq.apps.commtrack.models import SupplyPointCase class Command(BaseCommand): startkey = ['ipm-senegal', 'by_type', 'XFormInstance'] endkey = startkey + [{}]...
<commit_before><commit_msg>Add command to cleanup commtrack forms<commit_after>
from django.core.management.base import BaseCommand from couchforms.models import XFormInstance from dimagi.utils.couch.database import iter_docs from corehq.apps.commtrack.models import SupplyPointCase class Command(BaseCommand): startkey = ['ipm-senegal', 'by_type', 'XFormInstance'] endkey = startkey + [{}]...
Add command to cleanup commtrack formsfrom django.core.management.base import BaseCommand from couchforms.models import XFormInstance from dimagi.utils.couch.database import iter_docs from corehq.apps.commtrack.models import SupplyPointCase class Command(BaseCommand): startkey = ['ipm-senegal', 'by_type', 'XFormI...
<commit_before><commit_msg>Add command to cleanup commtrack forms<commit_after>from django.core.management.base import BaseCommand from couchforms.models import XFormInstance from dimagi.utils.couch.database import iter_docs from corehq.apps.commtrack.models import SupplyPointCase class Command(BaseCommand): star...
f25a7b260ea888b1470e3203b0ce3d94bfdf477d
data.py
data.py
import numpy as np def _consecutive_index_generator(length, offset=0): """Generate pair of ids of consecutive images. Offset is the distance between the images """ offset += 1 for i in range(length - offset): yield (i, i + offset) def generate_learning_set(array, random_permutation=True, offs...
Add small script to generate learning set.
Add small script to generate learning set.
Python
mit
ogrisel/brain2vec
Add small script to generate learning set.
import numpy as np def _consecutive_index_generator(length, offset=0): """Generate pair of ids of consecutive images. Offset is the distance between the images """ offset += 1 for i in range(length - offset): yield (i, i + offset) def generate_learning_set(array, random_permutation=True, offs...
<commit_before><commit_msg>Add small script to generate learning set.<commit_after>
import numpy as np def _consecutive_index_generator(length, offset=0): """Generate pair of ids of consecutive images. Offset is the distance between the images """ offset += 1 for i in range(length - offset): yield (i, i + offset) def generate_learning_set(array, random_permutation=True, offs...
Add small script to generate learning set.import numpy as np def _consecutive_index_generator(length, offset=0): """Generate pair of ids of consecutive images. Offset is the distance between the images """ offset += 1 for i in range(length - offset): yield (i, i + offset) def generate_learnin...
<commit_before><commit_msg>Add small script to generate learning set.<commit_after>import numpy as np def _consecutive_index_generator(length, offset=0): """Generate pair of ids of consecutive images. Offset is the distance between the images """ offset += 1 for i in range(length - offset): yi...
00a4bde767b4392e19ef366c7d9f916415af2762
django_mailbox/management/commands/processincomingmessage.py
django_mailbox/management/commands/processincomingmessage.py
import email import logging import rfc822 import sys from django.core.management.base import BaseCommand from django_mailbox.models import Mailbox logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) class Command(BaseCommand): def handle(self, *args, **options): message = email....
import email import logging import rfc822 import sys from django.core.management.base import BaseCommand from django_mailbox.models import Mailbox logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) class Command(BaseCommand): def handle(self, *args, **options): message = email....
Use TO header for creating mailbox name.
Use TO header for creating mailbox name. --HG-- branch : exim4_pipe
Python
mit
leifurhauks/django-mailbox,Shekharrajak/django-mailbox,coddingtonbear/django-mailbox,ad-m/django-mailbox
import email import logging import rfc822 import sys from django.core.management.base import BaseCommand from django_mailbox.models import Mailbox logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) class Command(BaseCommand): def handle(self, *args, **options): message = email....
import email import logging import rfc822 import sys from django.core.management.base import BaseCommand from django_mailbox.models import Mailbox logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) class Command(BaseCommand): def handle(self, *args, **options): message = email....
<commit_before>import email import logging import rfc822 import sys from django.core.management.base import BaseCommand from django_mailbox.models import Mailbox logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) class Command(BaseCommand): def handle(self, *args, **options): m...
import email import logging import rfc822 import sys from django.core.management.base import BaseCommand from django_mailbox.models import Mailbox logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) class Command(BaseCommand): def handle(self, *args, **options): message = email....
import email import logging import rfc822 import sys from django.core.management.base import BaseCommand from django_mailbox.models import Mailbox logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) class Command(BaseCommand): def handle(self, *args, **options): message = email....
<commit_before>import email import logging import rfc822 import sys from django.core.management.base import BaseCommand from django_mailbox.models import Mailbox logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) class Command(BaseCommand): def handle(self, *args, **options): m...
7068258e692872b2fb7bbdade55dadaecff2ffb5
python/day11.py
python/day11.py
#!/usr/local/bin/python3 puzzle_input = 'vzbxkghb' def validate_password(password): pass def test_validate_password(): assert not validate_password('hijklmmn') assert not validate_password('abbceffg') assert not validate_password('abbcegjk')
Add Day 11 python file
Add Day 11 python file
Python
mit
robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions
Add Day 11 python file
#!/usr/local/bin/python3 puzzle_input = 'vzbxkghb' def validate_password(password): pass def test_validate_password(): assert not validate_password('hijklmmn') assert not validate_password('abbceffg') assert not validate_password('abbcegjk')
<commit_before><commit_msg>Add Day 11 python file<commit_after>
#!/usr/local/bin/python3 puzzle_input = 'vzbxkghb' def validate_password(password): pass def test_validate_password(): assert not validate_password('hijklmmn') assert not validate_password('abbceffg') assert not validate_password('abbcegjk')
Add Day 11 python file#!/usr/local/bin/python3 puzzle_input = 'vzbxkghb' def validate_password(password): pass def test_validate_password(): assert not validate_password('hijklmmn') assert not validate_password('abbceffg') assert not validate_password('abbcegjk')
<commit_before><commit_msg>Add Day 11 python file<commit_after>#!/usr/local/bin/python3 puzzle_input = 'vzbxkghb' def validate_password(password): pass def test_validate_password(): assert not validate_password('hijklmmn') assert not validate_password('abbceffg') assert not validate_password('abbc...
b32b84b2c696a4ae5ff57035dee5bc2033affe34
tests/test_main.py
tests/test_main.py
"""tests/test_main.py. Basic testing of hug's `__main__` module Copyright (C) 2016 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without l...
Add minimial testing of __main__ module
Add minimial testing of __main__ module
Python
mit
timothycrosley/hug,timothycrosley/hug,timothycrosley/hug
Add minimial testing of __main__ module
"""tests/test_main.py. Basic testing of hug's `__main__` module Copyright (C) 2016 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without l...
<commit_before><commit_msg>Add minimial testing of __main__ module<commit_after>
"""tests/test_main.py. Basic testing of hug's `__main__` module Copyright (C) 2016 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without l...
Add minimial testing of __main__ module"""tests/test_main.py. Basic testing of hug's `__main__` module Copyright (C) 2016 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software w...
<commit_before><commit_msg>Add minimial testing of __main__ module<commit_after>"""tests/test_main.py. Basic testing of hug's `__main__` module Copyright (C) 2016 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (t...
cce2869ac56fe3576e519884fd2a68d75a7fe1cb
backend/scripts/countdups.py
backend/scripts/countdups.py
#!/usr/bin/env python import rethinkdb as r conn = r.connect('localhost', 30815, db='materialscommons') rql = r.table('datafiles').filter(r.row['usesid'].match("^[0-9a-f]")).pluck('size') total_bytes = 0 total_files = 0 for doc in rql.run(conn): total_bytes = total_bytes + doc['size'] total_files = total_file...
Add in script to count duplicates.
Add in script to count duplicates.
Python
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
Add in script to count duplicates.
#!/usr/bin/env python import rethinkdb as r conn = r.connect('localhost', 30815, db='materialscommons') rql = r.table('datafiles').filter(r.row['usesid'].match("^[0-9a-f]")).pluck('size') total_bytes = 0 total_files = 0 for doc in rql.run(conn): total_bytes = total_bytes + doc['size'] total_files = total_file...
<commit_before><commit_msg>Add in script to count duplicates.<commit_after>
#!/usr/bin/env python import rethinkdb as r conn = r.connect('localhost', 30815, db='materialscommons') rql = r.table('datafiles').filter(r.row['usesid'].match("^[0-9a-f]")).pluck('size') total_bytes = 0 total_files = 0 for doc in rql.run(conn): total_bytes = total_bytes + doc['size'] total_files = total_file...
Add in script to count duplicates.#!/usr/bin/env python import rethinkdb as r conn = r.connect('localhost', 30815, db='materialscommons') rql = r.table('datafiles').filter(r.row['usesid'].match("^[0-9a-f]")).pluck('size') total_bytes = 0 total_files = 0 for doc in rql.run(conn): total_bytes = total_bytes + doc['s...
<commit_before><commit_msg>Add in script to count duplicates.<commit_after>#!/usr/bin/env python import rethinkdb as r conn = r.connect('localhost', 30815, db='materialscommons') rql = r.table('datafiles').filter(r.row['usesid'].match("^[0-9a-f]")).pluck('size') total_bytes = 0 total_files = 0 for doc in rql.run(conn...
063375e9dbb5afad92d21fc6fc22242e373dfdd0
py/non-decreasing-array.py
py/non-decreasing-array.py
class Solution(object): def checkPossibility(self, nums): """ :type nums: List[int] :rtype: bool """ if not nums: return True l = len(nums) fixed = False for i in xrange(l): if i + 1 < l: if nums[i] > nums[i + 1...
Add py solution for 665. Non-decreasing Array
Add py solution for 665. Non-decreasing Array 665. Non-decreasing Array: https://leetcode.com/problems/non-decreasing-array/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 665. Non-decreasing Array 665. Non-decreasing Array: https://leetcode.com/problems/non-decreasing-array/
class Solution(object): def checkPossibility(self, nums): """ :type nums: List[int] :rtype: bool """ if not nums: return True l = len(nums) fixed = False for i in xrange(l): if i + 1 < l: if nums[i] > nums[i + 1...
<commit_before><commit_msg>Add py solution for 665. Non-decreasing Array 665. Non-decreasing Array: https://leetcode.com/problems/non-decreasing-array/<commit_after>
class Solution(object): def checkPossibility(self, nums): """ :type nums: List[int] :rtype: bool """ if not nums: return True l = len(nums) fixed = False for i in xrange(l): if i + 1 < l: if nums[i] > nums[i + 1...
Add py solution for 665. Non-decreasing Array 665. Non-decreasing Array: https://leetcode.com/problems/non-decreasing-array/class Solution(object): def checkPossibility(self, nums): """ :type nums: List[int] :rtype: bool """ if not nums: return True l = ...
<commit_before><commit_msg>Add py solution for 665. Non-decreasing Array 665. Non-decreasing Array: https://leetcode.com/problems/non-decreasing-array/<commit_after>class Solution(object): def checkPossibility(self, nums): """ :type nums: List[int] :rtype: bool """ if not nu...
b1df5d3ad77187d6a2bdf67552268511808ab06b
python/test/test_buffer.py
python/test/test_buffer.py
#!/usr/bin/env python # coding: utf-8 from nose import main from nose.tools import * from msgpack import packb, unpackb def test_unpack_buffer(): from array import array buf = array('b') buf.fromstring(packb(['foo', 'bar'])) obj = unpackb(buf) assert_equal(['foo', 'bar'], obj) if __name__ == '__m...
Add test for unpacking buffer object.
python: Add test for unpacking buffer object.
Python
apache-2.0
nurse/msgpack-ruby,jen20/msgpack-c,nobu-k/msgpack-c,juanrubio/msgpack-c,soumith/msgpack-c,vashstorm/msgpack-c,AALEKH/msgpack-c,jpetso/msgpack-c,undeadlabs/msgpack-cli,ojundt/msgpack-ruby,kou/msgpack-ruby,kern/msgpack-c,msgpack/msgpack-ruby,okkez/msgpack-ruby,juanrubio/msgpack-c,jpetso/msgpack-c,kpkhxlgy0/msgpack-c,Game...
python: Add test for unpacking buffer object.
#!/usr/bin/env python # coding: utf-8 from nose import main from nose.tools import * from msgpack import packb, unpackb def test_unpack_buffer(): from array import array buf = array('b') buf.fromstring(packb(['foo', 'bar'])) obj = unpackb(buf) assert_equal(['foo', 'bar'], obj) if __name__ == '__m...
<commit_before><commit_msg>python: Add test for unpacking buffer object.<commit_after>
#!/usr/bin/env python # coding: utf-8 from nose import main from nose.tools import * from msgpack import packb, unpackb def test_unpack_buffer(): from array import array buf = array('b') buf.fromstring(packb(['foo', 'bar'])) obj = unpackb(buf) assert_equal(['foo', 'bar'], obj) if __name__ == '__m...
python: Add test for unpacking buffer object.#!/usr/bin/env python # coding: utf-8 from nose import main from nose.tools import * from msgpack import packb, unpackb def test_unpack_buffer(): from array import array buf = array('b') buf.fromstring(packb(['foo', 'bar'])) obj = unpackb(buf) assert_eq...
<commit_before><commit_msg>python: Add test for unpacking buffer object.<commit_after>#!/usr/bin/env python # coding: utf-8 from nose import main from nose.tools import * from msgpack import packb, unpackb def test_unpack_buffer(): from array import array buf = array('b') buf.fromstring(packb(['foo', 'bar...
f8bd1a55c37776352d59dcd50363bda1ab3e0932
examples/welcome_message.py
examples/welcome_message.py
""" instabot example Workflow: Welcome message for new followers. """ import argparse import os import sys from tqdm import tqdm sys.path.append(os.path.join(sys.path[0], '../')) from instabot import Bot NOTIFIED_USERS_PATH = 'notified_users.txt' MESSAGE = 'Thank you for a script, sudoguy!' parse...
Add new script for welcome messaging
Add new script for welcome messaging
Python
apache-2.0
ohld/instabot,instagrambot/instabot,instagrambot/instabot
Add new script for welcome messaging
""" instabot example Workflow: Welcome message for new followers. """ import argparse import os import sys from tqdm import tqdm sys.path.append(os.path.join(sys.path[0], '../')) from instabot import Bot NOTIFIED_USERS_PATH = 'notified_users.txt' MESSAGE = 'Thank you for a script, sudoguy!' parse...
<commit_before><commit_msg>Add new script for welcome messaging<commit_after>
""" instabot example Workflow: Welcome message for new followers. """ import argparse import os import sys from tqdm import tqdm sys.path.append(os.path.join(sys.path[0], '../')) from instabot import Bot NOTIFIED_USERS_PATH = 'notified_users.txt' MESSAGE = 'Thank you for a script, sudoguy!' parse...
Add new script for welcome messaging""" instabot example Workflow: Welcome message for new followers. """ import argparse import os import sys from tqdm import tqdm sys.path.append(os.path.join(sys.path[0], '../')) from instabot import Bot NOTIFIED_USERS_PATH = 'notified_users.txt' MESSAGE = 'Than...
<commit_before><commit_msg>Add new script for welcome messaging<commit_after>""" instabot example Workflow: Welcome message for new followers. """ import argparse import os import sys from tqdm import tqdm sys.path.append(os.path.join(sys.path[0], '../')) from instabot import Bot NOTIFIED_USERS_PAT...
062d44d75e3fa7d55e620e6ce4c4af336c5b6917
recipes/skia_buildbot.py
recipes/skia_buildbot.py
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import recipe_util # pylint: disable=F0401 # This class doesn't need an __init__ method, so we disable the warning # pylint: disable=W0232 cla...
Add fetch recipe for Skia's Buildbot repository.
Add fetch recipe for Skia's Buildbot repository. Tested with the following command lines: $ cd $ mkdir skia_test $ cd skia_test $ fetch skia_buildbot $ cd skia_buildbot # confirm the repo is what one would expect. BUG=None TEST=see above R=agable@chromium.org Review URL: https://codereview.chromium.org/777513002 ...
Python
bsd-3-clause
svn2github/chromium-depot-tools,svn2github/chromium-depot-tools,svn2github/chromium-depot-tools
Add fetch recipe for Skia's Buildbot repository. Tested with the following command lines: $ cd $ mkdir skia_test $ cd skia_test $ fetch skia_buildbot $ cd skia_buildbot # confirm the repo is what one would expect. BUG=None TEST=see above R=agable@chromium.org Review URL: https://codereview.chromium.org/777513002 ...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import recipe_util # pylint: disable=F0401 # This class doesn't need an __init__ method, so we disable the warning # pylint: disable=W0232 cla...
<commit_before><commit_msg>Add fetch recipe for Skia's Buildbot repository. Tested with the following command lines: $ cd $ mkdir skia_test $ cd skia_test $ fetch skia_buildbot $ cd skia_buildbot # confirm the repo is what one would expect. BUG=None TEST=see above R=agable@chromium.org Review URL: https://coderevi...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import recipe_util # pylint: disable=F0401 # This class doesn't need an __init__ method, so we disable the warning # pylint: disable=W0232 cla...
Add fetch recipe for Skia's Buildbot repository. Tested with the following command lines: $ cd $ mkdir skia_test $ cd skia_test $ fetch skia_buildbot $ cd skia_buildbot # confirm the repo is what one would expect. BUG=None TEST=see above R=agable@chromium.org Review URL: https://codereview.chromium.org/777513002 ...
<commit_before><commit_msg>Add fetch recipe for Skia's Buildbot repository. Tested with the following command lines: $ cd $ mkdir skia_test $ cd skia_test $ fetch skia_buildbot $ cd skia_buildbot # confirm the repo is what one would expect. BUG=None TEST=see above R=agable@chromium.org Review URL: https://coderevi...
e4d6b055be724f1ab2614fe68da8a09dfcbaa2d5
tests/test_tags_functional.py
tests/test_tags_functional.py
"""Test the dataset tag functionality.""" import pytest from . import tmp_dir_fixture def test_tags_functional(tmp_dir_fixture): from dtoolcore import DataSetCreator, DataSet with DataSetCreator(name="empty-test-ds", base_uri=tmp_dir_fixture) as c: # Test put on proto dataset. c.put_tag("t...
Add failing funcitonal test for tags
Add failing funcitonal test for tags
Python
mit
JIC-CSB/dtoolcore
Add failing funcitonal test for tags
"""Test the dataset tag functionality.""" import pytest from . import tmp_dir_fixture def test_tags_functional(tmp_dir_fixture): from dtoolcore import DataSetCreator, DataSet with DataSetCreator(name="empty-test-ds", base_uri=tmp_dir_fixture) as c: # Test put on proto dataset. c.put_tag("t...
<commit_before><commit_msg>Add failing funcitonal test for tags<commit_after>
"""Test the dataset tag functionality.""" import pytest from . import tmp_dir_fixture def test_tags_functional(tmp_dir_fixture): from dtoolcore import DataSetCreator, DataSet with DataSetCreator(name="empty-test-ds", base_uri=tmp_dir_fixture) as c: # Test put on proto dataset. c.put_tag("t...
Add failing funcitonal test for tags"""Test the dataset tag functionality.""" import pytest from . import tmp_dir_fixture def test_tags_functional(tmp_dir_fixture): from dtoolcore import DataSetCreator, DataSet with DataSetCreator(name="empty-test-ds", base_uri=tmp_dir_fixture) as c: # Test put on...
<commit_before><commit_msg>Add failing funcitonal test for tags<commit_after>"""Test the dataset tag functionality.""" import pytest from . import tmp_dir_fixture def test_tags_functional(tmp_dir_fixture): from dtoolcore import DataSetCreator, DataSet with DataSetCreator(name="empty-test-ds", base_uri=tmp...
5263d39639f1596ee1b0cdf26437b845b6dd1661
app.py
app.py
from PIL import Image from PIL import ImageFont from PIL import ImageDraw import qrcode qr = qrcode.QRCode( version=1, error_correction=qrcode.constants.ERROR_CORRECT_L, box_size=20, border=4, ) qr.add_data('ASDFASDFASDFASDFtest') qr.make(fit=True) fnt = ImageFont.truetype("FreeMono.ttf", 16) base = ...
Test qrcode and PIL libraries
Test qrcode and PIL libraries
Python
mit
Nslaver/GeoPQRGen
Test qrcode and PIL libraries
from PIL import Image from PIL import ImageFont from PIL import ImageDraw import qrcode qr = qrcode.QRCode( version=1, error_correction=qrcode.constants.ERROR_CORRECT_L, box_size=20, border=4, ) qr.add_data('ASDFASDFASDFASDFtest') qr.make(fit=True) fnt = ImageFont.truetype("FreeMono.ttf", 16) base = ...
<commit_before><commit_msg>Test qrcode and PIL libraries<commit_after>
from PIL import Image from PIL import ImageFont from PIL import ImageDraw import qrcode qr = qrcode.QRCode( version=1, error_correction=qrcode.constants.ERROR_CORRECT_L, box_size=20, border=4, ) qr.add_data('ASDFASDFASDFASDFtest') qr.make(fit=True) fnt = ImageFont.truetype("FreeMono.ttf", 16) base = ...
Test qrcode and PIL librariesfrom PIL import Image from PIL import ImageFont from PIL import ImageDraw import qrcode qr = qrcode.QRCode( version=1, error_correction=qrcode.constants.ERROR_CORRECT_L, box_size=20, border=4, ) qr.add_data('ASDFASDFASDFASDFtest') qr.make(fit=True) fnt = ImageFont.truetyp...
<commit_before><commit_msg>Test qrcode and PIL libraries<commit_after>from PIL import Image from PIL import ImageFont from PIL import ImageDraw import qrcode qr = qrcode.QRCode( version=1, error_correction=qrcode.constants.ERROR_CORRECT_L, box_size=20, border=4, ) qr.add_data('ASDFASDFASDFASDFtest') q...
8b9730dce9ed50d764b86804609c17235044bbfd
heapsort.py
heapsort.py
__author__ = 'harsh' LT = 0 GT = 1 def compare_ele(comp_type, ele1, ele2): if comp_type == LT: return ele1 < ele2 elif comp_type == GT: return ele1 > ele2 raise Exception("Compare type Undefined") def heapsort(lst, comp_type=LT): """ :param lst: """ #heapify for sta...
Add min and max heap sort
Add min and max heap sort
Python
mit
hs634/algorithms,hs634/algorithms
Add min and max heap sort
__author__ = 'harsh' LT = 0 GT = 1 def compare_ele(comp_type, ele1, ele2): if comp_type == LT: return ele1 < ele2 elif comp_type == GT: return ele1 > ele2 raise Exception("Compare type Undefined") def heapsort(lst, comp_type=LT): """ :param lst: """ #heapify for sta...
<commit_before><commit_msg>Add min and max heap sort<commit_after>
__author__ = 'harsh' LT = 0 GT = 1 def compare_ele(comp_type, ele1, ele2): if comp_type == LT: return ele1 < ele2 elif comp_type == GT: return ele1 > ele2 raise Exception("Compare type Undefined") def heapsort(lst, comp_type=LT): """ :param lst: """ #heapify for sta...
Add min and max heap sort__author__ = 'harsh' LT = 0 GT = 1 def compare_ele(comp_type, ele1, ele2): if comp_type == LT: return ele1 < ele2 elif comp_type == GT: return ele1 > ele2 raise Exception("Compare type Undefined") def heapsort(lst, comp_type=LT): """ :param lst: """...
<commit_before><commit_msg>Add min and max heap sort<commit_after>__author__ = 'harsh' LT = 0 GT = 1 def compare_ele(comp_type, ele1, ele2): if comp_type == LT: return ele1 < ele2 elif comp_type == GT: return ele1 > ele2 raise Exception("Compare type Undefined") def heapsort(lst, comp_t...
71d33cf6215a81ee2db70ae9fd214aa725cde401
hybrid-mixed/full-hybrid.py
hybrid-mixed/full-hybrid.py
from firedrake import * n = 4 mesh = UnitSquareMesh(n, n) n = FacetNormal(mesh) RTd = FunctionSpace(mesh, BrokenElement(FiniteElement("RT", triangle, 1))) DG = FunctionSpace(mesh, "DG", 0) T = FunctionSpace(mesh, "HDiv Trace", 0) Wd = RTd * DG * T sigma, u, lambdar = TrialFunctions(Wd) tau, v, gammar = TestFunctions...
Test new static condensation pc on full mixed-hybrid system
Test new static condensation pc on full mixed-hybrid system
Python
mit
thomasgibson/tabula-rasa
Test new static condensation pc on full mixed-hybrid system
from firedrake import * n = 4 mesh = UnitSquareMesh(n, n) n = FacetNormal(mesh) RTd = FunctionSpace(mesh, BrokenElement(FiniteElement("RT", triangle, 1))) DG = FunctionSpace(mesh, "DG", 0) T = FunctionSpace(mesh, "HDiv Trace", 0) Wd = RTd * DG * T sigma, u, lambdar = TrialFunctions(Wd) tau, v, gammar = TestFunctions...
<commit_before><commit_msg>Test new static condensation pc on full mixed-hybrid system<commit_after>
from firedrake import * n = 4 mesh = UnitSquareMesh(n, n) n = FacetNormal(mesh) RTd = FunctionSpace(mesh, BrokenElement(FiniteElement("RT", triangle, 1))) DG = FunctionSpace(mesh, "DG", 0) T = FunctionSpace(mesh, "HDiv Trace", 0) Wd = RTd * DG * T sigma, u, lambdar = TrialFunctions(Wd) tau, v, gammar = TestFunctions...
Test new static condensation pc on full mixed-hybrid systemfrom firedrake import * n = 4 mesh = UnitSquareMesh(n, n) n = FacetNormal(mesh) RTd = FunctionSpace(mesh, BrokenElement(FiniteElement("RT", triangle, 1))) DG = FunctionSpace(mesh, "DG", 0) T = FunctionSpace(mesh, "HDiv Trace", 0) Wd = RTd * DG * T sigma, u, ...
<commit_before><commit_msg>Test new static condensation pc on full mixed-hybrid system<commit_after>from firedrake import * n = 4 mesh = UnitSquareMesh(n, n) n = FacetNormal(mesh) RTd = FunctionSpace(mesh, BrokenElement(FiniteElement("RT", triangle, 1))) DG = FunctionSpace(mesh, "DG", 0) T = FunctionSpace(mesh, "HDiv ...
2cae59076f2fa32b7284bfe4b8061aa80b4da2a9
openprescribing/matrixstore/tests/contextmanagers.py
openprescribing/matrixstore/tests/contextmanagers.py
from contextlib import contextmanager from matrixstore.tests.matrixstore_factory import ( matrixstore_from_data_factory, patch_global_matrixstore, ) @contextmanager def patched_global_matrixstore(matrixstore): """Context manaager that patches the global MatrixStore instance with the supplied matrixst...
Add context managers for patching global matrixstore in tests
Add context managers for patching global matrixstore in tests
Python
mit
ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc
Add context managers for patching global matrixstore in tests
from contextlib import contextmanager from matrixstore.tests.matrixstore_factory import ( matrixstore_from_data_factory, patch_global_matrixstore, ) @contextmanager def patched_global_matrixstore(matrixstore): """Context manaager that patches the global MatrixStore instance with the supplied matrixst...
<commit_before><commit_msg>Add context managers for patching global matrixstore in tests<commit_after>
from contextlib import contextmanager from matrixstore.tests.matrixstore_factory import ( matrixstore_from_data_factory, patch_global_matrixstore, ) @contextmanager def patched_global_matrixstore(matrixstore): """Context manaager that patches the global MatrixStore instance with the supplied matrixst...
Add context managers for patching global matrixstore in testsfrom contextlib import contextmanager from matrixstore.tests.matrixstore_factory import ( matrixstore_from_data_factory, patch_global_matrixstore, ) @contextmanager def patched_global_matrixstore(matrixstore): """Context manaager that patches t...
<commit_before><commit_msg>Add context managers for patching global matrixstore in tests<commit_after>from contextlib import contextmanager from matrixstore.tests.matrixstore_factory import ( matrixstore_from_data_factory, patch_global_matrixstore, ) @contextmanager def patched_global_matrixstore(matrixstore...
89b0a51e7443376794875d4ca014503e69ee847a
wsgi.py
wsgi.py
import os from form import app as application if 'OPENSHIFT_DATA_DIR' in os.environ: datadir = os.environ['OPENSHIFT_DATA_DIR'] application.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + datadir + '/form.db'
Add WSGI entrypoint for OpenShift
Add WSGI entrypoint for OpenShift
Python
mit
torsava/pyconcz-form,torsava/pyconcz-form
Add WSGI entrypoint for OpenShift
import os from form import app as application if 'OPENSHIFT_DATA_DIR' in os.environ: datadir = os.environ['OPENSHIFT_DATA_DIR'] application.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + datadir + '/form.db'
<commit_before><commit_msg>Add WSGI entrypoint for OpenShift<commit_after>
import os from form import app as application if 'OPENSHIFT_DATA_DIR' in os.environ: datadir = os.environ['OPENSHIFT_DATA_DIR'] application.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + datadir + '/form.db'
Add WSGI entrypoint for OpenShiftimport os from form import app as application if 'OPENSHIFT_DATA_DIR' in os.environ: datadir = os.environ['OPENSHIFT_DATA_DIR'] application.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + datadir + '/form.db'
<commit_before><commit_msg>Add WSGI entrypoint for OpenShift<commit_after>import os from form import app as application if 'OPENSHIFT_DATA_DIR' in os.environ: datadir = os.environ['OPENSHIFT_DATA_DIR'] application.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + datadir + '/form.db'
2961c62d06f65e2aed15dac22fdd4d9a0f619668
util/dataset_times.py
util/dataset_times.py
#!/usr/bin/env python3 import datetime import re import sys import time timestamp_pattern = r'(?P<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3})' message_pattern = r'(?P<message>.*)' log_re = re.compile(r'^%s: \w+: %s\s*$' % (timestamp_pattern, message_pattern)) task_pattern = r'(?P<dataset>\w+), (?P<task>\d+)'...
Add a script to parse the logs and tabulate the amount of time per dataset
Add a script to parse the logs and tabulate the amount of time per dataset
Python
apache-2.0
kseppi/mrs-mapreduce,byu-aml-lab/mrs-mapreduce
Add a script to parse the logs and tabulate the amount of time per dataset
#!/usr/bin/env python3 import datetime import re import sys import time timestamp_pattern = r'(?P<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3})' message_pattern = r'(?P<message>.*)' log_re = re.compile(r'^%s: \w+: %s\s*$' % (timestamp_pattern, message_pattern)) task_pattern = r'(?P<dataset>\w+), (?P<task>\d+)'...
<commit_before><commit_msg>Add a script to parse the logs and tabulate the amount of time per dataset<commit_after>
#!/usr/bin/env python3 import datetime import re import sys import time timestamp_pattern = r'(?P<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3})' message_pattern = r'(?P<message>.*)' log_re = re.compile(r'^%s: \w+: %s\s*$' % (timestamp_pattern, message_pattern)) task_pattern = r'(?P<dataset>\w+), (?P<task>\d+)'...
Add a script to parse the logs and tabulate the amount of time per dataset#!/usr/bin/env python3 import datetime import re import sys import time timestamp_pattern = r'(?P<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3})' message_pattern = r'(?P<message>.*)' log_re = re.compile(r'^%s: \w+: %s\s*$' % (timestamp_pa...
<commit_before><commit_msg>Add a script to parse the logs and tabulate the amount of time per dataset<commit_after>#!/usr/bin/env python3 import datetime import re import sys import time timestamp_pattern = r'(?P<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3})' message_pattern = r'(?P<message>.*)' log_re = re.co...
801f7ebd01a814c3278a66ae4bc0afea2bbb70a6
tests/python/test_context/test_stack/test_sorted.py
tests/python/test_context/test_stack/test_sorted.py
# encoding: utf-8 import unittest from logging_utils._compat import mock from logging_utils.context.stack.sorted import SortedContextStack class SimpleContextStackTest(unittest.TestCase): def setUp(self): self.inner = mock.MagicMock(spec=SortedContextStack) self.inner.__str__.return_value = "foo...
Add tests for sorted stack
Add tests for sorted stack
Python
mit
michalbachowski/pylogging_utils,michalbachowski/pylogging_utils,michalbachowski/pylogging_utils
Add tests for sorted stack
# encoding: utf-8 import unittest from logging_utils._compat import mock from logging_utils.context.stack.sorted import SortedContextStack class SimpleContextStackTest(unittest.TestCase): def setUp(self): self.inner = mock.MagicMock(spec=SortedContextStack) self.inner.__str__.return_value = "foo...
<commit_before><commit_msg>Add tests for sorted stack<commit_after>
# encoding: utf-8 import unittest from logging_utils._compat import mock from logging_utils.context.stack.sorted import SortedContextStack class SimpleContextStackTest(unittest.TestCase): def setUp(self): self.inner = mock.MagicMock(spec=SortedContextStack) self.inner.__str__.return_value = "foo...
Add tests for sorted stack# encoding: utf-8 import unittest from logging_utils._compat import mock from logging_utils.context.stack.sorted import SortedContextStack class SimpleContextStackTest(unittest.TestCase): def setUp(self): self.inner = mock.MagicMock(spec=SortedContextStack) self.inner._...
<commit_before><commit_msg>Add tests for sorted stack<commit_after># encoding: utf-8 import unittest from logging_utils._compat import mock from logging_utils.context.stack.sorted import SortedContextStack class SimpleContextStackTest(unittest.TestCase): def setUp(self): self.inner = mock.MagicMock(spec...
ab3e5d78f883561d45ac6074f27c97eefa4c1540
test_bst.py
test_bst.py
from bst import BinarySearchTree nodes = [5, 4, 8, 3, 43, 22, 7, 74, 2] def test_insert_nodes(): """size of tree equal to number of values inserted""" b = BinarySearchTree() for n in nodes: b.insert(n) assert b.size() == 9 def test_contains_node(): """expected nodes in tree""" b = ...
Add tests for binary search tree
Add tests for binary search tree
Python
mit
nbeck90/data_structures_2
Add tests for binary search tree
from bst import BinarySearchTree nodes = [5, 4, 8, 3, 43, 22, 7, 74, 2] def test_insert_nodes(): """size of tree equal to number of values inserted""" b = BinarySearchTree() for n in nodes: b.insert(n) assert b.size() == 9 def test_contains_node(): """expected nodes in tree""" b = ...
<commit_before><commit_msg>Add tests for binary search tree<commit_after>
from bst import BinarySearchTree nodes = [5, 4, 8, 3, 43, 22, 7, 74, 2] def test_insert_nodes(): """size of tree equal to number of values inserted""" b = BinarySearchTree() for n in nodes: b.insert(n) assert b.size() == 9 def test_contains_node(): """expected nodes in tree""" b = ...
Add tests for binary search treefrom bst import BinarySearchTree nodes = [5, 4, 8, 3, 43, 22, 7, 74, 2] def test_insert_nodes(): """size of tree equal to number of values inserted""" b = BinarySearchTree() for n in nodes: b.insert(n) assert b.size() == 9 def test_contains_node(): """ex...
<commit_before><commit_msg>Add tests for binary search tree<commit_after>from bst import BinarySearchTree nodes = [5, 4, 8, 3, 43, 22, 7, 74, 2] def test_insert_nodes(): """size of tree equal to number of values inserted""" b = BinarySearchTree() for n in nodes: b.insert(n) assert b.size() =...
d0199235c363bd7c8965c25e69b615ec66f36e99
django_nyt/migrations/0008_auto_20161023_1641.py
django_nyt/migrations/0008_auto_20161023_1641.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-23 14:41 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('django_nyt', '0007_add_mod...
Add migration for new related_name and CASCADE constraints
Add migration for new related_name and CASCADE constraints
Python
apache-2.0
benjaoming/django-nyt,benjaoming/django-nyt
Add migration for new related_name and CASCADE constraints
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-23 14:41 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('django_nyt', '0007_add_mod...
<commit_before><commit_msg>Add migration for new related_name and CASCADE constraints<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-23 14:41 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('django_nyt', '0007_add_mod...
Add migration for new related_name and CASCADE constraints# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-23 14:41 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): ...
<commit_before><commit_msg>Add migration for new related_name and CASCADE constraints<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-23 14:41 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion ...
cf5151aecf6552faec6232ef0ba57070b546a10d
app/handlers/test_base.py
app/handlers/test_base.py
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be usefu...
Add base handler for test resources.
Add base handler for test resources.
Python
lgpl-2.1
kernelci/kernelci-backend,joyxu/kernelci-backend,joyxu/kernelci-backend,joyxu/kernelci-backend,kernelci/kernelci-backend
Add base handler for test resources.
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be usefu...
<commit_before><commit_msg>Add base handler for test resources.<commit_after>
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be usefu...
Add base handler for test resources.# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribut...
<commit_before><commit_msg>Add base handler for test resources.<commit_after># This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any lat...
441e247207bf4a29dcb790d132145daa61ea2482
test/test_rc.py
test/test_rc.py
from mpi4py import rc import mpiunittest as unittest class TestRC(unittest.TestCase): def testRC1(self): rc(initialize = rc.initialize) rc(threaded = rc.threaded) rc(thread_level = rc.thread_level) rc(finalize = rc.finalize) rc(fast_reduce = rc.fast_reduce) ...
Add tests for mpi4py.rc function
test: Add tests for mpi4py.rc function
Python
bsd-2-clause
pressel/mpi4py,pressel/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py,pressel/mpi4py,pressel/mpi4py
test: Add tests for mpi4py.rc function
from mpi4py import rc import mpiunittest as unittest class TestRC(unittest.TestCase): def testRC1(self): rc(initialize = rc.initialize) rc(threaded = rc.threaded) rc(thread_level = rc.thread_level) rc(finalize = rc.finalize) rc(fast_reduce = rc.fast_reduce) ...
<commit_before><commit_msg>test: Add tests for mpi4py.rc function<commit_after>
from mpi4py import rc import mpiunittest as unittest class TestRC(unittest.TestCase): def testRC1(self): rc(initialize = rc.initialize) rc(threaded = rc.threaded) rc(thread_level = rc.thread_level) rc(finalize = rc.finalize) rc(fast_reduce = rc.fast_reduce) ...
test: Add tests for mpi4py.rc functionfrom mpi4py import rc import mpiunittest as unittest class TestRC(unittest.TestCase): def testRC1(self): rc(initialize = rc.initialize) rc(threaded = rc.threaded) rc(thread_level = rc.thread_level) rc(finalize = rc.finalize) r...
<commit_before><commit_msg>test: Add tests for mpi4py.rc function<commit_after>from mpi4py import rc import mpiunittest as unittest class TestRC(unittest.TestCase): def testRC1(self): rc(initialize = rc.initialize) rc(threaded = rc.threaded) rc(thread_level = rc.thread_level) ...
7be04ca4024384542da6215e1cf592c727bb5138
examples/pairgrid_dotplot.py
examples/pairgrid_dotplot.py
""" Dot plot with several variables =============================== _thumb: .3, .3 """ import seaborn as sns sns.set(style="whitegrid") # Load the dataset crashes = sns.load_dataset("car_crashes") # Make the PairGrid g = sns.PairGrid(crashes.sort("total", ascending=False), x_vars=crashes.columns[:-3...
Add example script for making a multi-variable dot plot
Add example script for making a multi-variable dot plot
Python
bsd-3-clause
huongttlan/seaborn,tim777z/seaborn,muku42/seaborn,drewokane/seaborn,anntzer/seaborn,sauliusl/seaborn,ischwabacher/seaborn,jakevdp/seaborn,petebachant/seaborn,ashhher3/seaborn,sinhrks/seaborn,Lx37/seaborn,wrobstory/seaborn,kyleam/seaborn,lukauskas/seaborn,anntzer/seaborn,Guokr1991/seaborn,mwaskom/seaborn,mia1rab/seaborn...
Add example script for making a multi-variable dot plot
""" Dot plot with several variables =============================== _thumb: .3, .3 """ import seaborn as sns sns.set(style="whitegrid") # Load the dataset crashes = sns.load_dataset("car_crashes") # Make the PairGrid g = sns.PairGrid(crashes.sort("total", ascending=False), x_vars=crashes.columns[:-3...
<commit_before><commit_msg>Add example script for making a multi-variable dot plot<commit_after>
""" Dot plot with several variables =============================== _thumb: .3, .3 """ import seaborn as sns sns.set(style="whitegrid") # Load the dataset crashes = sns.load_dataset("car_crashes") # Make the PairGrid g = sns.PairGrid(crashes.sort("total", ascending=False), x_vars=crashes.columns[:-3...
Add example script for making a multi-variable dot plot""" Dot plot with several variables =============================== _thumb: .3, .3 """ import seaborn as sns sns.set(style="whitegrid") # Load the dataset crashes = sns.load_dataset("car_crashes") # Make the PairGrid g = sns.PairGrid(crashes.sort("total", ascend...
<commit_before><commit_msg>Add example script for making a multi-variable dot plot<commit_after>""" Dot plot with several variables =============================== _thumb: .3, .3 """ import seaborn as sns sns.set(style="whitegrid") # Load the dataset crashes = sns.load_dataset("car_crashes") # Make the PairGrid g = ...
8b80327ff23fd3a6ad02ef54203148705ee7d92b
exp/clusterexp/FowlkesExp.py
exp/clusterexp/FowlkesExp.py
""" Try to replicate the toy dateset in the paper by Fowlkes et al., "Spectral Grouping Using the Nystrom Method" and compute the spectrum. """ import numpy import scipy.sparse import matplotlib.pyplot as plt from apgl.graph import SparseGraph, GeneralVertexList, GraphUtils from exp.sandbox.Nystrom import Nyst...
Test the dataset from the Fowlkes paper
Test the dataset from the Fowlkes paper
Python
bsd-3-clause
charanpald/APGL
Test the dataset from the Fowlkes paper
""" Try to replicate the toy dateset in the paper by Fowlkes et al., "Spectral Grouping Using the Nystrom Method" and compute the spectrum. """ import numpy import scipy.sparse import matplotlib.pyplot as plt from apgl.graph import SparseGraph, GeneralVertexList, GraphUtils from exp.sandbox.Nystrom import Nyst...
<commit_before><commit_msg>Test the dataset from the Fowlkes paper <commit_after>
""" Try to replicate the toy dateset in the paper by Fowlkes et al., "Spectral Grouping Using the Nystrom Method" and compute the spectrum. """ import numpy import scipy.sparse import matplotlib.pyplot as plt from apgl.graph import SparseGraph, GeneralVertexList, GraphUtils from exp.sandbox.Nystrom import Nyst...
Test the dataset from the Fowlkes paper """ Try to replicate the toy dateset in the paper by Fowlkes et al., "Spectral Grouping Using the Nystrom Method" and compute the spectrum. """ import numpy import scipy.sparse import matplotlib.pyplot as plt from apgl.graph import SparseGraph, GeneralVertexList, GraphUtil...
<commit_before><commit_msg>Test the dataset from the Fowlkes paper <commit_after>""" Try to replicate the toy dateset in the paper by Fowlkes et al., "Spectral Grouping Using the Nystrom Method" and compute the spectrum. """ import numpy import scipy.sparse import matplotlib.pyplot as plt from apgl.graph import ...
20782297afa70ff138e20de4b06271793114a5e6
bin/FindRandomasciiProfilePresets.py
bin/FindRandomasciiProfilePresets.py
# Copyright 2019 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
Add script for enumerating Randomascii presets
Add script for enumerating Randomascii presets The startup10.wpaProfile file which ships with UIforETW sets up a default view which I think is a better introduction to ETW profiling. It needs updating occasionally, and sometimes some of the presets can get lost. This script prints all of the Randomascii presets that I...
Python
apache-2.0
ariccio/UIforETW,google/UIforETW,google/UIforETW,google/UIforETW,ariccio/UIforETW,google/UIforETW,ariccio/UIforETW,ariccio/UIforETW
Add script for enumerating Randomascii presets The startup10.wpaProfile file which ships with UIforETW sets up a default view which I think is a better introduction to ETW profiling. It needs updating occasionally, and sometimes some of the presets can get lost. This script prints all of the Randomascii presets that I...
# Copyright 2019 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<commit_before><commit_msg>Add script for enumerating Randomascii presets The startup10.wpaProfile file which ships with UIforETW sets up a default view which I think is a better introduction to ETW profiling. It needs updating occasionally, and sometimes some of the presets can get lost. This script prints all of the...
# Copyright 2019 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
Add script for enumerating Randomascii presets The startup10.wpaProfile file which ships with UIforETW sets up a default view which I think is a better introduction to ETW profiling. It needs updating occasionally, and sometimes some of the presets can get lost. This script prints all of the Randomascii presets that I...
<commit_before><commit_msg>Add script for enumerating Randomascii presets The startup10.wpaProfile file which ships with UIforETW sets up a default view which I think is a better introduction to ETW profiling. It needs updating occasionally, and sometimes some of the presets can get lost. This script prints all of the...
946b72c0dec3880943859226e9626f32cb64a855
project/category/helpers.py
project/category/helpers.py
import re _punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.]+') def slugify(text, delim=u'-'): """Generates an ASCII-only slug.""" result = [] for word in _punct_re.split(text.lower()): word = word.encode('translit/long') if word: result.append(word) return un...
Create helper module with slugify function
Create helper module with slugify function
Python
mit
dylanshine/streamschool,dylanshine/streamschool
Create helper module with slugify function
import re _punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.]+') def slugify(text, delim=u'-'): """Generates an ASCII-only slug.""" result = [] for word in _punct_re.split(text.lower()): word = word.encode('translit/long') if word: result.append(word) return un...
<commit_before><commit_msg>Create helper module with slugify function<commit_after>
import re _punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.]+') def slugify(text, delim=u'-'): """Generates an ASCII-only slug.""" result = [] for word in _punct_re.split(text.lower()): word = word.encode('translit/long') if word: result.append(word) return un...
Create helper module with slugify functionimport re _punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.]+') def slugify(text, delim=u'-'): """Generates an ASCII-only slug.""" result = [] for word in _punct_re.split(text.lower()): word = word.encode('translit/long') if word: ...
<commit_before><commit_msg>Create helper module with slugify function<commit_after>import re _punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.]+') def slugify(text, delim=u'-'): """Generates an ASCII-only slug.""" result = [] for word in _punct_re.split(text.lower()): word = word.enc...
596aceae0b76d919bc85cafdbb3128bae647ea9f
config_diag/tests/test_policy.py
config_diag/tests/test_policy.py
import os import numpy as np from ..policy import MDPDialogBuilder class TestMDPDialogBuilder(object): def setup(self): tests_dir = os.path.abspath(os.path.dirname(__file__)) csv_file = os.path.join(tests_dir, "Titanic.csv") self.config_sample = np.genfromtxt(csv_file, skip_header=1, ...
Add a test case for MDPDialogBuilder
Add a test case for MDPDialogBuilder
Python
apache-2.0
yasserglez/configurator,yasserglez/configurator
Add a test case for MDPDialogBuilder
import os import numpy as np from ..policy import MDPDialogBuilder class TestMDPDialogBuilder(object): def setup(self): tests_dir = os.path.abspath(os.path.dirname(__file__)) csv_file = os.path.join(tests_dir, "Titanic.csv") self.config_sample = np.genfromtxt(csv_file, skip_header=1, ...
<commit_before><commit_msg>Add a test case for MDPDialogBuilder<commit_after>
import os import numpy as np from ..policy import MDPDialogBuilder class TestMDPDialogBuilder(object): def setup(self): tests_dir = os.path.abspath(os.path.dirname(__file__)) csv_file = os.path.join(tests_dir, "Titanic.csv") self.config_sample = np.genfromtxt(csv_file, skip_header=1, ...
Add a test case for MDPDialogBuilderimport os import numpy as np from ..policy import MDPDialogBuilder class TestMDPDialogBuilder(object): def setup(self): tests_dir = os.path.abspath(os.path.dirname(__file__)) csv_file = os.path.join(tests_dir, "Titanic.csv") self.config_sample = np.ge...
<commit_before><commit_msg>Add a test case for MDPDialogBuilder<commit_after>import os import numpy as np from ..policy import MDPDialogBuilder class TestMDPDialogBuilder(object): def setup(self): tests_dir = os.path.abspath(os.path.dirname(__file__)) csv_file = os.path.join(tests_dir, "Titanic...
86abb9a55433e09ae5686bcbf9456ca891f41867
senlin/tests/tempest/api/nodes/test_node_action.py
senlin/tests/tempest/api/nodes/test_node_action.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Add API tests for node action
Add API tests for node action Add API tests for triggering node action blueprint tempest-plugin-interface Change-Id: Iaafdd3190dba9cd5173d676b2010ad3c6f9215a5
Python
apache-2.0
openstack/senlin,openstack/senlin,stackforge/senlin,openstack/senlin,stackforge/senlin
Add API tests for node action Add API tests for triggering node action blueprint tempest-plugin-interface Change-Id: Iaafdd3190dba9cd5173d676b2010ad3c6f9215a5
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
<commit_before><commit_msg>Add API tests for node action Add API tests for triggering node action blueprint tempest-plugin-interface Change-Id: Iaafdd3190dba9cd5173d676b2010ad3c6f9215a5<commit_after>
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Add API tests for node action Add API tests for triggering node action blueprint tempest-plugin-interface Change-Id: Iaafdd3190dba9cd5173d676b2010ad3c6f9215a5# 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...
<commit_before><commit_msg>Add API tests for node action Add API tests for triggering node action blueprint tempest-plugin-interface Change-Id: Iaafdd3190dba9cd5173d676b2010ad3c6f9215a5<commit_after># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wit...
9cc9685ea435db06ba915225b9c27c028b2e7cf5
editorconfig/versiontools.py
editorconfig/versiontools.py
"""EditorConfig version tools Provides ``join_version`` and ``split_version`` classes for converting __version__ strings to VERSION tuples and vice versa. """ import re __all__ = ['join_version', 'split_version'] _version_re = re.compile(r'^(\d+)\.(\d+)\.(\d+)(\..*)?$', re.VERBOSE) def join_version(version_tup...
"""EditorConfig version tools Provides ``join_version`` and ``split_version`` classes for converting __version__ strings to VERSION tuples and vice versa. """ import re __all__ = ['join_version', 'split_version'] _version_re = re.compile(r'^(\d+)\.(\d+)\.(\d+)(\..*)?$', re.VERBOSE) def join_version(version_tup...
Convert map iterator to list (for Python3 support)
Convert map iterator to list (for Python3 support)
Python
bsd-2-clause
benjifisher/editorconfig-vim,pocke/editorconfig-vim,pocke/editorconfig-vim,johnfraney/editorconfig-vim,VictorBjelkholm/editorconfig-vim,VictorBjelkholm/editorconfig-vim,VictorBjelkholm/editorconfig-vim,benjifisher/editorconfig-vim,benjifisher/editorconfig-vim,johnfraney/editorconfig-vim,pocke/editorconfig-vim,johnfrane...
"""EditorConfig version tools Provides ``join_version`` and ``split_version`` classes for converting __version__ strings to VERSION tuples and vice versa. """ import re __all__ = ['join_version', 'split_version'] _version_re = re.compile(r'^(\d+)\.(\d+)\.(\d+)(\..*)?$', re.VERBOSE) def join_version(version_tup...
"""EditorConfig version tools Provides ``join_version`` and ``split_version`` classes for converting __version__ strings to VERSION tuples and vice versa. """ import re __all__ = ['join_version', 'split_version'] _version_re = re.compile(r'^(\d+)\.(\d+)\.(\d+)(\..*)?$', re.VERBOSE) def join_version(version_tup...
<commit_before>"""EditorConfig version tools Provides ``join_version`` and ``split_version`` classes for converting __version__ strings to VERSION tuples and vice versa. """ import re __all__ = ['join_version', 'split_version'] _version_re = re.compile(r'^(\d+)\.(\d+)\.(\d+)(\..*)?$', re.VERBOSE) def join_vers...
"""EditorConfig version tools Provides ``join_version`` and ``split_version`` classes for converting __version__ strings to VERSION tuples and vice versa. """ import re __all__ = ['join_version', 'split_version'] _version_re = re.compile(r'^(\d+)\.(\d+)\.(\d+)(\..*)?$', re.VERBOSE) def join_version(version_tup...
"""EditorConfig version tools Provides ``join_version`` and ``split_version`` classes for converting __version__ strings to VERSION tuples and vice versa. """ import re __all__ = ['join_version', 'split_version'] _version_re = re.compile(r'^(\d+)\.(\d+)\.(\d+)(\..*)?$', re.VERBOSE) def join_version(version_tup...
<commit_before>"""EditorConfig version tools Provides ``join_version`` and ``split_version`` classes for converting __version__ strings to VERSION tuples and vice versa. """ import re __all__ = ['join_version', 'split_version'] _version_re = re.compile(r'^(\d+)\.(\d+)\.(\d+)(\..*)?$', re.VERBOSE) def join_vers...
e4869489d6187f7e023bf0b8ce6da80f717e6504
tests/lib/test_geo.py
tests/lib/test_geo.py
# -*- coding: utf-8 -*- import pytest from skylines.lib.geo import geographic_distance from skylines.model.geo import Location @pytest.mark.parametrize( "loc1,loc2,expected", [ ( Location(latitude=0.0, longitude=0.0), Location(latitude=0.0, longitude=0.0), 0.0, ...
Add basic tests for `geographic_distance()`
lib/geo: Add basic tests for `geographic_distance()`
Python
agpl-3.0
skylines-project/skylines,skylines-project/skylines,skylines-project/skylines,skylines-project/skylines
lib/geo: Add basic tests for `geographic_distance()`
# -*- coding: utf-8 -*- import pytest from skylines.lib.geo import geographic_distance from skylines.model.geo import Location @pytest.mark.parametrize( "loc1,loc2,expected", [ ( Location(latitude=0.0, longitude=0.0), Location(latitude=0.0, longitude=0.0), 0.0, ...
<commit_before><commit_msg>lib/geo: Add basic tests for `geographic_distance()`<commit_after>
# -*- coding: utf-8 -*- import pytest from skylines.lib.geo import geographic_distance from skylines.model.geo import Location @pytest.mark.parametrize( "loc1,loc2,expected", [ ( Location(latitude=0.0, longitude=0.0), Location(latitude=0.0, longitude=0.0), 0.0, ...
lib/geo: Add basic tests for `geographic_distance()`# -*- coding: utf-8 -*- import pytest from skylines.lib.geo import geographic_distance from skylines.model.geo import Location @pytest.mark.parametrize( "loc1,loc2,expected", [ ( Location(latitude=0.0, longitude=0.0), Locati...
<commit_before><commit_msg>lib/geo: Add basic tests for `geographic_distance()`<commit_after># -*- coding: utf-8 -*- import pytest from skylines.lib.geo import geographic_distance from skylines.model.geo import Location @pytest.mark.parametrize( "loc1,loc2,expected", [ ( Location(latitud...
3641035bd97c415e1e64fc9e8020e1468bbad227
camkes/internal/mkdirp.py
camkes/internal/mkdirp.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. # # @TAG(NICTA_BSD) # ''' mkdir -p For some reason, there does not s...
Add a function for thread-safe directory creation.
Add a function for thread-safe directory creation. This is to be used in an upcoming commit.
Python
bsd-2-clause
smaccm/camkes-tool,smaccm/camkes-tool,smaccm/camkes-tool,smaccm/camkes-tool
Add a function for thread-safe directory creation. This is to be used in an upcoming commit.
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. # # @TAG(NICTA_BSD) # ''' mkdir -p For some reason, there does not s...
<commit_before><commit_msg>Add a function for thread-safe directory creation. This is to be used in an upcoming commit.<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. # # @TAG(NICTA_BSD) # ''' mkdir -p For some reason, there does not s...
Add a function for thread-safe directory creation. This is to be used in an upcoming commit.#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_...
<commit_before><commit_msg>Add a function for thread-safe directory creation. This is to be used in an upcoming commit.<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that...
44de8b2d6b4b58b9ba8165ba52ee3c6852d97d38
tests/test_profile.py
tests/test_profile.py
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest2 as unittest import os from kobo.client import BaseClientCommandContainer from kobo.cli import CommandOptionParser class TestCommandContainer(BaseClientCommandContainer): pass class TestConf(unittest.TestCase): def setUp(self): self.command...
Add preliminary tests for profile support and configuration directory support
Add preliminary tests for profile support and configuration directory support New tests need to be written to see how CommandOptionParser sets up its CLI interface and where it'll look for configuration files when setting default_profile and configuration_directory at instantiation.
Python
lgpl-2.1
release-engineering/kobo,release-engineering/kobo,release-engineering/kobo,release-engineering/kobo
Add preliminary tests for profile support and configuration directory support New tests need to be written to see how CommandOptionParser sets up its CLI interface and where it'll look for configuration files when setting default_profile and configuration_directory at instantiation.
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest2 as unittest import os from kobo.client import BaseClientCommandContainer from kobo.cli import CommandOptionParser class TestCommandContainer(BaseClientCommandContainer): pass class TestConf(unittest.TestCase): def setUp(self): self.command...
<commit_before><commit_msg>Add preliminary tests for profile support and configuration directory support New tests need to be written to see how CommandOptionParser sets up its CLI interface and where it'll look for configuration files when setting default_profile and configuration_directory at instantiation.<commit_a...
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest2 as unittest import os from kobo.client import BaseClientCommandContainer from kobo.cli import CommandOptionParser class TestCommandContainer(BaseClientCommandContainer): pass class TestConf(unittest.TestCase): def setUp(self): self.command...
Add preliminary tests for profile support and configuration directory support New tests need to be written to see how CommandOptionParser sets up its CLI interface and where it'll look for configuration files when setting default_profile and configuration_directory at instantiation.#!/usr/bin/python # -*- coding: utf-...
<commit_before><commit_msg>Add preliminary tests for profile support and configuration directory support New tests need to be written to see how CommandOptionParser sets up its CLI interface and where it'll look for configuration files when setting default_profile and configuration_directory at instantiation.<commit_a...
c88ae40c88701a4ff065e5529d5dfe2d15174a83
mapit/management/commands/mapit_UK_add_ons_to_gss.py
mapit/management/commands/mapit_UK_add_ons_to_gss.py
# This script is for a one off import of all the old ONS codes to a MapIt # containing only the new ones from a modern Boundary-Line. import csv from django.core.management.base import NoArgsCommand from mapit.models import Area, CodeType from psycopg2 import IntegrityError def process(new_code, old_code): try: ...
Add script to add old ONS codes to a database containing only the new GSS ones.
Add script to add old ONS codes to a database containing only the new GSS ones.
Python
agpl-3.0
chris48s/mapit,opencorato/mapit,opencorato/mapit,chris48s/mapit,New-Bamboo/mapit,Sinar/mapit,Code4SA/mapit,Sinar/mapit,opencorato/mapit,Code4SA/mapit,Code4SA/mapit,chris48s/mapit,New-Bamboo/mapit
Add script to add old ONS codes to a database containing only the new GSS ones.
# This script is for a one off import of all the old ONS codes to a MapIt # containing only the new ones from a modern Boundary-Line. import csv from django.core.management.base import NoArgsCommand from mapit.models import Area, CodeType from psycopg2 import IntegrityError def process(new_code, old_code): try: ...
<commit_before><commit_msg>Add script to add old ONS codes to a database containing only the new GSS ones.<commit_after>
# This script is for a one off import of all the old ONS codes to a MapIt # containing only the new ones from a modern Boundary-Line. import csv from django.core.management.base import NoArgsCommand from mapit.models import Area, CodeType from psycopg2 import IntegrityError def process(new_code, old_code): try: ...
Add script to add old ONS codes to a database containing only the new GSS ones.# This script is for a one off import of all the old ONS codes to a MapIt # containing only the new ones from a modern Boundary-Line. import csv from django.core.management.base import NoArgsCommand from mapit.models import Area, CodeType f...
<commit_before><commit_msg>Add script to add old ONS codes to a database containing only the new GSS ones.<commit_after># This script is for a one off import of all the old ONS codes to a MapIt # containing only the new ones from a modern Boundary-Line. import csv from django.core.management.base import NoArgsCommand ...
1f4525ed0affb0eed7b3091aa775db0f2efa7b1e
mininet/test/test_ptyleak.py
mininet/test/test_ptyleak.py
#!/usr/bin/env python """ Regression test for pty leak in Node() """ import unittest from mininet.net import Mininet from mininet.clean import cleanup from mininet.topo import SingleSwitchTopo class TestPtyLeak( unittest.TestCase ): "Verify that there is no pty leakage" @staticmethod def testPtyLeak():...
Test for Node()/Host() pty leakage
Test for Node()/Host() pty leakage
Python
bsd-3-clause
mininet/mininet,mininet/mininet,mininet/mininet
Test for Node()/Host() pty leakage
#!/usr/bin/env python """ Regression test for pty leak in Node() """ import unittest from mininet.net import Mininet from mininet.clean import cleanup from mininet.topo import SingleSwitchTopo class TestPtyLeak( unittest.TestCase ): "Verify that there is no pty leakage" @staticmethod def testPtyLeak():...
<commit_before><commit_msg>Test for Node()/Host() pty leakage<commit_after>
#!/usr/bin/env python """ Regression test for pty leak in Node() """ import unittest from mininet.net import Mininet from mininet.clean import cleanup from mininet.topo import SingleSwitchTopo class TestPtyLeak( unittest.TestCase ): "Verify that there is no pty leakage" @staticmethod def testPtyLeak():...
Test for Node()/Host() pty leakage#!/usr/bin/env python """ Regression test for pty leak in Node() """ import unittest from mininet.net import Mininet from mininet.clean import cleanup from mininet.topo import SingleSwitchTopo class TestPtyLeak( unittest.TestCase ): "Verify that there is no pty leakage" @...
<commit_before><commit_msg>Test for Node()/Host() pty leakage<commit_after>#!/usr/bin/env python """ Regression test for pty leak in Node() """ import unittest from mininet.net import Mininet from mininet.clean import cleanup from mininet.topo import SingleSwitchTopo class TestPtyLeak( unittest.TestCase ): "Ve...
5d3da483d0d12bb16203261ce9e923c9d0a053e7
MAIN/solids_ISO_GUI.py
MAIN/solids_ISO_GUI.py
""" PROGRAM SOLIDS -------------- Computes the displacement solution for a finite element assembly of 2D solids under point loads using as input easy-to-create text files containing element, nodal, materials and loads data. Fortran subroutines mesher.for and contour.for are also available to write the required input f...
Add a simple GUI input
Add a simple GUI input
Python
mit
jgomezc1/FEM_PYTHON,AppliedMechanics-EAFIT/SolidsPy
Add a simple GUI input
""" PROGRAM SOLIDS -------------- Computes the displacement solution for a finite element assembly of 2D solids under point loads using as input easy-to-create text files containing element, nodal, materials and loads data. Fortran subroutines mesher.for and contour.for are also available to write the required input f...
<commit_before><commit_msg>Add a simple GUI input<commit_after>
""" PROGRAM SOLIDS -------------- Computes the displacement solution for a finite element assembly of 2D solids under point loads using as input easy-to-create text files containing element, nodal, materials and loads data. Fortran subroutines mesher.for and contour.for are also available to write the required input f...
Add a simple GUI input""" PROGRAM SOLIDS -------------- Computes the displacement solution for a finite element assembly of 2D solids under point loads using as input easy-to-create text files containing element, nodal, materials and loads data. Fortran subroutines mesher.for and contour.for are also available to writ...
<commit_before><commit_msg>Add a simple GUI input<commit_after>""" PROGRAM SOLIDS -------------- Computes the displacement solution for a finite element assembly of 2D solids under point loads using as input easy-to-create text files containing element, nodal, materials and loads data. Fortran subroutines mesher.for a...
4a75aa1bbfa7663460987143164e44970622e009
social_auth/backends/gae.py
social_auth/backends/gae.py
""" Google App Engine support using User API """ from __future__ import absolute_import from django.contrib.auth import authenticate from social_auth.backends import SocialAuthBackend, BaseAuth, USERNAME from google.appengine.api import users class GAEBackend(SocialAuthBackend): """BrowserID authentication back...
Add a social_auth wrapper backend around the Google App Engine User API.
Add a social_auth wrapper backend around the Google App Engine User API.
Python
bsd-3-clause
VishvajitP/django-social-auth,WW-Digital/django-social-auth,antoviaque/django-social-auth-norel,lovehhf/django-social-auth,czpython/django-social-auth,limdauto/django-social-auth,vxvinh1511/django-social-auth,duoduo369/django-social-auth,vuchau/django-social-auth,dongguangming/django-social-auth,getsentry/django-social...
Add a social_auth wrapper backend around the Google App Engine User API.
""" Google App Engine support using User API """ from __future__ import absolute_import from django.contrib.auth import authenticate from social_auth.backends import SocialAuthBackend, BaseAuth, USERNAME from google.appengine.api import users class GAEBackend(SocialAuthBackend): """BrowserID authentication back...
<commit_before><commit_msg>Add a social_auth wrapper backend around the Google App Engine User API.<commit_after>
""" Google App Engine support using User API """ from __future__ import absolute_import from django.contrib.auth import authenticate from social_auth.backends import SocialAuthBackend, BaseAuth, USERNAME from google.appengine.api import users class GAEBackend(SocialAuthBackend): """BrowserID authentication back...
Add a social_auth wrapper backend around the Google App Engine User API.""" Google App Engine support using User API """ from __future__ import absolute_import from django.contrib.auth import authenticate from social_auth.backends import SocialAuthBackend, BaseAuth, USERNAME from google.appengine.api import users c...
<commit_before><commit_msg>Add a social_auth wrapper backend around the Google App Engine User API.<commit_after>""" Google App Engine support using User API """ from __future__ import absolute_import from django.contrib.auth import authenticate from social_auth.backends import SocialAuthBackend, BaseAuth, USERNAME ...
8dcd1112e1c6408b7fc5e6b18d8e2b6352c4819b
server/defective_servers.py
server/defective_servers.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 """ Defective XML Server in which every message character has LOSS_PROB chance to be lost. """ import random from xml_server import XMLServer LOSS_PROB = 1.0/100 def random_loss(message): return ''.join(map(lambda x: x if random.random() > LOSS...
Add defective server implementation that randomly loses message characters.
Add defective server implementation that randomly loses message characters.
Python
apache-2.0
Solucionamos/dummybmc
Add defective server implementation that randomly loses message characters.
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 """ Defective XML Server in which every message character has LOSS_PROB chance to be lost. """ import random from xml_server import XMLServer LOSS_PROB = 1.0/100 def random_loss(message): return ''.join(map(lambda x: x if random.random() > LOSS...
<commit_before><commit_msg>Add defective server implementation that randomly loses message characters.<commit_after>
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 """ Defective XML Server in which every message character has LOSS_PROB chance to be lost. """ import random from xml_server import XMLServer LOSS_PROB = 1.0/100 def random_loss(message): return ''.join(map(lambda x: x if random.random() > LOSS...
Add defective server implementation that randomly loses message characters.#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 """ Defective XML Server in which every message character has LOSS_PROB chance to be lost. """ import random from xml_server import XMLServer LOSS_PROB = 1.0/100 def random_...
<commit_before><commit_msg>Add defective server implementation that randomly loses message characters.<commit_after>#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 """ Defective XML Server in which every message character has LOSS_PROB chance to be lost. """ import random from xml_server import XM...
e36bdb49fd590f7bb0acf27593552c275c8979a8
numba/cuda/tests/cudapy/test_freevar.py
numba/cuda/tests/cudapy/test_freevar.py
from __future__ import print_function, absolute_import import numpy from numba import cuda from numba.cuda.testing import unittest class TestFreeVar(unittest.TestCase): def test_freevar(self): """Make sure we can compile the following kernel with freevar reference in macros """ fro...
Add test for freevar in cuda macros
Add test for freevar in cuda macros
Python
bsd-2-clause
cpcloud/numba,jriehl/numba,pitrou/numba,seibert/numba,stuartarchibald/numba,pombredanne/numba,pitrou/numba,GaZ3ll3/numba,gdementen/numba,pombredanne/numba,IntelLabs/numba,gmarkall/numba,gdementen/numba,numba/numba,pombredanne/numba,jriehl/numba,numba/numba,pitrou/numba,sklam/numba,sklam/numba,GaZ3ll3/numba,stefanseefel...
Add test for freevar in cuda macros
from __future__ import print_function, absolute_import import numpy from numba import cuda from numba.cuda.testing import unittest class TestFreeVar(unittest.TestCase): def test_freevar(self): """Make sure we can compile the following kernel with freevar reference in macros """ fro...
<commit_before><commit_msg>Add test for freevar in cuda macros<commit_after>
from __future__ import print_function, absolute_import import numpy from numba import cuda from numba.cuda.testing import unittest class TestFreeVar(unittest.TestCase): def test_freevar(self): """Make sure we can compile the following kernel with freevar reference in macros """ fro...
Add test for freevar in cuda macrosfrom __future__ import print_function, absolute_import import numpy from numba import cuda from numba.cuda.testing import unittest class TestFreeVar(unittest.TestCase): def test_freevar(self): """Make sure we can compile the following kernel with freevar reference ...
<commit_before><commit_msg>Add test for freevar in cuda macros<commit_after>from __future__ import print_function, absolute_import import numpy from numba import cuda from numba.cuda.testing import unittest class TestFreeVar(unittest.TestCase): def test_freevar(self): """Make sure we can compile the follo...
aa7fdb1d7a7b42dee7bcfcf1eb4a4a5efcb3a2e3
go/api/go_api/tests/utils.py
go/api/go_api/tests/utils.py
import json from django.conf import settings from mock import Mock, patch class MockRpc(object): def setUp(self): self.response = self.set_response() self.request = None self.rpc_patcher = patch('go.api.go_api.client.rpc') self.mock_rpc = self.rpc_patcher.start() self.mo...
Add MockRpc test utility class
Add MockRpc test utility class
Python
bsd-3-clause
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
Add MockRpc test utility class
import json from django.conf import settings from mock import Mock, patch class MockRpc(object): def setUp(self): self.response = self.set_response() self.request = None self.rpc_patcher = patch('go.api.go_api.client.rpc') self.mock_rpc = self.rpc_patcher.start() self.mo...
<commit_before><commit_msg>Add MockRpc test utility class<commit_after>
import json from django.conf import settings from mock import Mock, patch class MockRpc(object): def setUp(self): self.response = self.set_response() self.request = None self.rpc_patcher = patch('go.api.go_api.client.rpc') self.mock_rpc = self.rpc_patcher.start() self.mo...
Add MockRpc test utility classimport json from django.conf import settings from mock import Mock, patch class MockRpc(object): def setUp(self): self.response = self.set_response() self.request = None self.rpc_patcher = patch('go.api.go_api.client.rpc') self.mock_rpc = self.rpc_p...
<commit_before><commit_msg>Add MockRpc test utility class<commit_after>import json from django.conf import settings from mock import Mock, patch class MockRpc(object): def setUp(self): self.response = self.set_response() self.request = None self.rpc_patcher = patch('go.api.go_api.client...
9b0bec099dbc8bac73a19407416770d7c194d32f
cptm/corpusstatistics.py
cptm/corpusstatistics.py
import logging import argparse import glob from cptm.utils.experiment import load_config, get_corpus logger = logging.getLogger(__name__) logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.INFO) logging.getLogger('gensim').setLevel(logging.ERROR) logging.getLogger('CPTCorpus').setLevel(logging.E...
Add script to calculate basic corpus statistics
Add script to calculate basic corpus statistics - # of folia files (total and per parliamentary year) - text files (total and per perspective)
Python
apache-2.0
NLeSC/cptm,NLeSC/cptm
Add script to calculate basic corpus statistics - # of folia files (total and per parliamentary year) - text files (total and per perspective)
import logging import argparse import glob from cptm.utils.experiment import load_config, get_corpus logger = logging.getLogger(__name__) logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.INFO) logging.getLogger('gensim').setLevel(logging.ERROR) logging.getLogger('CPTCorpus').setLevel(logging.E...
<commit_before><commit_msg>Add script to calculate basic corpus statistics - # of folia files (total and per parliamentary year) - text files (total and per perspective)<commit_after>
import logging import argparse import glob from cptm.utils.experiment import load_config, get_corpus logger = logging.getLogger(__name__) logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.INFO) logging.getLogger('gensim').setLevel(logging.ERROR) logging.getLogger('CPTCorpus').setLevel(logging.E...
Add script to calculate basic corpus statistics - # of folia files (total and per parliamentary year) - text files (total and per perspective)import logging import argparse import glob from cptm.utils.experiment import load_config, get_corpus logger = logging.getLogger(__name__) logging.basicConfig(format='%(levelna...
<commit_before><commit_msg>Add script to calculate basic corpus statistics - # of folia files (total and per parliamentary year) - text files (total and per perspective)<commit_after>import logging import argparse import glob from cptm.utils.experiment import load_config, get_corpus logger = logging.getLogger(__name...
afd8acb520d2e5dbebbc3ea243774f343d34fc68
tests/test_login.py
tests/test_login.py
import pytest from selenium import webdriver @pytest.fixture def wd(request): wd = webdriver.Chrome() request.addfinalizer(wd.quit) return wd def test_example(wd): wd.get("http://localhost/litecart/admin/") wd.find_element_by_name("username").send_keys("admin") wd.find_element_by_name("passw...
Revert "Revert "Homework 3 (Login test developed)""
Revert "Revert "Homework 3 (Login test developed)"" This reverts commit 4175bef3bae18fed12eb5ed1cac4d405af2f9613.
Python
apache-2.0
rgurevych/webdriver_training
Revert "Revert "Homework 3 (Login test developed)"" This reverts commit 4175bef3bae18fed12eb5ed1cac4d405af2f9613.
import pytest from selenium import webdriver @pytest.fixture def wd(request): wd = webdriver.Chrome() request.addfinalizer(wd.quit) return wd def test_example(wd): wd.get("http://localhost/litecart/admin/") wd.find_element_by_name("username").send_keys("admin") wd.find_element_by_name("passw...
<commit_before><commit_msg>Revert "Revert "Homework 3 (Login test developed)"" This reverts commit 4175bef3bae18fed12eb5ed1cac4d405af2f9613.<commit_after>
import pytest from selenium import webdriver @pytest.fixture def wd(request): wd = webdriver.Chrome() request.addfinalizer(wd.quit) return wd def test_example(wd): wd.get("http://localhost/litecart/admin/") wd.find_element_by_name("username").send_keys("admin") wd.find_element_by_name("passw...
Revert "Revert "Homework 3 (Login test developed)"" This reverts commit 4175bef3bae18fed12eb5ed1cac4d405af2f9613.import pytest from selenium import webdriver @pytest.fixture def wd(request): wd = webdriver.Chrome() request.addfinalizer(wd.quit) return wd def test_example(wd): wd.get("http://localho...
<commit_before><commit_msg>Revert "Revert "Homework 3 (Login test developed)"" This reverts commit 4175bef3bae18fed12eb5ed1cac4d405af2f9613.<commit_after>import pytest from selenium import webdriver @pytest.fixture def wd(request): wd = webdriver.Chrome() request.addfinalizer(wd.quit) return wd def tes...
3d4d245632e87df97c5815710fa13281e700a12b
press_releases/migrations/0006_auto_20161115_1118.py
press_releases/migrations/0006_auto_20161115_1118.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('icekit_plugins_image', '0009_auto_20161026_2044'), ('icekit_press_releases', '0005_auto_20161110_1531'), ] operations = [ ...
Add icekit hero mixins to listing page.
Add icekit hero mixins to listing page.
Python
mit
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-press-releases,ic-labs/icekit-press-releases,ic-labs/django-icekit
Add icekit hero mixins to listing page.
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('icekit_plugins_image', '0009_auto_20161026_2044'), ('icekit_press_releases', '0005_auto_20161110_1531'), ] operations = [ ...
<commit_before><commit_msg>Add icekit hero mixins to listing page.<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('icekit_plugins_image', '0009_auto_20161026_2044'), ('icekit_press_releases', '0005_auto_20161110_1531'), ] operations = [ ...
Add icekit hero mixins to listing page.# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('icekit_plugins_image', '0009_auto_20161026_2044'), ('icekit_press_releases', '0005_auto_201611...
<commit_before><commit_msg>Add icekit hero mixins to listing page.<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('icekit_plugins_image', '0009_auto_20161026_2044'), ('...
69d50d15056cc996288f572f9177173087732f07
examples/upload_software.py
examples/upload_software.py
# -*- coding: utf-8 -*- # * Copyright (c) 2009-2020. Authors: see NOTICE file. # * # * 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...
Add an example of script to upload a Software, using V3.0.0 new Software architecture
Add an example of script to upload a Software, using V3.0.0 new Software architecture
Python
apache-2.0
cytomine/Cytomine-python-client,cytomine/Cytomine-python-client
Add an example of script to upload a Software, using V3.0.0 new Software architecture
# -*- coding: utf-8 -*- # * Copyright (c) 2009-2020. Authors: see NOTICE file. # * # * 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...
<commit_before><commit_msg>Add an example of script to upload a Software, using V3.0.0 new Software architecture<commit_after>
# -*- coding: utf-8 -*- # * Copyright (c) 2009-2020. Authors: see NOTICE file. # * # * 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...
Add an example of script to upload a Software, using V3.0.0 new Software architecture# -*- coding: utf-8 -*- # * Copyright (c) 2009-2020. Authors: see NOTICE file. # * # * Licensed under the Apache License, Version 2.0 (the "License"); # * you may not use this file except in compliance with the License. # * You may ob...
<commit_before><commit_msg>Add an example of script to upload a Software, using V3.0.0 new Software architecture<commit_after># -*- coding: utf-8 -*- # * Copyright (c) 2009-2020. Authors: see NOTICE file. # * # * Licensed under the Apache License, Version 2.0 (the "License"); # * you may not use this file except in co...
1e8197fee5031ee7ba384eb537b13f381a837685
neutron/tests/unit/conf/policies/test_service_type.py
neutron/tests/unit/conf/policies/test_service_type.py
# Copyright (c) 2021 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
Add tests for service_type API's new policy rules
Add tests for service_type API's new policy rules Related-blueprint: bp/secure-rbac-roles Change-Id: I0cbe260fc786d00b014c804ae74d99c8f9685e88
Python
apache-2.0
openstack/neutron,openstack/neutron,openstack/neutron,mahak/neutron,mahak/neutron,mahak/neutron
Add tests for service_type API's new policy rules Related-blueprint: bp/secure-rbac-roles Change-Id: I0cbe260fc786d00b014c804ae74d99c8f9685e88
# Copyright (c) 2021 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
<commit_before><commit_msg>Add tests for service_type API's new policy rules Related-blueprint: bp/secure-rbac-roles Change-Id: I0cbe260fc786d00b014c804ae74d99c8f9685e88<commit_after>
# Copyright (c) 2021 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
Add tests for service_type API's new policy rules Related-blueprint: bp/secure-rbac-roles Change-Id: I0cbe260fc786d00b014c804ae74d99c8f9685e88# Copyright (c) 2021 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ma...
<commit_before><commit_msg>Add tests for service_type API's new policy rules Related-blueprint: bp/secure-rbac-roles Change-Id: I0cbe260fc786d00b014c804ae74d99c8f9685e88<commit_after># Copyright (c) 2021 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except...
058b5f755ed3b9bbe5ee9fe863707ab5d9def5db
transfers/pre-transfer/00_file_to_folder.py
transfers/pre-transfer/00_file_to_folder.py
#!/usr/bin/env python from __future__ import print_function, unicode_literals import datetime import os import sys def main(transfer_path): """ If transfer_path is a file, move into a directory of the same name. """ if os.path.isdir(transfer_path): return 1 # Move file into temp dir tr...
Automate Transfers: Sample pre-transfer to move files to folders
Automate Transfers: Sample pre-transfer to move files to folders While a couple transfer types can accept files as well as folders, other pre-transfer scripts (eg adding a default processing config) require a folder.
Python
agpl-3.0
artefactual/automation-tools,artefactual/automation-tools
Automate Transfers: Sample pre-transfer to move files to folders While a couple transfer types can accept files as well as folders, other pre-transfer scripts (eg adding a default processing config) require a folder.
#!/usr/bin/env python from __future__ import print_function, unicode_literals import datetime import os import sys def main(transfer_path): """ If transfer_path is a file, move into a directory of the same name. """ if os.path.isdir(transfer_path): return 1 # Move file into temp dir tr...
<commit_before><commit_msg>Automate Transfers: Sample pre-transfer to move files to folders While a couple transfer types can accept files as well as folders, other pre-transfer scripts (eg adding a default processing config) require a folder.<commit_after>
#!/usr/bin/env python from __future__ import print_function, unicode_literals import datetime import os import sys def main(transfer_path): """ If transfer_path is a file, move into a directory of the same name. """ if os.path.isdir(transfer_path): return 1 # Move file into temp dir tr...
Automate Transfers: Sample pre-transfer to move files to folders While a couple transfer types can accept files as well as folders, other pre-transfer scripts (eg adding a default processing config) require a folder.#!/usr/bin/env python from __future__ import print_function, unicode_literals import datetime import o...
<commit_before><commit_msg>Automate Transfers: Sample pre-transfer to move files to folders While a couple transfer types can accept files as well as folders, other pre-transfer scripts (eg adding a default processing config) require a folder.<commit_after>#!/usr/bin/env python from __future__ import print_function, ...
ba277017118f440d59a9f053acdb1d9410c173fb
pygraphc/clustering/ClusterDistance.py
pygraphc/clustering/ClusterDistance.py
class ClusterDistance(object): @staticmethod def get_cosine_similarity(tfidf1, tfidf2, length1, length2): vector_products = 0 for ti1 in tfidf1: for ti2 in tfidf2: if ti1[0] == ti2[0]: vector_products += ti1[1] * ti2[1] try: c...
Add static method for distance similarity
Add static method for distance similarity
Python
mit
studiawan/pygraphc
Add static method for distance similarity
class ClusterDistance(object): @staticmethod def get_cosine_similarity(tfidf1, tfidf2, length1, length2): vector_products = 0 for ti1 in tfidf1: for ti2 in tfidf2: if ti1[0] == ti2[0]: vector_products += ti1[1] * ti2[1] try: c...
<commit_before><commit_msg>Add static method for distance similarity<commit_after>
class ClusterDistance(object): @staticmethod def get_cosine_similarity(tfidf1, tfidf2, length1, length2): vector_products = 0 for ti1 in tfidf1: for ti2 in tfidf2: if ti1[0] == ti2[0]: vector_products += ti1[1] * ti2[1] try: c...
Add static method for distance similarity class ClusterDistance(object): @staticmethod def get_cosine_similarity(tfidf1, tfidf2, length1, length2): vector_products = 0 for ti1 in tfidf1: for ti2 in tfidf2: if ti1[0] == ti2[0]: vector_products += ti...
<commit_before><commit_msg>Add static method for distance similarity<commit_after> class ClusterDistance(object): @staticmethod def get_cosine_similarity(tfidf1, tfidf2, length1, length2): vector_products = 0 for ti1 in tfidf1: for ti2 in tfidf2: if ti1[0] == ti2[0]: ...
86dade7f56370d5c15176abb1b1b4277ae9226ee
python_scripts/solr_query_immigrant.py
python_scripts/solr_query_immigrant.py
#!/usr/bin/python import ipdb #import time #import csv import sys import pysolr import dateutil.parser def get_word_counts( solr, query, date_str, count=1000 ) : date = dateutil.parser.parse( date_str ) documents = [] date_str = date.isoformat() + 'Z' date_query = "publish_date:[{0} TO {0}+7DAYS]...
Add script to measure usage of immigrant / illegal immigrant
Add script to measure usage of immigrant / illegal immigrant
Python
agpl-3.0
berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT...
Add script to measure usage of immigrant / illegal immigrant
#!/usr/bin/python import ipdb #import time #import csv import sys import pysolr import dateutil.parser def get_word_counts( solr, query, date_str, count=1000 ) : date = dateutil.parser.parse( date_str ) documents = [] date_str = date.isoformat() + 'Z' date_query = "publish_date:[{0} TO {0}+7DAYS]...
<commit_before><commit_msg>Add script to measure usage of immigrant / illegal immigrant<commit_after>
#!/usr/bin/python import ipdb #import time #import csv import sys import pysolr import dateutil.parser def get_word_counts( solr, query, date_str, count=1000 ) : date = dateutil.parser.parse( date_str ) documents = [] date_str = date.isoformat() + 'Z' date_query = "publish_date:[{0} TO {0}+7DAYS]...
Add script to measure usage of immigrant / illegal immigrant#!/usr/bin/python import ipdb #import time #import csv import sys import pysolr import dateutil.parser def get_word_counts( solr, query, date_str, count=1000 ) : date = dateutil.parser.parse( date_str ) documents = [] date_str = date.isoform...
<commit_before><commit_msg>Add script to measure usage of immigrant / illegal immigrant<commit_after>#!/usr/bin/python import ipdb #import time #import csv import sys import pysolr import dateutil.parser def get_word_counts( solr, query, date_str, count=1000 ) : date = dateutil.parser.parse( date_str ) docume...
5646a1e060cae4016fd3766fa5e9ad5486109e8e
tests/validation/cattlevalidationtest/core/test_host_api.py
tests/validation/cattlevalidationtest/core/test_host_api.py
from common_fixtures import * # NOQA import websocket as ws import pytest def test_host_api_token(admin_client): hosts = admin_client.list_host(kind='docker', removed_null=True) assert len(hosts) > 0 # valid token and a url to the websocket stats = hosts[0].stats() conn = ws.create_connection(st...
Add test for validation of JWT in host api
Add test for validation of JWT in host api
Python
apache-2.0
aruneli/validation-tests,sangeethah/validation-tests,cjellick/validation-tests,sonchang/validation-tests,hibooboo2/validation-tests,rancher/validation-tests,rancherio/validation-tests,sangeethah/validation-tests,cjellick/validation-tests,rancher/validation-tests,hibooboo2/validation-tests,rancherio/validation-tests,wla...
Add test for validation of JWT in host api
from common_fixtures import * # NOQA import websocket as ws import pytest def test_host_api_token(admin_client): hosts = admin_client.list_host(kind='docker', removed_null=True) assert len(hosts) > 0 # valid token and a url to the websocket stats = hosts[0].stats() conn = ws.create_connection(st...
<commit_before><commit_msg>Add test for validation of JWT in host api<commit_after>
from common_fixtures import * # NOQA import websocket as ws import pytest def test_host_api_token(admin_client): hosts = admin_client.list_host(kind='docker', removed_null=True) assert len(hosts) > 0 # valid token and a url to the websocket stats = hosts[0].stats() conn = ws.create_connection(st...
Add test for validation of JWT in host apifrom common_fixtures import * # NOQA import websocket as ws import pytest def test_host_api_token(admin_client): hosts = admin_client.list_host(kind='docker', removed_null=True) assert len(hosts) > 0 # valid token and a url to the websocket stats = hosts[0]....
<commit_before><commit_msg>Add test for validation of JWT in host api<commit_after>from common_fixtures import * # NOQA import websocket as ws import pytest def test_host_api_token(admin_client): hosts = admin_client.list_host(kind='docker', removed_null=True) assert len(hosts) > 0 # valid token and a u...
21183a9b42be47aaa81b7132a960aea62f218f15
src/tests/ggrc/models/test_control_assessment.py
src/tests/ggrc/models/test_control_assessment.py
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@reciprocitylabs.com # Maintained By: miha@reciprocitylabs.com from ggrc import db from ggrc.models import ControlAssessment from tests.ggrc im...
Add tests for CA slug generation
Add tests for CA slug generation Test that control assessment slugs are prefixed with control slug.
Python
apache-2.0
VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,selahssea/ggrc-core,hasanalom/ggrc-core,kr41/ggrc-core,VinnieJohns/ggrc-core,hyperNURb/ggrc-core,selahssea/ggrc-core,hyperNURb/ggrc-core,plamut/ggrc-core,prasannav7/ggrc-core,hyperNURb/ggrc-core,hyperNURb/ggrc-core,jmakov/ggrc-core,kr41/ggrc-core,jmakov/ggrc-core,prasannav7/gg...
Add tests for CA slug generation Test that control assessment slugs are prefixed with control slug.
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@reciprocitylabs.com # Maintained By: miha@reciprocitylabs.com from ggrc import db from ggrc.models import ControlAssessment from tests.ggrc im...
<commit_before><commit_msg>Add tests for CA slug generation Test that control assessment slugs are prefixed with control slug.<commit_after>
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@reciprocitylabs.com # Maintained By: miha@reciprocitylabs.com from ggrc import db from ggrc.models import ControlAssessment from tests.ggrc im...
Add tests for CA slug generation Test that control assessment slugs are prefixed with control slug.# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@reciprocitylabs.com # Maintained By: miha@r...
<commit_before><commit_msg>Add tests for CA slug generation Test that control assessment slugs are prefixed with control slug.<commit_after># Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@re...
cb7dd3e7bf8fdc195fa0b37479efa61e0091fbec
migrations/versions/201702221443_fb7b6aa148e_delete_legacy_paper_tables.py
migrations/versions/201702221443_fb7b6aa148e_delete_legacy_paper_tables.py
"""Delete legacy paper tables Revision ID: fb7b6aa148e Revises: 25d478c9d690 Create Date: 2017-02-22 14:43:34.952274 """ import sqlalchemy as sa from alembic import context, op from indico.core.db.sqlalchemy import UTCDateTime, PyIntEnum from indico.util.struct.enum import RichIntEnum # revision identifiers, used b...
Add alembic revision to delete legacy paper tables
Add alembic revision to delete legacy paper tables
Python
mit
pferreir/indico,ThiefMaster/indico,DirkHoffmann/indico,indico/indico,indico/indico,OmeGak/indico,mic4ael/indico,pferreir/indico,mic4ael/indico,OmeGak/indico,ThiefMaster/indico,mvidalgarcia/indico,ThiefMaster/indico,mic4ael/indico,indico/indico,DirkHoffmann/indico,OmeGak/indico,ThiefMaster/indico,DirkHoffmann/indico,mvi...
Add alembic revision to delete legacy paper tables
"""Delete legacy paper tables Revision ID: fb7b6aa148e Revises: 25d478c9d690 Create Date: 2017-02-22 14:43:34.952274 """ import sqlalchemy as sa from alembic import context, op from indico.core.db.sqlalchemy import UTCDateTime, PyIntEnum from indico.util.struct.enum import RichIntEnum # revision identifiers, used b...
<commit_before><commit_msg>Add alembic revision to delete legacy paper tables<commit_after>
"""Delete legacy paper tables Revision ID: fb7b6aa148e Revises: 25d478c9d690 Create Date: 2017-02-22 14:43:34.952274 """ import sqlalchemy as sa from alembic import context, op from indico.core.db.sqlalchemy import UTCDateTime, PyIntEnum from indico.util.struct.enum import RichIntEnum # revision identifiers, used b...
Add alembic revision to delete legacy paper tables"""Delete legacy paper tables Revision ID: fb7b6aa148e Revises: 25d478c9d690 Create Date: 2017-02-22 14:43:34.952274 """ import sqlalchemy as sa from alembic import context, op from indico.core.db.sqlalchemy import UTCDateTime, PyIntEnum from indico.util.struct.enum i...
<commit_before><commit_msg>Add alembic revision to delete legacy paper tables<commit_after>"""Delete legacy paper tables Revision ID: fb7b6aa148e Revises: 25d478c9d690 Create Date: 2017-02-22 14:43:34.952274 """ import sqlalchemy as sa from alembic import context, op from indico.core.db.sqlalchemy import UTCDateTime,...
7679915999905528cca912e7d824b1dc4f548d9e
tensorflow_model_analysis/notebook/colab/util_test.py
tensorflow_model_analysis/notebook/colab/util_test.py
# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Add unit test for generate_html_for_tfma_component.
Add unit test for generate_html_for_tfma_component. PiperOrigin-RevId: 465824929
Python
apache-2.0
tensorflow/model-analysis,tensorflow/model-analysis,tensorflow/model-analysis,tensorflow/model-analysis
Add unit test for generate_html_for_tfma_component. PiperOrigin-RevId: 465824929
# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before><commit_msg>Add unit test for generate_html_for_tfma_component. PiperOrigin-RevId: 465824929<commit_after>
# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Add unit test for generate_html_for_tfma_component. PiperOrigin-RevId: 465824929# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/lic...
<commit_before><commit_msg>Add unit test for generate_html_for_tfma_component. PiperOrigin-RevId: 465824929<commit_after># Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lice...
807e36f4eec5813d8d529de12df275a754b4b077
tasks.py
tasks.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from invoke import run, task from os.path import join, abspath, dirname ROOT = abspath(join(dirname(__file__))) @task def clean(docs=False, bytecode=False, extra=''): '''Cleanup all build artifacts''' patterns = ['build', 'dis...
Use invoke as build tool
Use invoke as build tool
Python
mit
luminusnetworks/flask-restplus,marrybird/flask-restplus,marrybird/flask-restplus,leiserfg/flask-restplus,fixedd/flask-restplus,l-vincent-l/flask-restplus,fixedd/flask-restplus,leiserfg/flask-restplus,l-vincent-l/flask-restplus,luminusnetworks/flask-restplus,awiddersheim/flask-restplus,awiddersheim/flask-restplus
Use invoke as build tool
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from invoke import run, task from os.path import join, abspath, dirname ROOT = abspath(join(dirname(__file__))) @task def clean(docs=False, bytecode=False, extra=''): '''Cleanup all build artifacts''' patterns = ['build', 'dis...
<commit_before><commit_msg>Use invoke as build tool<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from invoke import run, task from os.path import join, abspath, dirname ROOT = abspath(join(dirname(__file__))) @task def clean(docs=False, bytecode=False, extra=''): '''Cleanup all build artifacts''' patterns = ['build', 'dis...
Use invoke as build tool# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from invoke import run, task from os.path import join, abspath, dirname ROOT = abspath(join(dirname(__file__))) @task def clean(docs=False, bytecode=False, extra=''): '''Cleanup all build artifacts''' p...
<commit_before><commit_msg>Use invoke as build tool<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from invoke import run, task from os.path import join, abspath, dirname ROOT = abspath(join(dirname(__file__))) @task def clean(docs=False, bytecode=False, extra=''): ...
0607ed22c5fd12a0a9553f15c7c19a087ecae279
tempo.py
tempo.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/l...
Build a client for accessing Tempo.
Build a client for accessing Tempo.
Python
apache-2.0
rackerlabs/Tempo
Build a client for accessing Tempo.
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/l...
<commit_before><commit_msg>Build a client for accessing Tempo.<commit_after>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/l...
Build a client for accessing Tempo.# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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...
<commit_before><commit_msg>Build a client for accessing Tempo.<commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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. # ...
d1599309941261492abde2445616c42f48660f28
Diurnal_Plot.py
Diurnal_Plot.py
import sys import datetime as dt import matplotlib.pyplot as plt import numpy as np import matplotlib as mpl """ Diurnal_Plot.py: Produce diurnal plots of fitbit data (5 min intervals). Inspired by Stephen Wolfram's "The Personal Analytics of my Life" (http://blog.stephenwolfram.com/2012/03/the-personal...
Add very basic diurnal plotter
Add very basic diurnal plotter
Python
mit
mgaudet/FitbitAnalysisTools,mgaudet/FitbitAnalysisTools
Add very basic diurnal plotter
import sys import datetime as dt import matplotlib.pyplot as plt import numpy as np import matplotlib as mpl """ Diurnal_Plot.py: Produce diurnal plots of fitbit data (5 min intervals). Inspired by Stephen Wolfram's "The Personal Analytics of my Life" (http://blog.stephenwolfram.com/2012/03/the-personal...
<commit_before><commit_msg>Add very basic diurnal plotter<commit_after>
import sys import datetime as dt import matplotlib.pyplot as plt import numpy as np import matplotlib as mpl """ Diurnal_Plot.py: Produce diurnal plots of fitbit data (5 min intervals). Inspired by Stephen Wolfram's "The Personal Analytics of my Life" (http://blog.stephenwolfram.com/2012/03/the-personal...
Add very basic diurnal plotterimport sys import datetime as dt import matplotlib.pyplot as plt import numpy as np import matplotlib as mpl """ Diurnal_Plot.py: Produce diurnal plots of fitbit data (5 min intervals). Inspired by Stephen Wolfram's "The Personal Analytics of my Life" (http://blog.stephenwo...
<commit_before><commit_msg>Add very basic diurnal plotter<commit_after>import sys import datetime as dt import matplotlib.pyplot as plt import numpy as np import matplotlib as mpl """ Diurnal_Plot.py: Produce diurnal plots of fitbit data (5 min intervals). Inspired by Stephen Wolfram's "The Personal Analyti...
c33254615b4dc30143af1d0cb35b38ca73eae883
zvm/zstring.py
zvm/zstring.py
# # A ZString-to-ASCII Universal Translator. # # For the license of this file, please consult the LICENSE file in the # root directory of this distribution. # class ZStringEndOfString(Exception): """No more data left in string.""" class ZStringStream(object): """This class takes an address and a ZMemory, and ...
Add an unfinished version of the ZString stream translator.
Add an unfinished version of the ZString stream translator. * zvm/zstring.py: New file.
Python
bsd-3-clause
sussman/zvm,sussman/zvm
Add an unfinished version of the ZString stream translator. * zvm/zstring.py: New file.
# # A ZString-to-ASCII Universal Translator. # # For the license of this file, please consult the LICENSE file in the # root directory of this distribution. # class ZStringEndOfString(Exception): """No more data left in string.""" class ZStringStream(object): """This class takes an address and a ZMemory, and ...
<commit_before><commit_msg>Add an unfinished version of the ZString stream translator. * zvm/zstring.py: New file.<commit_after>
# # A ZString-to-ASCII Universal Translator. # # For the license of this file, please consult the LICENSE file in the # root directory of this distribution. # class ZStringEndOfString(Exception): """No more data left in string.""" class ZStringStream(object): """This class takes an address and a ZMemory, and ...
Add an unfinished version of the ZString stream translator. * zvm/zstring.py: New file.# # A ZString-to-ASCII Universal Translator. # # For the license of this file, please consult the LICENSE file in the # root directory of this distribution. # class ZStringEndOfString(Exception): """No more data left in string....
<commit_before><commit_msg>Add an unfinished version of the ZString stream translator. * zvm/zstring.py: New file.<commit_after># # A ZString-to-ASCII Universal Translator. # # For the license of this file, please consult the LICENSE file in the # root directory of this distribution. # class ZStringEndOfString(Except...
68a0932e6b753ef475148d258fb4e2b9af607d55
bin/RandomWallpaper.py
bin/RandomWallpaper.py
# Copyright 2021 Bruce Dawson. 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 applicabl...
Add script to display random wallpaper
Add script to display random wallpaper Windows 10 took away the handy "random good wallpaper" and apparently it took me five years to get around to recreating it. This script makes use of my existing database of photos, with star ratings listed. It filters that database (actually just a text file) down to just the fiv...
Python
apache-2.0
randomascii/tools,randomascii/tools,randomascii/tools
Add script to display random wallpaper Windows 10 took away the handy "random good wallpaper" and apparently it took me five years to get around to recreating it. This script makes use of my existing database of photos, with star ratings listed. It filters that database (actually just a text file) down to just the fiv...
# Copyright 2021 Bruce Dawson. 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 applicabl...
<commit_before><commit_msg>Add script to display random wallpaper Windows 10 took away the handy "random good wallpaper" and apparently it took me five years to get around to recreating it. This script makes use of my existing database of photos, with star ratings listed. It filters that database (actually just a text...
# Copyright 2021 Bruce Dawson. 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 applicabl...
Add script to display random wallpaper Windows 10 took away the handy "random good wallpaper" and apparently it took me five years to get around to recreating it. This script makes use of my existing database of photos, with star ratings listed. It filters that database (actually just a text file) down to just the fiv...
<commit_before><commit_msg>Add script to display random wallpaper Windows 10 took away the handy "random good wallpaper" and apparently it took me five years to get around to recreating it. This script makes use of my existing database of photos, with star ratings listed. It filters that database (actually just a text...
31bd7cac4506594a79958664026ee841c69ae4b7
gmn/src/gmn/app/migrations/0005_auto_20170527_1554.py
gmn/src/gmn/app/migrations/0005_auto_20170527_1554.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-27 15:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('app', '0004_auto_20170523_0137'), ] operations = [...
Add Django db migration to latest version
Add Django db migration to latest version
Python
apache-2.0
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
Add Django db migration to latest version
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-27 15:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('app', '0004_auto_20170523_0137'), ] operations = [...
<commit_before><commit_msg>Add Django db migration to latest version<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-27 15:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('app', '0004_auto_20170523_0137'), ] operations = [...
Add Django db migration to latest version# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-27 15:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('app', '0004_auto_2...
<commit_before><commit_msg>Add Django db migration to latest version<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-27 15:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): depe...
2b91bf8037fd12f31eb639b0847217b07f413a66
bin/refresh_varsnap.py
bin/refresh_varsnap.py
""" This script refreshes production varsnap snaps """ import os import subprocess import sys import requests import syspath from syspath import git_root from app import serve os.environ['ENV'] = 'production' app = serve.app.test_client() app.get('/') app.get('/health') app.get('/robots.txt') app.get('/asdf')
Add script to refresh python production snaps
Add script to refresh python production snaps
Python
mit
albertyw/base-flask,albertyw/base-flask,albertyw/base-flask,albertyw/base-flask
Add script to refresh python production snaps
""" This script refreshes production varsnap snaps """ import os import subprocess import sys import requests import syspath from syspath import git_root from app import serve os.environ['ENV'] = 'production' app = serve.app.test_client() app.get('/') app.get('/health') app.get('/robots.txt') app.get('/asdf')
<commit_before><commit_msg>Add script to refresh python production snaps<commit_after>
""" This script refreshes production varsnap snaps """ import os import subprocess import sys import requests import syspath from syspath import git_root from app import serve os.environ['ENV'] = 'production' app = serve.app.test_client() app.get('/') app.get('/health') app.get('/robots.txt') app.get('/asdf')
Add script to refresh python production snaps""" This script refreshes production varsnap snaps """ import os import subprocess import sys import requests import syspath from syspath import git_root from app import serve os.environ['ENV'] = 'production' app = serve.app.test_client() app.get('/') app.get('/health')...
<commit_before><commit_msg>Add script to refresh python production snaps<commit_after>""" This script refreshes production varsnap snaps """ import os import subprocess import sys import requests import syspath from syspath import git_root from app import serve os.environ['ENV'] = 'production' app = serve.app.test...
a311df9c2d591ca3db33b42ce50de37968f4f5b8
letsencrypt/client/tests/display/enhancements_test.py
letsencrypt/client/tests/display/enhancements_test.py
"""Module for enhancement UI.""" import logging import unittest import mock from letsencrypt.client import errors from letsencrypt.client.display import display_util class AskTest(unittest.TestCase): """Test the ask method.""" def setUp(self): logging.disable(logging.CRITICAL) def tearDown(self...
Add tests for enhancments UI
Add tests for enhancments UI
Python
apache-2.0
BillKeenan/lets-encrypt-preview,lbeltrame/letsencrypt,rugk/letsencrypt,Sveder/letsencrypt,vcavallo/letsencrypt,mrb/letsencrypt,stweil/letsencrypt,VladimirTyrin/letsencrypt,TheBoegl/letsencrypt,g1franc/lets-encrypt-preview,letsencrypt/letsencrypt,bestwpw/letsencrypt,jsha/letsencrypt,jmaurice/letsencrypt,twstrike/le_for_...
Add tests for enhancments UI
"""Module for enhancement UI.""" import logging import unittest import mock from letsencrypt.client import errors from letsencrypt.client.display import display_util class AskTest(unittest.TestCase): """Test the ask method.""" def setUp(self): logging.disable(logging.CRITICAL) def tearDown(self...
<commit_before><commit_msg>Add tests for enhancments UI<commit_after>
"""Module for enhancement UI.""" import logging import unittest import mock from letsencrypt.client import errors from letsencrypt.client.display import display_util class AskTest(unittest.TestCase): """Test the ask method.""" def setUp(self): logging.disable(logging.CRITICAL) def tearDown(self...
Add tests for enhancments UI"""Module for enhancement UI.""" import logging import unittest import mock from letsencrypt.client import errors from letsencrypt.client.display import display_util class AskTest(unittest.TestCase): """Test the ask method.""" def setUp(self): logging.disable(logging.CRIT...
<commit_before><commit_msg>Add tests for enhancments UI<commit_after>"""Module for enhancement UI.""" import logging import unittest import mock from letsencrypt.client import errors from letsencrypt.client.display import display_util class AskTest(unittest.TestCase): """Test the ask method.""" def setUp(se...
21d46e91fafe1081f49eabfb93f9caf6c39a31ba
laboratorio/rsa/__init__.py
laboratorio/rsa/__init__.py
# -*- coding: utf-8 -*- from rsa import RSAKeyGeneration import sys def main(): print('mensagem:') mensagem = input() if len(sys.argv) > 2: tamanho_chave, acuracidade = eval(sys.argv[1]), eval(sys.argv[2]) else: tamanho_chave, acuracidade = 64, 15 rsa = RSAKeyGeneration() i...
Add init sem teste de primalidade
Add init sem teste de primalidade
Python
mit
tonussi/inseguro,tonussi/inseguro,tonussi/inseguro
Add init sem teste de primalidade
# -*- coding: utf-8 -*- from rsa import RSAKeyGeneration import sys def main(): print('mensagem:') mensagem = input() if len(sys.argv) > 2: tamanho_chave, acuracidade = eval(sys.argv[1]), eval(sys.argv[2]) else: tamanho_chave, acuracidade = 64, 15 rsa = RSAKeyGeneration() i...
<commit_before><commit_msg>Add init sem teste de primalidade<commit_after>
# -*- coding: utf-8 -*- from rsa import RSAKeyGeneration import sys def main(): print('mensagem:') mensagem = input() if len(sys.argv) > 2: tamanho_chave, acuracidade = eval(sys.argv[1]), eval(sys.argv[2]) else: tamanho_chave, acuracidade = 64, 15 rsa = RSAKeyGeneration() i...
Add init sem teste de primalidade# -*- coding: utf-8 -*- from rsa import RSAKeyGeneration import sys def main(): print('mensagem:') mensagem = input() if len(sys.argv) > 2: tamanho_chave, acuracidade = eval(sys.argv[1]), eval(sys.argv[2]) else: tamanho_chave, acuracidade = 64, 15 ...
<commit_before><commit_msg>Add init sem teste de primalidade<commit_after># -*- coding: utf-8 -*- from rsa import RSAKeyGeneration import sys def main(): print('mensagem:') mensagem = input() if len(sys.argv) > 2: tamanho_chave, acuracidade = eval(sys.argv[1]), eval(sys.argv[2]) else: ...
155fa00e27fdc12c6c11925308a7790bedfca254
Problems/alternatingSums.py
Problems/alternatingSums.py
def alternatingSums(a): # teamOne = [n for i, n in enumerate(a) if i % 2 == 0] # teamTwo = [n for i, n in enumerate(a) if i % 2 == 1] # return (sum(teamOne), sum(teamTwo)) return (sum(a[::2]), sum(a[1::2]))
Solve Code Fights alternating sums problem
Solve Code Fights alternating sums problem
Python
mit
HKuz/Test_Code
Solve Code Fights alternating sums problem
def alternatingSums(a): # teamOne = [n for i, n in enumerate(a) if i % 2 == 0] # teamTwo = [n for i, n in enumerate(a) if i % 2 == 1] # return (sum(teamOne), sum(teamTwo)) return (sum(a[::2]), sum(a[1::2]))
<commit_before><commit_msg>Solve Code Fights alternating sums problem<commit_after>
def alternatingSums(a): # teamOne = [n for i, n in enumerate(a) if i % 2 == 0] # teamTwo = [n for i, n in enumerate(a) if i % 2 == 1] # return (sum(teamOne), sum(teamTwo)) return (sum(a[::2]), sum(a[1::2]))
Solve Code Fights alternating sums problemdef alternatingSums(a): # teamOne = [n for i, n in enumerate(a) if i % 2 == 0] # teamTwo = [n for i, n in enumerate(a) if i % 2 == 1] # return (sum(teamOne), sum(teamTwo)) return (sum(a[::2]), sum(a[1::2]))
<commit_before><commit_msg>Solve Code Fights alternating sums problem<commit_after>def alternatingSums(a): # teamOne = [n for i, n in enumerate(a) if i % 2 == 0] # teamTwo = [n for i, n in enumerate(a) if i % 2 == 1] # return (sum(teamOne), sum(teamTwo)) return (sum(a[::2]), sum(a[1::2]))
f8bf5d7ee7617b1600130c2b832b3704d7c75c5e
dens_slope.py
dens_slope.py
#!/usr/bin/env python # ----------------------------------------------------------------------------- # GENHERNQUIST.DENS_SLOPE # Laura L Watkins [lauralwatkins@gmail.com] # ----------------------------------------------------------------------------- def dens_slope(r, rs, alpha, beta, gamma): """ The sl...
Add routine to calculate density slope.
Add routine to calculate density slope.
Python
bsd-2-clause
lauralwatkins/genhernquist
Add routine to calculate density slope.
#!/usr/bin/env python # ----------------------------------------------------------------------------- # GENHERNQUIST.DENS_SLOPE # Laura L Watkins [lauralwatkins@gmail.com] # ----------------------------------------------------------------------------- def dens_slope(r, rs, alpha, beta, gamma): """ The sl...
<commit_before><commit_msg>Add routine to calculate density slope.<commit_after>
#!/usr/bin/env python # ----------------------------------------------------------------------------- # GENHERNQUIST.DENS_SLOPE # Laura L Watkins [lauralwatkins@gmail.com] # ----------------------------------------------------------------------------- def dens_slope(r, rs, alpha, beta, gamma): """ The sl...
Add routine to calculate density slope.#!/usr/bin/env python # ----------------------------------------------------------------------------- # GENHERNQUIST.DENS_SLOPE # Laura L Watkins [lauralwatkins@gmail.com] # ----------------------------------------------------------------------------- def dens_slope(r, rs, alpha...
<commit_before><commit_msg>Add routine to calculate density slope.<commit_after>#!/usr/bin/env python # ----------------------------------------------------------------------------- # GENHERNQUIST.DENS_SLOPE # Laura L Watkins [lauralwatkins@gmail.com] # ------------------------------------------------------------------...
4481fb40a34ebb9ec7ab3c857697fa1049a6e600
resolwe/flow/migrations/0042_delete_obsolete_perms.py
resolwe/flow/migrations/0042_delete_obsolete_perms.py
# Generated by Django 2.2.6 on 2019-11-11 14:03 from django.db import migrations def delete_obsolete_perms(apps, schema_editor): """Delete obsolete permissions from the database.""" Permission = apps.get_model('auth', 'Permission') Permission.objects.filter( codename__in=[ 'add_collec...
Delete obsolete permissions from the database
Delete obsolete permissions from the database
Python
apache-2.0
genialis/resolwe,genialis/resolwe
Delete obsolete permissions from the database
# Generated by Django 2.2.6 on 2019-11-11 14:03 from django.db import migrations def delete_obsolete_perms(apps, schema_editor): """Delete obsolete permissions from the database.""" Permission = apps.get_model('auth', 'Permission') Permission.objects.filter( codename__in=[ 'add_collec...
<commit_before><commit_msg>Delete obsolete permissions from the database<commit_after>
# Generated by Django 2.2.6 on 2019-11-11 14:03 from django.db import migrations def delete_obsolete_perms(apps, schema_editor): """Delete obsolete permissions from the database.""" Permission = apps.get_model('auth', 'Permission') Permission.objects.filter( codename__in=[ 'add_collec...
Delete obsolete permissions from the database# Generated by Django 2.2.6 on 2019-11-11 14:03 from django.db import migrations def delete_obsolete_perms(apps, schema_editor): """Delete obsolete permissions from the database.""" Permission = apps.get_model('auth', 'Permission') Permission.objects.filter( ...
<commit_before><commit_msg>Delete obsolete permissions from the database<commit_after># Generated by Django 2.2.6 on 2019-11-11 14:03 from django.db import migrations def delete_obsolete_perms(apps, schema_editor): """Delete obsolete permissions from the database.""" Permission = apps.get_model('auth', 'Perm...
e9a7f28e11e33d5d8679c65697b5588440a4eddd
tests/util/test_platform.py
tests/util/test_platform.py
import platform from keyring.util.platform_ import ( config_root, data_root, _config_root_Linux, _config_root_Windows, _data_root_Linux, _data_root_Windows, ) def test_platform_Linux(): # rely on the Github Actions workflow to run this on different platforms if platform.system() != "L...
Add failing test for keyring.util.platform_.config_root
Add failing test for keyring.util.platform_.config_root
Python
mit
jaraco/keyring
Add failing test for keyring.util.platform_.config_root
import platform from keyring.util.platform_ import ( config_root, data_root, _config_root_Linux, _config_root_Windows, _data_root_Linux, _data_root_Windows, ) def test_platform_Linux(): # rely on the Github Actions workflow to run this on different platforms if platform.system() != "L...
<commit_before><commit_msg>Add failing test for keyring.util.platform_.config_root<commit_after>
import platform from keyring.util.platform_ import ( config_root, data_root, _config_root_Linux, _config_root_Windows, _data_root_Linux, _data_root_Windows, ) def test_platform_Linux(): # rely on the Github Actions workflow to run this on different platforms if platform.system() != "L...
Add failing test for keyring.util.platform_.config_rootimport platform from keyring.util.platform_ import ( config_root, data_root, _config_root_Linux, _config_root_Windows, _data_root_Linux, _data_root_Windows, ) def test_platform_Linux(): # rely on the Github Actions workflow to run thi...
<commit_before><commit_msg>Add failing test for keyring.util.platform_.config_root<commit_after>import platform from keyring.util.platform_ import ( config_root, data_root, _config_root_Linux, _config_root_Windows, _data_root_Linux, _data_root_Windows, ) def test_platform_Linux(): # rely ...
c73efe65afd65b6f1b706fba144453e1e40698ba
tests/cli/test_repair.py
tests/cli/test_repair.py
from vdirsyncer.cli.utils import repair_storage from vdirsyncer.storage.memory import MemoryStorage from vdirsyncer.utils.vobject import Item def test_repair_uids(): s = MemoryStorage() s.upload(Item(u'BEGIN:VCARD\nEND:VCARD')) repair_storage(s) uid, = [s.get(href)[0].uid for href, etag in s.list()]...
Add test for repair command
Add test for repair command
Python
mit
hobarrera/vdirsyncer,untitaker/vdirsyncer,tribut/vdirsyncer,credativUK/vdirsyncer,credativUK/vdirsyncer,untitaker/vdirsyncer,untitaker/vdirsyncer,hobarrera/vdirsyncer,tribut/vdirsyncer
Add test for repair command
from vdirsyncer.cli.utils import repair_storage from vdirsyncer.storage.memory import MemoryStorage from vdirsyncer.utils.vobject import Item def test_repair_uids(): s = MemoryStorage() s.upload(Item(u'BEGIN:VCARD\nEND:VCARD')) repair_storage(s) uid, = [s.get(href)[0].uid for href, etag in s.list()]...
<commit_before><commit_msg>Add test for repair command<commit_after>
from vdirsyncer.cli.utils import repair_storage from vdirsyncer.storage.memory import MemoryStorage from vdirsyncer.utils.vobject import Item def test_repair_uids(): s = MemoryStorage() s.upload(Item(u'BEGIN:VCARD\nEND:VCARD')) repair_storage(s) uid, = [s.get(href)[0].uid for href, etag in s.list()]...
Add test for repair commandfrom vdirsyncer.cli.utils import repair_storage from vdirsyncer.storage.memory import MemoryStorage from vdirsyncer.utils.vobject import Item def test_repair_uids(): s = MemoryStorage() s.upload(Item(u'BEGIN:VCARD\nEND:VCARD')) repair_storage(s) uid, = [s.get(href)[0].uid ...
<commit_before><commit_msg>Add test for repair command<commit_after>from vdirsyncer.cli.utils import repair_storage from vdirsyncer.storage.memory import MemoryStorage from vdirsyncer.utils.vobject import Item def test_repair_uids(): s = MemoryStorage() s.upload(Item(u'BEGIN:VCARD\nEND:VCARD')) repair_st...
62ebb9b6e0e3ca0ed9e39b016e7b8e75dad92600
dataviva/apps/session/login_providers.py
dataviva/apps/session/login_providers.py
from flask import Flask, redirect, url_for, session, request from flask_oauth import OAuth from config import GOOGLE_OAUTH_ID, GOOGLE_OAUTH_SECRET, \ TWITTER_OAUTH_ID, TWITTER_OAUTH_SECRET, \ FACEBOOK_OAUTH_ID, FACEBOOK_OAUTH_SECRET oauth = OAuth() google = oauth.remote_app('go...
Add login provides in session module.
Add login provides in session module.
Python
mit
DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site
Add login provides in session module.
from flask import Flask, redirect, url_for, session, request from flask_oauth import OAuth from config import GOOGLE_OAUTH_ID, GOOGLE_OAUTH_SECRET, \ TWITTER_OAUTH_ID, TWITTER_OAUTH_SECRET, \ FACEBOOK_OAUTH_ID, FACEBOOK_OAUTH_SECRET oauth = OAuth() google = oauth.remote_app('go...
<commit_before><commit_msg>Add login provides in session module.<commit_after>
from flask import Flask, redirect, url_for, session, request from flask_oauth import OAuth from config import GOOGLE_OAUTH_ID, GOOGLE_OAUTH_SECRET, \ TWITTER_OAUTH_ID, TWITTER_OAUTH_SECRET, \ FACEBOOK_OAUTH_ID, FACEBOOK_OAUTH_SECRET oauth = OAuth() google = oauth.remote_app('go...
Add login provides in session module.from flask import Flask, redirect, url_for, session, request from flask_oauth import OAuth from config import GOOGLE_OAUTH_ID, GOOGLE_OAUTH_SECRET, \ TWITTER_OAUTH_ID, TWITTER_OAUTH_SECRET, \ FACEBOOK_OAUTH_ID, FACEBOOK_OAUTH_SECRET oauth = O...
<commit_before><commit_msg>Add login provides in session module.<commit_after>from flask import Flask, redirect, url_for, session, request from flask_oauth import OAuth from config import GOOGLE_OAUTH_ID, GOOGLE_OAUTH_SECRET, \ TWITTER_OAUTH_ID, TWITTER_OAUTH_SECRET, \ FACEBOOK_O...
7cbde0dd69aa6c49ab1483e7aa00bf8e141a6adc
src/util/extractMahoutRes.py
src/util/extractMahoutRes.py
import os, sys from operator import itemgetter def errorExit(msg): sys.stderr.write(msg) sys.exit(1) def main(): # Verify arguments if len(sys.argv) != 3: errorExit("Usage: {} MINSUP FILE\n".format(os.path.basename(sys.argv[0]))) minSup = int(sys.argv[1]) fileName = sys.argv[2] if ...
Add a script to extract the results from a Mahout PFPgrowth run
Add a script to extract the results from a Mahout PFPgrowth run
Python
apache-2.0
jdebrabant/parallel_arules,jdebrabant/parallel_arules,jdebrabant/parallel_arules,jdebrabant/parallel_arules
Add a script to extract the results from a Mahout PFPgrowth run
import os, sys from operator import itemgetter def errorExit(msg): sys.stderr.write(msg) sys.exit(1) def main(): # Verify arguments if len(sys.argv) != 3: errorExit("Usage: {} MINSUP FILE\n".format(os.path.basename(sys.argv[0]))) minSup = int(sys.argv[1]) fileName = sys.argv[2] if ...
<commit_before><commit_msg>Add a script to extract the results from a Mahout PFPgrowth run<commit_after>
import os, sys from operator import itemgetter def errorExit(msg): sys.stderr.write(msg) sys.exit(1) def main(): # Verify arguments if len(sys.argv) != 3: errorExit("Usage: {} MINSUP FILE\n".format(os.path.basename(sys.argv[0]))) minSup = int(sys.argv[1]) fileName = sys.argv[2] if ...
Add a script to extract the results from a Mahout PFPgrowth runimport os, sys from operator import itemgetter def errorExit(msg): sys.stderr.write(msg) sys.exit(1) def main(): # Verify arguments if len(sys.argv) != 3: errorExit("Usage: {} MINSUP FILE\n".format(os.path.basename(sys.argv[0]))) ...
<commit_before><commit_msg>Add a script to extract the results from a Mahout PFPgrowth run<commit_after>import os, sys from operator import itemgetter def errorExit(msg): sys.stderr.write(msg) sys.exit(1) def main(): # Verify arguments if len(sys.argv) != 3: errorExit("Usage: {} MINSUP FILE\n"...
eab9a6add303d06ac617e0cb219e99600b14e54f
utils/parse_registration.py
utils/parse_registration.py
#!/usr/bin/env python3 import csv import sys # For this function to work, the attendance list needs to include the exact fields as described # below. Otherwise this function won't be able to confirm that the ballot came from the correct # person (or that the person even registered). def confirm_id(id, name, org, atte...
Add script to parse registration CSV
Add script to parse registration CSV
Python
mit
mpi-forum/mpi-forum.github.io,mpi-forum/mpi-forum.github.io,mpi-forum/mpi-forum.github.io,mpi-forum/mpi-forum.github.io,mpi-forum/mpi-forum.github.io
Add script to parse registration CSV
#!/usr/bin/env python3 import csv import sys # For this function to work, the attendance list needs to include the exact fields as described # below. Otherwise this function won't be able to confirm that the ballot came from the correct # person (or that the person even registered). def confirm_id(id, name, org, atte...
<commit_before><commit_msg>Add script to parse registration CSV<commit_after>
#!/usr/bin/env python3 import csv import sys # For this function to work, the attendance list needs to include the exact fields as described # below. Otherwise this function won't be able to confirm that the ballot came from the correct # person (or that the person even registered). def confirm_id(id, name, org, atte...
Add script to parse registration CSV#!/usr/bin/env python3 import csv import sys # For this function to work, the attendance list needs to include the exact fields as described # below. Otherwise this function won't be able to confirm that the ballot came from the correct # person (or that the person even registered)...
<commit_before><commit_msg>Add script to parse registration CSV<commit_after>#!/usr/bin/env python3 import csv import sys # For this function to work, the attendance list needs to include the exact fields as described # below. Otherwise this function won't be able to confirm that the ballot came from the correct # pe...
6328f5f4bbfa3c20f429f9fa648258cde54ac178
cthulhubot/management/commands/restart_masters.py
cthulhubot/management/commands/restart_masters.py
from django.core.management.base import BaseCommand from cthulhubot.models import Buildmaster class Command(BaseCommand): help = 'Restart all Buildmaster processes' args = "" def handle(self, *fixture_labels, **options): verbosity = int(options.get('verbosity', 1)) commit = int(options.ge...
Add ability to restart masters from console
Add ability to restart masters from console
Python
bsd-3-clause
centrumholdings/cthulhubot
Add ability to restart masters from console
from django.core.management.base import BaseCommand from cthulhubot.models import Buildmaster class Command(BaseCommand): help = 'Restart all Buildmaster processes' args = "" def handle(self, *fixture_labels, **options): verbosity = int(options.get('verbosity', 1)) commit = int(options.ge...
<commit_before><commit_msg>Add ability to restart masters from console<commit_after>
from django.core.management.base import BaseCommand from cthulhubot.models import Buildmaster class Command(BaseCommand): help = 'Restart all Buildmaster processes' args = "" def handle(self, *fixture_labels, **options): verbosity = int(options.get('verbosity', 1)) commit = int(options.ge...
Add ability to restart masters from consolefrom django.core.management.base import BaseCommand from cthulhubot.models import Buildmaster class Command(BaseCommand): help = 'Restart all Buildmaster processes' args = "" def handle(self, *fixture_labels, **options): verbosity = int(options.get('verb...
<commit_before><commit_msg>Add ability to restart masters from console<commit_after>from django.core.management.base import BaseCommand from cthulhubot.models import Buildmaster class Command(BaseCommand): help = 'Restart all Buildmaster processes' args = "" def handle(self, *fixture_labels, **options): ...
7400c4d7719d2df46674d8604a535b4c589150ba
tests/health_checks/test_per_ld_snp_AND_gwas_snp.py
tests/health_checks/test_per_ld_snp_AND_gwas_snp.py
# ------------------------------------------------ # built-ins import unittest # local from .base import TestPostgapBase # ------------------------------------------------ class TestPostgapPerLdSnpANDGwasSnp(TestPostgapBase): def setUp(self): self.per_ld_snp_and_gwas_snp = self.pg.groupby(['ld_snp_rsID',...
Add test per ld snp and gwas snp
Add test per ld snp and gwas snp
Python
apache-2.0
Ensembl/cttv024,Ensembl/cttv024
Add test per ld snp and gwas snp
# ------------------------------------------------ # built-ins import unittest # local from .base import TestPostgapBase # ------------------------------------------------ class TestPostgapPerLdSnpANDGwasSnp(TestPostgapBase): def setUp(self): self.per_ld_snp_and_gwas_snp = self.pg.groupby(['ld_snp_rsID',...
<commit_before><commit_msg>Add test per ld snp and gwas snp<commit_after>
# ------------------------------------------------ # built-ins import unittest # local from .base import TestPostgapBase # ------------------------------------------------ class TestPostgapPerLdSnpANDGwasSnp(TestPostgapBase): def setUp(self): self.per_ld_snp_and_gwas_snp = self.pg.groupby(['ld_snp_rsID',...
Add test per ld snp and gwas snp# ------------------------------------------------ # built-ins import unittest # local from .base import TestPostgapBase # ------------------------------------------------ class TestPostgapPerLdSnpANDGwasSnp(TestPostgapBase): def setUp(self): self.per_ld_snp_and_gwas_snp =...
<commit_before><commit_msg>Add test per ld snp and gwas snp<commit_after># ------------------------------------------------ # built-ins import unittest # local from .base import TestPostgapBase # ------------------------------------------------ class TestPostgapPerLdSnpANDGwasSnp(TestPostgapBase): def setUp(self...
e198853e9347b908a1ea9880e4eb4433e49e140b
DeployUtil/toolsession.py
DeployUtil/toolsession.py
import urllib.request import ssl def create_toolsess_httpsHandler(): context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) context.verify_mode = ssl.CERT_NONE https_handler = urllib.request.HTTPSHandler(context=context) return https_handler
Refactor out the SSL handler.
Refactor out the SSL handler.
Python
mit
loarabia/DeployUtil
Refactor out the SSL handler.
import urllib.request import ssl def create_toolsess_httpsHandler(): context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) context.verify_mode = ssl.CERT_NONE https_handler = urllib.request.HTTPSHandler(context=context) return https_handler
<commit_before><commit_msg>Refactor out the SSL handler.<commit_after>
import urllib.request import ssl def create_toolsess_httpsHandler(): context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) context.verify_mode = ssl.CERT_NONE https_handler = urllib.request.HTTPSHandler(context=context) return https_handler
Refactor out the SSL handler.import urllib.request import ssl def create_toolsess_httpsHandler(): context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) context.verify_mode = ssl.CERT_NONE https_handler = urllib.request.HTTPSHandler(context=context) return https_handler
<commit_before><commit_msg>Refactor out the SSL handler.<commit_after>import urllib.request import ssl def create_toolsess_httpsHandler(): context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) context.verify_mode = ssl.CERT_NONE https_handler = urllib.request.HTTPSHandler(context=context) return https_handler
cc41e1ae4ff7055d70d15cb9783935405158a300
gchart.py
gchart.py
# Google Chart wrapper for iampl. from IPython.core.display import Javascript def GeoChart(keys, data, **kwargs): table = "{},\n".format(keys) for i in data: table += "['{}', {}],\n".format(i, data[i]) options = "" for arg, value in kwargs.iteritems(): if isinstance(value, bool): ...
Add a wrapper to GeoChart
Add a wrapper to GeoChart
Python
bsd-2-clause
vitaut/iampl
Add a wrapper to GeoChart
# Google Chart wrapper for iampl. from IPython.core.display import Javascript def GeoChart(keys, data, **kwargs): table = "{},\n".format(keys) for i in data: table += "['{}', {}],\n".format(i, data[i]) options = "" for arg, value in kwargs.iteritems(): if isinstance(value, bool): ...
<commit_before><commit_msg>Add a wrapper to GeoChart<commit_after>
# Google Chart wrapper for iampl. from IPython.core.display import Javascript def GeoChart(keys, data, **kwargs): table = "{},\n".format(keys) for i in data: table += "['{}', {}],\n".format(i, data[i]) options = "" for arg, value in kwargs.iteritems(): if isinstance(value, bool): ...
Add a wrapper to GeoChart# Google Chart wrapper for iampl. from IPython.core.display import Javascript def GeoChart(keys, data, **kwargs): table = "{},\n".format(keys) for i in data: table += "['{}', {}],\n".format(i, data[i]) options = "" for arg, value in kwargs.iteritems(): if isins...
<commit_before><commit_msg>Add a wrapper to GeoChart<commit_after># Google Chart wrapper for iampl. from IPython.core.display import Javascript def GeoChart(keys, data, **kwargs): table = "{},\n".format(keys) for i in data: table += "['{}', {}],\n".format(i, data[i]) options = "" for arg, valu...
7bbf2f7f9f7c7c49287519207e56932e28061514
nova/tests/virt_unittest.py
nova/tests/virt_unittest.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
Add a few unit tests for libvirt_conn.
Add a few unit tests for libvirt_conn.
Python
apache-2.0
alexandrucoman/vbox-nova-driver,bclau/nova,phenoxim/nova,KarimAllah/nova,Juniper/nova,dawnpower/nova,Triv90/Nova,mikalstill/nova,yosshy/nova,sacharya/nova,ted-gould/nova,Stavitsky/nova,nikesh-mahalka/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,houshengbo/nova_vmware_compute_driver,yatinkumbhare/openstack-nova,eayunstac...
Add a few unit tests for libvirt_conn.
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
<commit_before><commit_msg>Add a few unit tests for libvirt_conn.<commit_after>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
Add a few unit tests for libvirt_conn.# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http...
<commit_before><commit_msg>Add a few unit tests for libvirt_conn.<commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # ...
3359263aae0c30e1386f121f77a38c4d71d63c06
yatsm/vegetation_indices.py
yatsm/vegetation_indices.py
""" Functions for computing vegetation indices """ from __future__ import division def EVI(red, nir, blue): """ Return the Enhanced Vegetation Index for a set of np.ndarrays EVI is calculated as: .. math:: 2.5 * \\frac{(NIR - RED)}{(NIR + C_1 * RED - C_2 * BLUE + L)} where: - :math:...
Create new module for calculation of veg indices; add EVI
Create new module for calculation of veg indices; add EVI
Python
mit
c11/yatsm,valpasq/yatsm,ceholden/yatsm,jmorton/yatsm,jmorton/yatsm,ceholden/yatsm,jmorton/yatsm,c11/yatsm,valpasq/yatsm
Create new module for calculation of veg indices; add EVI
""" Functions for computing vegetation indices """ from __future__ import division def EVI(red, nir, blue): """ Return the Enhanced Vegetation Index for a set of np.ndarrays EVI is calculated as: .. math:: 2.5 * \\frac{(NIR - RED)}{(NIR + C_1 * RED - C_2 * BLUE + L)} where: - :math:...
<commit_before><commit_msg>Create new module for calculation of veg indices; add EVI<commit_after>
""" Functions for computing vegetation indices """ from __future__ import division def EVI(red, nir, blue): """ Return the Enhanced Vegetation Index for a set of np.ndarrays EVI is calculated as: .. math:: 2.5 * \\frac{(NIR - RED)}{(NIR + C_1 * RED - C_2 * BLUE + L)} where: - :math:...
Create new module for calculation of veg indices; add EVI""" Functions for computing vegetation indices """ from __future__ import division def EVI(red, nir, blue): """ Return the Enhanced Vegetation Index for a set of np.ndarrays EVI is calculated as: .. math:: 2.5 * \\frac{(NIR - RED)}{(NIR + ...
<commit_before><commit_msg>Create new module for calculation of veg indices; add EVI<commit_after>""" Functions for computing vegetation indices """ from __future__ import division def EVI(red, nir, blue): """ Return the Enhanced Vegetation Index for a set of np.ndarrays EVI is calculated as: .. math:: ...
3eebd3fc158cfc8a20a6031aca012f87b5aa0ce5
modoboa/admin/migrations/0018_update_disabled_accounts_aliases.py
modoboa/admin/migrations/0018_update_disabled_accounts_aliases.py
# Generated by Django 2.2.17 on 2021-01-28 13:40 from django.db import migrations def update_disabled_accounts_aliases(apps, schema_editor): User = apps.get_model('core', 'User') Alias = apps.get_model('admin', 'Alias') disabled_accounts = User.objects.filter( mailbox__isnull=False, is_active=Fa...
Add migration to disable disabled accounts' aliases
Add migration to disable disabled accounts' aliases
Python
isc
bearstech/modoboa,modoboa/modoboa,bearstech/modoboa,modoboa/modoboa,modoboa/modoboa,modoboa/modoboa,bearstech/modoboa,bearstech/modoboa
Add migration to disable disabled accounts' aliases
# Generated by Django 2.2.17 on 2021-01-28 13:40 from django.db import migrations def update_disabled_accounts_aliases(apps, schema_editor): User = apps.get_model('core', 'User') Alias = apps.get_model('admin', 'Alias') disabled_accounts = User.objects.filter( mailbox__isnull=False, is_active=Fa...
<commit_before><commit_msg>Add migration to disable disabled accounts' aliases<commit_after>
# Generated by Django 2.2.17 on 2021-01-28 13:40 from django.db import migrations def update_disabled_accounts_aliases(apps, schema_editor): User = apps.get_model('core', 'User') Alias = apps.get_model('admin', 'Alias') disabled_accounts = User.objects.filter( mailbox__isnull=False, is_active=Fa...
Add migration to disable disabled accounts' aliases# Generated by Django 2.2.17 on 2021-01-28 13:40 from django.db import migrations def update_disabled_accounts_aliases(apps, schema_editor): User = apps.get_model('core', 'User') Alias = apps.get_model('admin', 'Alias') disabled_accounts = User.objects....
<commit_before><commit_msg>Add migration to disable disabled accounts' aliases<commit_after># Generated by Django 2.2.17 on 2021-01-28 13:40 from django.db import migrations def update_disabled_accounts_aliases(apps, schema_editor): User = apps.get_model('core', 'User') Alias = apps.get_model('admin', 'Alias...
04b7d0ad075fcc35049f3a448bc8aee61804b7a4
check_applied.py
check_applied.py
#!/usr/bin/python import mysql.connector from mysql.connector import errorcode import re import os import string import sys import subprocess import auto_merge def check_if_applied(cnx, cursor, commit): subprocess.check_output(['git', 'reset', '--hard']) update_patch = ("UPDATE patch SET status=%s WHERE btc_co...
Add script to test if patches have been applied
Add script to test if patches have been applied
Python
mit
rnicoll/robodoge
Add script to test if patches have been applied
#!/usr/bin/python import mysql.connector from mysql.connector import errorcode import re import os import string import sys import subprocess import auto_merge def check_if_applied(cnx, cursor, commit): subprocess.check_output(['git', 'reset', '--hard']) update_patch = ("UPDATE patch SET status=%s WHERE btc_co...
<commit_before><commit_msg>Add script to test if patches have been applied<commit_after>
#!/usr/bin/python import mysql.connector from mysql.connector import errorcode import re import os import string import sys import subprocess import auto_merge def check_if_applied(cnx, cursor, commit): subprocess.check_output(['git', 'reset', '--hard']) update_patch = ("UPDATE patch SET status=%s WHERE btc_co...
Add script to test if patches have been applied#!/usr/bin/python import mysql.connector from mysql.connector import errorcode import re import os import string import sys import subprocess import auto_merge def check_if_applied(cnx, cursor, commit): subprocess.check_output(['git', 'reset', '--hard']) update_pa...
<commit_before><commit_msg>Add script to test if patches have been applied<commit_after>#!/usr/bin/python import mysql.connector from mysql.connector import errorcode import re import os import string import sys import subprocess import auto_merge def check_if_applied(cnx, cursor, commit): subprocess.check_output([...
c61b7b9e7bcc3531ca0f7d4a1e5b9dc074855418
src/auspex/instruments/lecroy.py
src/auspex/instruments/lecroy.py
__all__ = ['HDO6104'] from auspex.log import logger from .instrument import SCPIInstrument, StringCommand, FloatCommand, IntCommand, Command import numpy as np import time class HDO6104(SCPIInstrument): channel_enabled = Command(scpi_string="C{channel}:TRA", additional_args=["channel"],value_map={True...
Add Lecroy HDO6104 instrument class
Add Lecroy HDO6104 instrument class
Python
apache-2.0
BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex,BBN-Q/Auspex
Add Lecroy HDO6104 instrument class
__all__ = ['HDO6104'] from auspex.log import logger from .instrument import SCPIInstrument, StringCommand, FloatCommand, IntCommand, Command import numpy as np import time class HDO6104(SCPIInstrument): channel_enabled = Command(scpi_string="C{channel}:TRA", additional_args=["channel"],value_map={True...
<commit_before><commit_msg>Add Lecroy HDO6104 instrument class<commit_after>
__all__ = ['HDO6104'] from auspex.log import logger from .instrument import SCPIInstrument, StringCommand, FloatCommand, IntCommand, Command import numpy as np import time class HDO6104(SCPIInstrument): channel_enabled = Command(scpi_string="C{channel}:TRA", additional_args=["channel"],value_map={True...
Add Lecroy HDO6104 instrument class__all__ = ['HDO6104'] from auspex.log import logger from .instrument import SCPIInstrument, StringCommand, FloatCommand, IntCommand, Command import numpy as np import time class HDO6104(SCPIInstrument): channel_enabled = Command(scpi_string="C{channel}:TRA", addition...
<commit_before><commit_msg>Add Lecroy HDO6104 instrument class<commit_after>__all__ = ['HDO6104'] from auspex.log import logger from .instrument import SCPIInstrument, StringCommand, FloatCommand, IntCommand, Command import numpy as np import time class HDO6104(SCPIInstrument): channel_enabled = Command(scpi_stri...
c856a4e6f0893d66728b48e4e937adac0f7e5e97
hil/migrations/versions/76529f0f9e50_add_uuid_and_status_to_networkingaction.py
hil/migrations/versions/76529f0f9e50_add_uuid_and_status_to_networkingaction.py
"""add uuid and status to NetworkingAction Revision ID: 76529f0f9e50 Revises: 9089fa811a2b Create Date: 2018-01-07 15:24:09.545021 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '76529f0f9e50' down_revision = '9089fa811a2b' branch_labels = None # pylint: dis...
Add a migration script for networking_action to add the new columns
Add a migration script for networking_action to add the new columns If there are entries in the networking action table that we upgrading, that means those are pending actions; so the script sets their status to PENDING. And since when those actions were queued, the users didn't have a uuid to poll on anyway, it just...
Python
apache-2.0
SahilTikale/haas,CCI-MOC/haas
Add a migration script for networking_action to add the new columns If there are entries in the networking action table that we upgrading, that means those are pending actions; so the script sets their status to PENDING. And since when those actions were queued, the users didn't have a uuid to poll on anyway, it just...
"""add uuid and status to NetworkingAction Revision ID: 76529f0f9e50 Revises: 9089fa811a2b Create Date: 2018-01-07 15:24:09.545021 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '76529f0f9e50' down_revision = '9089fa811a2b' branch_labels = None # pylint: dis...
<commit_before><commit_msg>Add a migration script for networking_action to add the new columns If there are entries in the networking action table that we upgrading, that means those are pending actions; so the script sets their status to PENDING. And since when those actions were queued, the users didn't have a uuid...
"""add uuid and status to NetworkingAction Revision ID: 76529f0f9e50 Revises: 9089fa811a2b Create Date: 2018-01-07 15:24:09.545021 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '76529f0f9e50' down_revision = '9089fa811a2b' branch_labels = None # pylint: dis...
Add a migration script for networking_action to add the new columns If there are entries in the networking action table that we upgrading, that means those are pending actions; so the script sets their status to PENDING. And since when those actions were queued, the users didn't have a uuid to poll on anyway, it just...
<commit_before><commit_msg>Add a migration script for networking_action to add the new columns If there are entries in the networking action table that we upgrading, that means those are pending actions; so the script sets their status to PENDING. And since when those actions were queued, the users didn't have a uuid...
bc367b856af42cbc30bb32d710ed115ede59ef3d
py/valid-parenthesis-string.py
py/valid-parenthesis-string.py
class Solution(object): def checkValidString(self, s): """ :type s: str :rtype: bool """ lowest, highest = 0, 0 for c in s: if c == '(': lowest += 1 highest += 1 elif c == ')': if lowest > 0: ...
Add py solution for 678. Valid Parenthesis String
Add py solution for 678. Valid Parenthesis String 678. Valid Parenthesis String: https://leetcode.com/problems/valid-parenthesis-string/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 678. Valid Parenthesis String 678. Valid Parenthesis String: https://leetcode.com/problems/valid-parenthesis-string/
class Solution(object): def checkValidString(self, s): """ :type s: str :rtype: bool """ lowest, highest = 0, 0 for c in s: if c == '(': lowest += 1 highest += 1 elif c == ')': if lowest > 0: ...
<commit_before><commit_msg>Add py solution for 678. Valid Parenthesis String 678. Valid Parenthesis String: https://leetcode.com/problems/valid-parenthesis-string/<commit_after>
class Solution(object): def checkValidString(self, s): """ :type s: str :rtype: bool """ lowest, highest = 0, 0 for c in s: if c == '(': lowest += 1 highest += 1 elif c == ')': if lowest > 0: ...
Add py solution for 678. Valid Parenthesis String 678. Valid Parenthesis String: https://leetcode.com/problems/valid-parenthesis-string/class Solution(object): def checkValidString(self, s): """ :type s: str :rtype: bool """ lowest, highest = 0, 0 for c in s: ...
<commit_before><commit_msg>Add py solution for 678. Valid Parenthesis String 678. Valid Parenthesis String: https://leetcode.com/problems/valid-parenthesis-string/<commit_after>class Solution(object): def checkValidString(self, s): """ :type s: str :rtype: bool """ lowest, ...
6b25d372d3f20cae5f1095f508cc0c4ba71de972
py/max-area-of-island.py
py/max-area-of-island.py
def link(info, size, r1, r2): if size[r1] > size[r2]: info[r2] = r1 size[r1] += size[r2] return size[r1] else: info[r1] = r2 size[r2] += size[r1] return size[r2] def find_root(info, p1): if p1 != info[p1]: info[p1] = find_root(info, info[p1]) retu...
Add py solution for 695. Max Area of Island
Add py solution for 695. Max Area of Island 695. Max Area of Island: https://leetcode.com/problems/max-area-of-island/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 695. Max Area of Island 695. Max Area of Island: https://leetcode.com/problems/max-area-of-island/
def link(info, size, r1, r2): if size[r1] > size[r2]: info[r2] = r1 size[r1] += size[r2] return size[r1] else: info[r1] = r2 size[r2] += size[r1] return size[r2] def find_root(info, p1): if p1 != info[p1]: info[p1] = find_root(info, info[p1]) retu...
<commit_before><commit_msg>Add py solution for 695. Max Area of Island 695. Max Area of Island: https://leetcode.com/problems/max-area-of-island/<commit_after>
def link(info, size, r1, r2): if size[r1] > size[r2]: info[r2] = r1 size[r1] += size[r2] return size[r1] else: info[r1] = r2 size[r2] += size[r1] return size[r2] def find_root(info, p1): if p1 != info[p1]: info[p1] = find_root(info, info[p1]) retu...
Add py solution for 695. Max Area of Island 695. Max Area of Island: https://leetcode.com/problems/max-area-of-island/def link(info, size, r1, r2): if size[r1] > size[r2]: info[r2] = r1 size[r1] += size[r2] return size[r1] else: info[r1] = r2 size[r2] += size[r1] ...
<commit_before><commit_msg>Add py solution for 695. Max Area of Island 695. Max Area of Island: https://leetcode.com/problems/max-area-of-island/<commit_after>def link(info, size, r1, r2): if size[r1] > size[r2]: info[r2] = r1 size[r1] += size[r2] return size[r1] else: info[r1] ...
61d7a137feb873460f4158283034b4d8ae322e3c
contrib/update_db.py
contrib/update_db.py
#!/usr/bin/env python # coding=utf8 """update_db.py - A basic migration script for 3.x/4.x databases to 5.0. Usage: ./update_db.py /path/to/config Note that it takes the config, rather than the db. Currently, this only supports text fields, since that's all the stock modules used. It migrates in place, leaving old ta...
Add a script to handle 5.0 db migrations
Add a script to handle 5.0 db migrations
Python
mit
Uname-a/knife_scraper,Uname-a/knife_scraper,Uname-a/knife_scraper
Add a script to handle 5.0 db migrations
#!/usr/bin/env python # coding=utf8 """update_db.py - A basic migration script for 3.x/4.x databases to 5.0. Usage: ./update_db.py /path/to/config Note that it takes the config, rather than the db. Currently, this only supports text fields, since that's all the stock modules used. It migrates in place, leaving old ta...
<commit_before><commit_msg>Add a script to handle 5.0 db migrations<commit_after>
#!/usr/bin/env python # coding=utf8 """update_db.py - A basic migration script for 3.x/4.x databases to 5.0. Usage: ./update_db.py /path/to/config Note that it takes the config, rather than the db. Currently, this only supports text fields, since that's all the stock modules used. It migrates in place, leaving old ta...
Add a script to handle 5.0 db migrations#!/usr/bin/env python # coding=utf8 """update_db.py - A basic migration script for 3.x/4.x databases to 5.0. Usage: ./update_db.py /path/to/config Note that it takes the config, rather than the db. Currently, this only supports text fields, since that's all the stock modules us...
<commit_before><commit_msg>Add a script to handle 5.0 db migrations<commit_after>#!/usr/bin/env python # coding=utf8 """update_db.py - A basic migration script for 3.x/4.x databases to 5.0. Usage: ./update_db.py /path/to/config Note that it takes the config, rather than the db. Currently, this only supports text fiel...
fe726fc182c9422856f2607842052df71e26acee
colour/examples/difference/examples_delta_e_luo2006.py
colour/examples/difference/examples_delta_e_luo2006.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Showcases *Delta E* colour difference computation objects based on *Luo et al. (2006)* *CAM02-LCD*, *CAM02-SCD*, and *CAM02-UCS* colourspaces. """ import colour from colour.utilities.verbose import message_box message_box('"Delta E - Luo et al. (2006)" Computations')...
Add “Luo et al. (2006)” colour difference examples.
Add “Luo et al. (2006)” colour difference examples.
Python
bsd-3-clause
colour-science/colour
Add “Luo et al. (2006)” colour difference examples.
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Showcases *Delta E* colour difference computation objects based on *Luo et al. (2006)* *CAM02-LCD*, *CAM02-SCD*, and *CAM02-UCS* colourspaces. """ import colour from colour.utilities.verbose import message_box message_box('"Delta E - Luo et al. (2006)" Computations')...
<commit_before><commit_msg>Add “Luo et al. (2006)” colour difference examples.<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Showcases *Delta E* colour difference computation objects based on *Luo et al. (2006)* *CAM02-LCD*, *CAM02-SCD*, and *CAM02-UCS* colourspaces. """ import colour from colour.utilities.verbose import message_box message_box('"Delta E - Luo et al. (2006)" Computations')...
Add “Luo et al. (2006)” colour difference examples.#!/usr/bin/env python # -*- coding: utf-8 -*- """ Showcases *Delta E* colour difference computation objects based on *Luo et al. (2006)* *CAM02-LCD*, *CAM02-SCD*, and *CAM02-UCS* colourspaces. """ import colour from colour.utilities.verbose import message_box messag...
<commit_before><commit_msg>Add “Luo et al. (2006)” colour difference examples.<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Showcases *Delta E* colour difference computation objects based on *Luo et al. (2006)* *CAM02-LCD*, *CAM02-SCD*, and *CAM02-UCS* colourspaces. """ import colour from colour.uti...
032d4e0d96f74f4b282c1407709b80957f9ee760
plugins/modules/dedicated_server_info.py
plugins/modules/dedicated_server_info.py
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from ansible.module_utils.basic import AnsibleModule __metaclass__ = type DOCUMENTATION = ''' --- module: dedicated_server_info short_description: Retrieve all info for a OVH dedicated server description: ...
Add module to fetch server infos.
Add module to fetch server infos.
Python
mit
synthesio/infra-ovh-ansible-module
Add module to fetch server infos.
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from ansible.module_utils.basic import AnsibleModule __metaclass__ = type DOCUMENTATION = ''' --- module: dedicated_server_info short_description: Retrieve all info for a OVH dedicated server description: ...
<commit_before><commit_msg>Add module to fetch server infos.<commit_after>
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from ansible.module_utils.basic import AnsibleModule __metaclass__ = type DOCUMENTATION = ''' --- module: dedicated_server_info short_description: Retrieve all info for a OVH dedicated server description: ...
Add module to fetch server infos.#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from ansible.module_utils.basic import AnsibleModule __metaclass__ = type DOCUMENTATION = ''' --- module: dedicated_server_info short_description: Retrieve all info for a OVH...
<commit_before><commit_msg>Add module to fetch server infos.<commit_after>#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from ansible.module_utils.basic import AnsibleModule __metaclass__ = type DOCUMENTATION = ''' --- module: dedicated_server_info short...
809518f5915dece739d02b84146e0b9dacbabc99
elections/uk/migrations/0005_add_favourite_biscuits.py
elections/uk/migrations/0005_add_favourite_biscuits.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): def create_simple_fields(apps, schema_editor): ExtraField = apps.get_model('candidates', 'ExtraField') db_alias = schema_editor.connection.alias ...
Add Favourite Biscuit as a field for candidates
Add Favourite Biscuit as a field for candidates
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
Add Favourite Biscuit as a field for candidates
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): def create_simple_fields(apps, schema_editor): ExtraField = apps.get_model('candidates', 'ExtraField') db_alias = schema_editor.connection.alias ...
<commit_before><commit_msg>Add Favourite Biscuit as a field for candidates<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): def create_simple_fields(apps, schema_editor): ExtraField = apps.get_model('candidates', 'ExtraField') db_alias = schema_editor.connection.alias ...
Add Favourite Biscuit as a field for candidates# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): def create_simple_fields(apps, schema_editor): ExtraField = apps.get_model('candidates', 'ExtraField') db_...
<commit_before><commit_msg>Add Favourite Biscuit as a field for candidates<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): def create_simple_fields(apps, schema_editor): ExtraField = apps.get_mode...
26953686515270497cf2361f4a20039603f2f1bd
InvenTree/company/migrations/0018_supplierpart_manufacturer.py
InvenTree/company/migrations/0018_supplierpart_manufacturer.py
# Generated by Django 2.2.10 on 2020-04-13 03:29 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('company', '0017_auto_20200413_0320'), ] operations = [ migrations.AddField( model_name='suppli...
Add migration to create a 'manufacturer' field to the SupplierPart model
Add migration to create a 'manufacturer' field to the SupplierPart model (cherry picked from commit 890e938662ed4aff53ea9399b54a86359d23f23f)
Python
mit
inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree
Add migration to create a 'manufacturer' field to the SupplierPart model (cherry picked from commit 890e938662ed4aff53ea9399b54a86359d23f23f)
# Generated by Django 2.2.10 on 2020-04-13 03:29 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('company', '0017_auto_20200413_0320'), ] operations = [ migrations.AddField( model_name='suppli...
<commit_before><commit_msg>Add migration to create a 'manufacturer' field to the SupplierPart model (cherry picked from commit 890e938662ed4aff53ea9399b54a86359d23f23f)<commit_after>
# Generated by Django 2.2.10 on 2020-04-13 03:29 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('company', '0017_auto_20200413_0320'), ] operations = [ migrations.AddField( model_name='suppli...
Add migration to create a 'manufacturer' field to the SupplierPart model (cherry picked from commit 890e938662ed4aff53ea9399b54a86359d23f23f)# Generated by Django 2.2.10 on 2020-04-13 03:29 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependen...
<commit_before><commit_msg>Add migration to create a 'manufacturer' field to the SupplierPart model (cherry picked from commit 890e938662ed4aff53ea9399b54a86359d23f23f)<commit_after># Generated by Django 2.2.10 on 2020-04-13 03:29 from django.db import migrations, models import django.db.models.deletion class Migra...
9deb9f894ec813d13ec0de3a6137a0eb73f4238b
python/challenges/30daysofcode/day-00.py
python/challenges/30daysofcode/day-00.py
# Read a full line of input from stdin and save it to our dynamically typed variable, input_string. input_string = input() # Print a string literal saying "Hello, World." to stdout. print('Hello, World.') # TODO: Write a line of code here that prints the contents of input_string to stdout. print(input_string)
Add 30 Days of Code Day 0 in Python.
Add 30 Days of Code Day 0 in Python.
Python
mit
KoderDojo/hackerrank,KoderDojo/hackerrank
Add 30 Days of Code Day 0 in Python.
# Read a full line of input from stdin and save it to our dynamically typed variable, input_string. input_string = input() # Print a string literal saying "Hello, World." to stdout. print('Hello, World.') # TODO: Write a line of code here that prints the contents of input_string to stdout. print(input_string)
<commit_before><commit_msg>Add 30 Days of Code Day 0 in Python.<commit_after>
# Read a full line of input from stdin and save it to our dynamically typed variable, input_string. input_string = input() # Print a string literal saying "Hello, World." to stdout. print('Hello, World.') # TODO: Write a line of code here that prints the contents of input_string to stdout. print(input_string)
Add 30 Days of Code Day 0 in Python.# Read a full line of input from stdin and save it to our dynamically typed variable, input_string. input_string = input() # Print a string literal saying "Hello, World." to stdout. print('Hello, World.') # TODO: Write a line of code here that prints the contents of input_string to...
<commit_before><commit_msg>Add 30 Days of Code Day 0 in Python.<commit_after># Read a full line of input from stdin and save it to our dynamically typed variable, input_string. input_string = input() # Print a string literal saying "Hello, World." to stdout. print('Hello, World.') # TODO: Write a line of code here th...
be3259a085e8df17baaad4bcbb1704b0239a3b3b
falmer/content/migrations/0041_auto_20180912_1149.py
falmer/content/migrations/0041_auto_20180912_1149.py
# Generated by Django 2.0.8 on 2018-09-12 10:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ('wagtailredirects', '0006_redirect_increase_max_length'), ('wagtailmenus', '0022_auto_20170913_2125'...
Remove old Staff page types
Remove old Staff page types
Python
mit
sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer
Remove old Staff page types
# Generated by Django 2.0.8 on 2018-09-12 10:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ('wagtailredirects', '0006_redirect_increase_max_length'), ('wagtailmenus', '0022_auto_20170913_2125'...
<commit_before><commit_msg>Remove old Staff page types<commit_after>
# Generated by Django 2.0.8 on 2018-09-12 10:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ('wagtailredirects', '0006_redirect_increase_max_length'), ('wagtailmenus', '0022_auto_20170913_2125'...
Remove old Staff page types# Generated by Django 2.0.8 on 2018-09-12 10:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ('wagtailredirects', '0006_redirect_increase_max_length'), ('wagtailmenus'...
<commit_before><commit_msg>Remove old Staff page types<commit_after># Generated by Django 2.0.8 on 2018-09-12 10:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ('wagtailredirects', '0006_redirect_incre...
aeefc9be0ca7405f06ca32e02445f764daa33a84
exa/__main__.py
exa/__main__.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2016, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 ''' Executables ######################## Exa provides two executables; "exa" and "exw". For the graphical user interface, built on top of the Jupyter n...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2016, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 ''' Executables ######################## Exa provides two executables; "exa" and "exw". For the graphical user interface, built on top of the Jupyter n...
Put config back in thing
Put config back in thing
Python
apache-2.0
avmarchenko/exa,alexvmarch/exa,exa-analytics/exa,tjduigna/exa,alexvmarch/exa,alexvmarch/exa,exa-analytics/exa
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2016, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 ''' Executables ######################## Exa provides two executables; "exa" and "exw". For the graphical user interface, built on top of the Jupyter n...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2016, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 ''' Executables ######################## Exa provides two executables; "exa" and "exw". For the graphical user interface, built on top of the Jupyter n...
<commit_before>#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2016, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 ''' Executables ######################## Exa provides two executables; "exa" and "exw". For the graphical user interface, built on top o...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2016, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 ''' Executables ######################## Exa provides two executables; "exa" and "exw". For the graphical user interface, built on top of the Jupyter n...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2016, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 ''' Executables ######################## Exa provides two executables; "exa" and "exw". For the graphical user interface, built on top of the Jupyter n...
<commit_before>#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2016, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 ''' Executables ######################## Exa provides two executables; "exa" and "exw". For the graphical user interface, built on top o...
3d0f0a1a0664ee8329bacb5732bd36cf198c0f90
loafer/route.py
loafer/route.py
# -*- coding: utf-8 -*- import asyncio from functools import partial import importlib import logging import boto3 from cached_property import cached_property logger = logging.getLogger(__name__) class Route(object): def __init__(self, queue, handler, loop=None): self._loop = loop or asyncio.get_event...
Add initial Route implementation: responsible to link the queue and the job executor
Add initial Route implementation: responsible to link the queue and the job executor
Python
mit
georgeyk/loafer
Add initial Route implementation: responsible to link the queue and the job executor
# -*- coding: utf-8 -*- import asyncio from functools import partial import importlib import logging import boto3 from cached_property import cached_property logger = logging.getLogger(__name__) class Route(object): def __init__(self, queue, handler, loop=None): self._loop = loop or asyncio.get_event...
<commit_before><commit_msg>Add initial Route implementation: responsible to link the queue and the job executor<commit_after>
# -*- coding: utf-8 -*- import asyncio from functools import partial import importlib import logging import boto3 from cached_property import cached_property logger = logging.getLogger(__name__) class Route(object): def __init__(self, queue, handler, loop=None): self._loop = loop or asyncio.get_event...
Add initial Route implementation: responsible to link the queue and the job executor# -*- coding: utf-8 -*- import asyncio from functools import partial import importlib import logging import boto3 from cached_property import cached_property logger = logging.getLogger(__name__) class Route(object): def __ini...
<commit_before><commit_msg>Add initial Route implementation: responsible to link the queue and the job executor<commit_after># -*- coding: utf-8 -*- import asyncio from functools import partial import importlib import logging import boto3 from cached_property import cached_property logger = logging.getLogger(__nam...
2b01c4145dbd934a8abe2d3cb07e1f5e40d87e24
examples/lvm.py
examples/lvm.py
import logging import sys import os from common import set_up_logging from common import create_sparse_file from common import tear_down_disk_images from common import print_devices # doing this before importing blivet gets the logging from format class # registrations and other stuff triggered by the import set_up_l...
Add an example of creating lvs using growable requests.
Add an example of creating lvs using growable requests.
Python
lgpl-2.1
jkonecny12/blivet,vojtechtrefny/blivet,dwlehman/blivet,AdamWill/blivet,rhinstaller/blivet,vpodzime/blivet,vpodzime/blivet,rvykydal/blivet,dwlehman/blivet,rvykydal/blivet,jkonecny12/blivet,AdamWill/blivet,rhinstaller/blivet,vojtechtrefny/blivet
Add an example of creating lvs using growable requests.
import logging import sys import os from common import set_up_logging from common import create_sparse_file from common import tear_down_disk_images from common import print_devices # doing this before importing blivet gets the logging from format class # registrations and other stuff triggered by the import set_up_l...
<commit_before><commit_msg>Add an example of creating lvs using growable requests.<commit_after>
import logging import sys import os from common import set_up_logging from common import create_sparse_file from common import tear_down_disk_images from common import print_devices # doing this before importing blivet gets the logging from format class # registrations and other stuff triggered by the import set_up_l...
Add an example of creating lvs using growable requests.import logging import sys import os from common import set_up_logging from common import create_sparse_file from common import tear_down_disk_images from common import print_devices # doing this before importing blivet gets the logging from format class # registr...
<commit_before><commit_msg>Add an example of creating lvs using growable requests.<commit_after>import logging import sys import os from common import set_up_logging from common import create_sparse_file from common import tear_down_disk_images from common import print_devices # doing this before importing blivet get...
fadb99ce3a93b2e4be7a654277c921fb5ed562ad
replace-jars.py
replace-jars.py
#!/usr/bin/env python import os import re import shutil import sys """ Automate updating multiple HDP jars for debugging/hotfix purposes. Agnostic to the target directory layout which can differ across HDP versions. """ if (len(sys.argv) != 4): print("Usage: replace-jars.pl <source-dir> <source-version> <dst-versi...
Add script to automate replacing HDP jars.
Add script to automate replacing HDP jars.
Python
apache-2.0
arp7/HadoopTools,arp7/HadoopTools,arp7/HadoopTools
Add script to automate replacing HDP jars.
#!/usr/bin/env python import os import re import shutil import sys """ Automate updating multiple HDP jars for debugging/hotfix purposes. Agnostic to the target directory layout which can differ across HDP versions. """ if (len(sys.argv) != 4): print("Usage: replace-jars.pl <source-dir> <source-version> <dst-versi...
<commit_before><commit_msg>Add script to automate replacing HDP jars.<commit_after>
#!/usr/bin/env python import os import re import shutil import sys """ Automate updating multiple HDP jars for debugging/hotfix purposes. Agnostic to the target directory layout which can differ across HDP versions. """ if (len(sys.argv) != 4): print("Usage: replace-jars.pl <source-dir> <source-version> <dst-versi...
Add script to automate replacing HDP jars.#!/usr/bin/env python import os import re import shutil import sys """ Automate updating multiple HDP jars for debugging/hotfix purposes. Agnostic to the target directory layout which can differ across HDP versions. """ if (len(sys.argv) != 4): print("Usage: replace-jars.p...
<commit_before><commit_msg>Add script to automate replacing HDP jars.<commit_after>#!/usr/bin/env python import os import re import shutil import sys """ Automate updating multiple HDP jars for debugging/hotfix purposes. Agnostic to the target directory layout which can differ across HDP versions. """ if (len(sys.ar...
1de28842f7c8dd7c7553b06ed618152c7d144ba0
keras_fcn/callbacks.py
keras_fcn/callbacks.py
import numpy as np import tensorflow as tf import keras.backend as K from keras.callbacks import Callback class CheckNumericsOps(Callback): """Callback that terminates training when a NaN loss is encountered.""" def __init__(self, validation_data, batch_size=1, histogram_freq=1): super(CheckNumericsO...
Add NaN output detection callback
Add NaN output detection callback
Python
mit
JihongJu/keras-fcn
Add NaN output detection callback
import numpy as np import tensorflow as tf import keras.backend as K from keras.callbacks import Callback class CheckNumericsOps(Callback): """Callback that terminates training when a NaN loss is encountered.""" def __init__(self, validation_data, batch_size=1, histogram_freq=1): super(CheckNumericsO...
<commit_before><commit_msg>Add NaN output detection callback<commit_after>
import numpy as np import tensorflow as tf import keras.backend as K from keras.callbacks import Callback class CheckNumericsOps(Callback): """Callback that terminates training when a NaN loss is encountered.""" def __init__(self, validation_data, batch_size=1, histogram_freq=1): super(CheckNumericsO...
Add NaN output detection callbackimport numpy as np import tensorflow as tf import keras.backend as K from keras.callbacks import Callback class CheckNumericsOps(Callback): """Callback that terminates training when a NaN loss is encountered.""" def __init__(self, validation_data, batch_size=1, histogram_freq...
<commit_before><commit_msg>Add NaN output detection callback<commit_after>import numpy as np import tensorflow as tf import keras.backend as K from keras.callbacks import Callback class CheckNumericsOps(Callback): """Callback that terminates training when a NaN loss is encountered.""" def __init__(self, vali...
5c606b2a5628ead8724344252913668c82db9c22
orlo/migrations/0868747e62ff_add_unique_constraints.py
orlo/migrations/0868747e62ff_add_unique_constraints.py
"""Add unique constraints Revision ID: 0868747e62ff Revises: e60a77e44da8 Create Date: 2017-04-11 16:10:42.109777 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0868747e62ff' down_revision = 'e60a77e44da8' branch_labels = () depends_on = None def upgrade(): ...
Add alembic migration: "add unique constraints"
Add alembic migration: "add unique constraints"
Python
mit
al4/sponge,eBayClassifiedsGroup/sponge,al4/orlo,al4/orlo,eBayClassifiedsGroup/sponge,al4/sponge,eBayClassifiedsGroup/sponge,al4/sponge,eBayClassifiedsGroup/orlo,eBayClassifiedsGroup/orlo
Add alembic migration: "add unique constraints"
"""Add unique constraints Revision ID: 0868747e62ff Revises: e60a77e44da8 Create Date: 2017-04-11 16:10:42.109777 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0868747e62ff' down_revision = 'e60a77e44da8' branch_labels = () depends_on = None def upgrade(): ...
<commit_before><commit_msg>Add alembic migration: "add unique constraints"<commit_after>
"""Add unique constraints Revision ID: 0868747e62ff Revises: e60a77e44da8 Create Date: 2017-04-11 16:10:42.109777 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0868747e62ff' down_revision = 'e60a77e44da8' branch_labels = () depends_on = None def upgrade(): ...
Add alembic migration: "add unique constraints""""Add unique constraints Revision ID: 0868747e62ff Revises: e60a77e44da8 Create Date: 2017-04-11 16:10:42.109777 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0868747e62ff' down_revision = 'e60a77e44da8' branch...
<commit_before><commit_msg>Add alembic migration: "add unique constraints"<commit_after>"""Add unique constraints Revision ID: 0868747e62ff Revises: e60a77e44da8 Create Date: 2017-04-11 16:10:42.109777 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0868747e62...
93998f2165daa1fd85b855f4ebfd258acea6cf9a
test/io/test_count_table_npz.py
test/io/test_count_table_npz.py
# vim: fdm=indent ''' author: Fabio Zanini date: 31/01/19 content: Test I/O of sparse counts table via npz files. ''' import os def test_parse__save_npz(): print('Parsing example NPZ count table') from singlet.io import parse_counts_table_sparse table = parse_counts_table_sparse({'countsname'...
Cover tests for npz i/o
Cover tests for npz i/o
Python
mit
iosonofabio/singlet,iosonofabio/singlet
Cover tests for npz i/o
# vim: fdm=indent ''' author: Fabio Zanini date: 31/01/19 content: Test I/O of sparse counts table via npz files. ''' import os def test_parse__save_npz(): print('Parsing example NPZ count table') from singlet.io import parse_counts_table_sparse table = parse_counts_table_sparse({'countsname'...
<commit_before><commit_msg>Cover tests for npz i/o<commit_after>
# vim: fdm=indent ''' author: Fabio Zanini date: 31/01/19 content: Test I/O of sparse counts table via npz files. ''' import os def test_parse__save_npz(): print('Parsing example NPZ count table') from singlet.io import parse_counts_table_sparse table = parse_counts_table_sparse({'countsname'...
Cover tests for npz i/o# vim: fdm=indent ''' author: Fabio Zanini date: 31/01/19 content: Test I/O of sparse counts table via npz files. ''' import os def test_parse__save_npz(): print('Parsing example NPZ count table') from singlet.io import parse_counts_table_sparse table = parse_counts_tab...
<commit_before><commit_msg>Cover tests for npz i/o<commit_after># vim: fdm=indent ''' author: Fabio Zanini date: 31/01/19 content: Test I/O of sparse counts table via npz files. ''' import os def test_parse__save_npz(): print('Parsing example NPZ count table') from singlet.io import parse_counts_...