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
13a11e7ac45b1b5d886489bf3a2c3a3bdb608131
accelerator/migrations/0106_migrate_startup_top_nav.py
accelerator/migrations/0106_migrate_startup_top_nav.py
# Generated by Django 2.2.10 on 2021-11-24 16:41 import swapper from django.db import migrations def add_startup_profile_top_nav(apps, schema_editor): NavTreeItem = apps.get_model('accelerator', 'NavTreeItem') NavTree = swapper.load_model('accelerator', 'NavTree') nav_items = [ {"title": 'My Start...
Merge remote-tracking branch 'origin' into AC-9512
[AC-9512] Merge remote-tracking branch 'origin' into AC-9512
Python
mit
masschallenge/django-accelerator,masschallenge/django-accelerator
[AC-9512] Merge remote-tracking branch 'origin' into AC-9512
# Generated by Django 2.2.10 on 2021-11-24 16:41 import swapper from django.db import migrations def add_startup_profile_top_nav(apps, schema_editor): NavTreeItem = apps.get_model('accelerator', 'NavTreeItem') NavTree = swapper.load_model('accelerator', 'NavTree') nav_items = [ {"title": 'My Start...
<commit_before><commit_msg>[AC-9512] Merge remote-tracking branch 'origin' into AC-9512<commit_after>
# Generated by Django 2.2.10 on 2021-11-24 16:41 import swapper from django.db import migrations def add_startup_profile_top_nav(apps, schema_editor): NavTreeItem = apps.get_model('accelerator', 'NavTreeItem') NavTree = swapper.load_model('accelerator', 'NavTree') nav_items = [ {"title": 'My Start...
[AC-9512] Merge remote-tracking branch 'origin' into AC-9512# Generated by Django 2.2.10 on 2021-11-24 16:41 import swapper from django.db import migrations def add_startup_profile_top_nav(apps, schema_editor): NavTreeItem = apps.get_model('accelerator', 'NavTreeItem') NavTree = swapper.load_model('accelerato...
<commit_before><commit_msg>[AC-9512] Merge remote-tracking branch 'origin' into AC-9512<commit_after># Generated by Django 2.2.10 on 2021-11-24 16:41 import swapper from django.db import migrations def add_startup_profile_top_nav(apps, schema_editor): NavTreeItem = apps.get_model('accelerator', 'NavTreeItem') ...
417b3caf2a64a68e0da56b3caa9213c2c64087c3
grammpy/Terminal.py
grammpy/Terminal.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ class Terminal: def __init__(self, symbol, grammar): self.__symbol = symbol self.__grammar = grammar def __hash__(self): return hash((self.__symbol, id(self.__grammar))) ...
Add class represents terminal symbol
Add class represents terminal symbol
Python
mit
PatrikValkovic/grammpy
Add class represents terminal symbol
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ class Terminal: def __init__(self, symbol, grammar): self.__symbol = symbol self.__grammar = grammar def __hash__(self): return hash((self.__symbol, id(self.__grammar))) ...
<commit_before><commit_msg>Add class represents terminal symbol<commit_after>
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ class Terminal: def __init__(self, symbol, grammar): self.__symbol = symbol self.__grammar = grammar def __hash__(self): return hash((self.__symbol, id(self.__grammar))) ...
Add class represents terminal symbol#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ class Terminal: def __init__(self, symbol, grammar): self.__symbol = symbol self.__grammar = grammar def __hash__(self): return hash((sel...
<commit_before><commit_msg>Add class represents terminal symbol<commit_after>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ class Terminal: def __init__(self, symbol, grammar): self.__symbol = symbol self.__grammar = grammar def...
2dc5b6f3790dba5528886f43bfa4240b9cc5c081
fuel_test/helpers.py
fuel_test/helpers.py
import logging def execute(remote, command): logging.debug("Executing command: '%s'" % command.rstrip()) chan = remote._ssh.get_transport().open_session() stdin = chan.makefile('wb') stdout = chan.makefile('rb') stderr = chan.makefile_stderr('rb') cmd = "%s\n" % command if remote.sudo_mode:...
Read stdout immediately adn stderr too
Read stdout immediately adn stderr too
Python
apache-2.0
xarses/fuel-library,slystopad/fuel-lib,ddepaoli3/fuel-library-dev,ddepaoli3/fuel-library-dev,eayunstack/fuel-library,zhaochao/fuel-library,Metaswitch/fuel-library,SmartInfrastructures/fuel-library-dev,ddepaoli3/fuel-library-dev,eayunstack/fuel-library,zhaochao/fuel-library,stackforge/fuel-library,slystopad/fuel-lib,eay...
Read stdout immediately adn stderr too
import logging def execute(remote, command): logging.debug("Executing command: '%s'" % command.rstrip()) chan = remote._ssh.get_transport().open_session() stdin = chan.makefile('wb') stdout = chan.makefile('rb') stderr = chan.makefile_stderr('rb') cmd = "%s\n" % command if remote.sudo_mode:...
<commit_before><commit_msg>Read stdout immediately adn stderr too<commit_after>
import logging def execute(remote, command): logging.debug("Executing command: '%s'" % command.rstrip()) chan = remote._ssh.get_transport().open_session() stdin = chan.makefile('wb') stdout = chan.makefile('rb') stderr = chan.makefile_stderr('rb') cmd = "%s\n" % command if remote.sudo_mode:...
Read stdout immediately adn stderr tooimport logging def execute(remote, command): logging.debug("Executing command: '%s'" % command.rstrip()) chan = remote._ssh.get_transport().open_session() stdin = chan.makefile('wb') stdout = chan.makefile('rb') stderr = chan.makefile_stderr('rb') cmd = "%s...
<commit_before><commit_msg>Read stdout immediately adn stderr too<commit_after>import logging def execute(remote, command): logging.debug("Executing command: '%s'" % command.rstrip()) chan = remote._ssh.get_transport().open_session() stdin = chan.makefile('wb') stdout = chan.makefile('rb') stderr =...
a1ae220c9fb6236bda7e16c09048f20482562cd0
migrations/versions/0350_update_rates.py
migrations/versions/0350_update_rates.py
""" Revision ID: 0350_update_rates Revises: 0349_add_ft_processing_time Create Date: 2021-04-01 08:00:24.775338 """ import uuid from alembic import op revision = '0350_update_rates' down_revision = '0349_add_ft_processing_time' def upgrade(): op.get_bind() op.execute("INSERT INTO rates(id, valid_from, rat...
Add new SMS rate for April 1 2021.
Add new SMS rate for April 1 2021. Downgrade script isn't necessary.
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Add new SMS rate for April 1 2021. Downgrade script isn't necessary.
""" Revision ID: 0350_update_rates Revises: 0349_add_ft_processing_time Create Date: 2021-04-01 08:00:24.775338 """ import uuid from alembic import op revision = '0350_update_rates' down_revision = '0349_add_ft_processing_time' def upgrade(): op.get_bind() op.execute("INSERT INTO rates(id, valid_from, rat...
<commit_before><commit_msg>Add new SMS rate for April 1 2021. Downgrade script isn't necessary.<commit_after>
""" Revision ID: 0350_update_rates Revises: 0349_add_ft_processing_time Create Date: 2021-04-01 08:00:24.775338 """ import uuid from alembic import op revision = '0350_update_rates' down_revision = '0349_add_ft_processing_time' def upgrade(): op.get_bind() op.execute("INSERT INTO rates(id, valid_from, rat...
Add new SMS rate for April 1 2021. Downgrade script isn't necessary.""" Revision ID: 0350_update_rates Revises: 0349_add_ft_processing_time Create Date: 2021-04-01 08:00:24.775338 """ import uuid from alembic import op revision = '0350_update_rates' down_revision = '0349_add_ft_processing_time' def upgrade(): ...
<commit_before><commit_msg>Add new SMS rate for April 1 2021. Downgrade script isn't necessary.<commit_after>""" Revision ID: 0350_update_rates Revises: 0349_add_ft_processing_time Create Date: 2021-04-01 08:00:24.775338 """ import uuid from alembic import op revision = '0350_update_rates' down_revision = '0349_ad...
ceda2f092233393fba2cba8b414520ed10e82a7a
neblinaCore.py
neblinaCore.py
#!/usr/bin/env python ################################################################################### # # Copyright (c) 2010-2016 Motsai # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softwa...
Create NeblinaCore to handle sending and receiving packet.
Create NeblinaCore to handle sending and receiving packet.
Python
mit
Motsai/neblina-python,Motsai/neblina-python
Create NeblinaCore to handle sending and receiving packet.
#!/usr/bin/env python ################################################################################### # # Copyright (c) 2010-2016 Motsai # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softwa...
<commit_before><commit_msg>Create NeblinaCore to handle sending and receiving packet.<commit_after>
#!/usr/bin/env python ################################################################################### # # Copyright (c) 2010-2016 Motsai # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softwa...
Create NeblinaCore to handle sending and receiving packet.#!/usr/bin/env python ################################################################################### # # Copyright (c) 2010-2016 Motsai # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of thi...
<commit_before><commit_msg>Create NeblinaCore to handle sending and receiving packet.<commit_after>#!/usr/bin/env python ################################################################################### # # Copyright (c) 2010-2016 Motsai # # The MIT License (MIT) # # Permission is hereby granted, free of charge...
88de95b8582abd7ff2f736212411129d9ad941f0
tools/privacyidea-export-privacyidea-counter.py
tools/privacyidea-export-privacyidea-counter.py
#!/usr/bin/python # -*- coding: utf-8 -*- # # 2018-05-27 Cornelius Kölbel <cornelius.koelbel@netknights.it> # init __doc__ = """ This script exports counter from privacyIDEA to a csv file. It exports serial, counter """ import argparse import sys from sqlalchemy import create_engine from sqlalchemy...
Add a script that exports OTP counters from privacyIDEA
Add a script that exports OTP counters from privacyIDEA Just for sake of completeness I add this script that helped in different migration scenarios. It exports only the counter values from all tokens in the database. (relevant for HOTP and TOTP)
Python
agpl-3.0
privacyidea/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea,privacyidea/privacyidea
Add a script that exports OTP counters from privacyIDEA Just for sake of completeness I add this script that helped in different migration scenarios. It exports only the counter values from all tokens in the database. (relevant for HOTP and TOTP)
#!/usr/bin/python # -*- coding: utf-8 -*- # # 2018-05-27 Cornelius Kölbel <cornelius.koelbel@netknights.it> # init __doc__ = """ This script exports counter from privacyIDEA to a csv file. It exports serial, counter """ import argparse import sys from sqlalchemy import create_engine from sqlalchemy...
<commit_before><commit_msg>Add a script that exports OTP counters from privacyIDEA Just for sake of completeness I add this script that helped in different migration scenarios. It exports only the counter values from all tokens in the database. (relevant for HOTP and TOTP)<commit_after>
#!/usr/bin/python # -*- coding: utf-8 -*- # # 2018-05-27 Cornelius Kölbel <cornelius.koelbel@netknights.it> # init __doc__ = """ This script exports counter from privacyIDEA to a csv file. It exports serial, counter """ import argparse import sys from sqlalchemy import create_engine from sqlalchemy...
Add a script that exports OTP counters from privacyIDEA Just for sake of completeness I add this script that helped in different migration scenarios. It exports only the counter values from all tokens in the database. (relevant for HOTP and TOTP)#!/usr/bin/python # -*- coding: utf-8 -*- # # 2018-05-27 Cornelius Kölbe...
<commit_before><commit_msg>Add a script that exports OTP counters from privacyIDEA Just for sake of completeness I add this script that helped in different migration scenarios. It exports only the counter values from all tokens in the database. (relevant for HOTP and TOTP)<commit_after>#!/usr/bin/python # -*- coding: ...
07cb5fdc80214cebcdc794b24cc4bd853835b4f7
Release/Tests/AnalysisTest/Python.VS.TestData/DebuggerProject/EnumChildTestV3.py
Release/Tests/AnalysisTest/Python.VS.TestData/DebuggerProject/EnumChildTestV3.py
d1 = {42 : 100} d2 = {'abc' : 'foo'} s = set([frozenset([2,3,4])]) class C(object): abc = 42 def f(self): pass cinst = C() class C2(object): abc = 42 def __init__(self): self.bar = 100 self.self = self def __repr__(self): return 'myrepr' def __hex__(...
Add 1 more missing file
Add 1 more missing file
Python
apache-2.0
Habatchii/PTVS,modulexcite/PTVS,christer155/PTVS,crwilcox/PTVS,int19h/PTVS,dut3062796s/PTVS,modulexcite/PTVS,gilbertw/PTVS,Microsoft/PTVS,zooba/PTVS,bolabola/PTVS,crwilcox/PTVS,MetSystem/PTVS,modulexcite/PTVS,bolabola/PTVS,juanyaw/PTVS,ChinaQuants/PTVS,zooba/PTVS,msunardi/PTVS,gilbertw/PTVS,mlorbetske/PTVS,denfromufa/P...
Add 1 more missing file
d1 = {42 : 100} d2 = {'abc' : 'foo'} s = set([frozenset([2,3,4])]) class C(object): abc = 42 def f(self): pass cinst = C() class C2(object): abc = 42 def __init__(self): self.bar = 100 self.self = self def __repr__(self): return 'myrepr' def __hex__(...
<commit_before><commit_msg>Add 1 more missing file<commit_after>
d1 = {42 : 100} d2 = {'abc' : 'foo'} s = set([frozenset([2,3,4])]) class C(object): abc = 42 def f(self): pass cinst = C() class C2(object): abc = 42 def __init__(self): self.bar = 100 self.self = self def __repr__(self): return 'myrepr' def __hex__(...
Add 1 more missing filed1 = {42 : 100} d2 = {'abc' : 'foo'} s = set([frozenset([2,3,4])]) class C(object): abc = 42 def f(self): pass cinst = C() class C2(object): abc = 42 def __init__(self): self.bar = 100 self.self = self def __repr__(self): return 'my...
<commit_before><commit_msg>Add 1 more missing file<commit_after>d1 = {42 : 100} d2 = {'abc' : 'foo'} s = set([frozenset([2,3,4])]) class C(object): abc = 42 def f(self): pass cinst = C() class C2(object): abc = 42 def __init__(self): self.bar = 100 self.self = self ...
79723a38a1905da020effe0b5b1edf98b9a5351b
py/non-negative-integers-without-consecutive-ones.py
py/non-negative-integers-without-consecutive-ones.py
class Solution(object): def findIntegers(self, num): """ :type num: int :rtype: int """ for t in xrange(num.bit_length() - 1, 0, -1): if ((1 << t) & num) and (1 << (t - 1) & num): flag = True for i in xrange(t, -1, -1): ...
Add py solution for 600. Non-negative Integers without Consecutive Ones
Add py solution for 600. Non-negative Integers without Consecutive Ones 600. Non-negative Integers without Consecutive Ones: https://leetcode.com/problems/non-negative-integers-without-consecutive-ones/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 600. Non-negative Integers without Consecutive Ones 600. Non-negative Integers without Consecutive Ones: https://leetcode.com/problems/non-negative-integers-without-consecutive-ones/
class Solution(object): def findIntegers(self, num): """ :type num: int :rtype: int """ for t in xrange(num.bit_length() - 1, 0, -1): if ((1 << t) & num) and (1 << (t - 1) & num): flag = True for i in xrange(t, -1, -1): ...
<commit_before><commit_msg>Add py solution for 600. Non-negative Integers without Consecutive Ones 600. Non-negative Integers without Consecutive Ones: https://leetcode.com/problems/non-negative-integers-without-consecutive-ones/<commit_after>
class Solution(object): def findIntegers(self, num): """ :type num: int :rtype: int """ for t in xrange(num.bit_length() - 1, 0, -1): if ((1 << t) & num) and (1 << (t - 1) & num): flag = True for i in xrange(t, -1, -1): ...
Add py solution for 600. Non-negative Integers without Consecutive Ones 600. Non-negative Integers without Consecutive Ones: https://leetcode.com/problems/non-negative-integers-without-consecutive-ones/class Solution(object): def findIntegers(self, num): """ :type num: int :rtype: int ...
<commit_before><commit_msg>Add py solution for 600. Non-negative Integers without Consecutive Ones 600. Non-negative Integers without Consecutive Ones: https://leetcode.com/problems/non-negative-integers-without-consecutive-ones/<commit_after>class Solution(object): def findIntegers(self, num): """ ...
dddd91e030a6c9caa1d431ce95b07125f90675a9
features/subscriptions/migrations/0014_auto_20171102_1045.py
features/subscriptions/migrations/0014_auto_20171102_1045.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-02 09:45 from __future__ import unicode_literals from django.db import migrations from django.db.transaction import atomic from django.db.utils import IntegrityError def add_subscriptions_for_memberships(apps, schema_editor): ContentType = apps.get_...
Add subscriptions for all memberships
Add subscriptions for all memberships
Python
agpl-3.0
stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten
Add subscriptions for all memberships
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-02 09:45 from __future__ import unicode_literals from django.db import migrations from django.db.transaction import atomic from django.db.utils import IntegrityError def add_subscriptions_for_memberships(apps, schema_editor): ContentType = apps.get_...
<commit_before><commit_msg>Add subscriptions for all memberships<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-02 09:45 from __future__ import unicode_literals from django.db import migrations from django.db.transaction import atomic from django.db.utils import IntegrityError def add_subscriptions_for_memberships(apps, schema_editor): ContentType = apps.get_...
Add subscriptions for all memberships# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-02 09:45 from __future__ import unicode_literals from django.db import migrations from django.db.transaction import atomic from django.db.utils import IntegrityError def add_subscriptions_for_memberships(apps, schema...
<commit_before><commit_msg>Add subscriptions for all memberships<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-11-02 09:45 from __future__ import unicode_literals from django.db import migrations from django.db.transaction import atomic from django.db.utils import IntegrityError def add_s...
efcd7e49718867362d43eb651c233f6f0dd183cf
senlin_dashboard/test/api_tests/senlin_rest_tests.py
senlin_dashboard/test/api_tests/senlin_rest_tests.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 the...
Add unit test for senlin-dashboard rest api
Add unit test for senlin-dashboard rest api Change-Id: Id0372305d71063b0ef029c1c7fb1dac516ef088f
Python
apache-2.0
openstack/senlin-dashboard,stackforge/senlin-dashboard,stackforge/senlin-dashboard,openstack/senlin-dashboard,stackforge/senlin-dashboard,openstack/senlin-dashboard,openstack/senlin-dashboard
Add unit test for senlin-dashboard rest api Change-Id: Id0372305d71063b0ef029c1c7fb1dac516ef088f
# 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 the...
<commit_before><commit_msg>Add unit test for senlin-dashboard rest api Change-Id: Id0372305d71063b0ef029c1c7fb1dac516ef088f<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 the...
Add unit test for senlin-dashboard rest api Change-Id: Id0372305d71063b0ef029c1c7fb1dac516ef088f# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2....
<commit_before><commit_msg>Add unit test for senlin-dashboard rest api Change-Id: Id0372305d71063b0ef029c1c7fb1dac516ef088f<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 # # ...
0eb860c2bfbc015970fef517e835a49dd84812db
rcamp/mailer/migrations/0002_allocation_expiration_mailer_field_choices.py
rcamp/mailer/migrations/0002_allocation_expiration_mailer_field_choices.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mailer', '0001_initial'), ] operations = [ migrations.AlterField( model_name='mailnotifier', name='e...
Add db migration: expiration/expiring choices for mailer
Add db migration: expiration/expiring choices for mailer
Python
mit
ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP
Add db migration: expiration/expiring choices for mailer
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mailer', '0001_initial'), ] operations = [ migrations.AlterField( model_name='mailnotifier', name='e...
<commit_before><commit_msg>Add db migration: expiration/expiring choices for mailer<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mailer', '0001_initial'), ] operations = [ migrations.AlterField( model_name='mailnotifier', name='e...
Add db migration: expiration/expiring choices for mailer# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mailer', '0001_initial'), ] operations = [ migrations.AlterField( ...
<commit_before><commit_msg>Add db migration: expiration/expiring choices for mailer<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mailer', '0001_initial'), ] operati...
9d341072b6ebbd84380dd1ef8071d313244acc88
cryptchat/test/test_diffiehellman.py
cryptchat/test/test_diffiehellman.py
#/usr/bin/python3 # -*- coding: utf-8 -*- # Run from Cryptchat # python3 -m cryptchat.test.test_diffiehellman import unittest from ..crypto.diffiehellman import DiffieHellman class testDiffieHellman(unittest.TestCase): def test_initiatevalid(self): alice = DiffieHellman(group=5) self.assertTrue(...
Add basic test for diffiehellman
Add basic test for diffiehellman
Python
mit
djohsson/Cryptchat
Add basic test for diffiehellman
#/usr/bin/python3 # -*- coding: utf-8 -*- # Run from Cryptchat # python3 -m cryptchat.test.test_diffiehellman import unittest from ..crypto.diffiehellman import DiffieHellman class testDiffieHellman(unittest.TestCase): def test_initiatevalid(self): alice = DiffieHellman(group=5) self.assertTrue(...
<commit_before><commit_msg>Add basic test for diffiehellman<commit_after>
#/usr/bin/python3 # -*- coding: utf-8 -*- # Run from Cryptchat # python3 -m cryptchat.test.test_diffiehellman import unittest from ..crypto.diffiehellman import DiffieHellman class testDiffieHellman(unittest.TestCase): def test_initiatevalid(self): alice = DiffieHellman(group=5) self.assertTrue(...
Add basic test for diffiehellman#/usr/bin/python3 # -*- coding: utf-8 -*- # Run from Cryptchat # python3 -m cryptchat.test.test_diffiehellman import unittest from ..crypto.diffiehellman import DiffieHellman class testDiffieHellman(unittest.TestCase): def test_initiatevalid(self): alice = DiffieHellman(g...
<commit_before><commit_msg>Add basic test for diffiehellman<commit_after>#/usr/bin/python3 # -*- coding: utf-8 -*- # Run from Cryptchat # python3 -m cryptchat.test.test_diffiehellman import unittest from ..crypto.diffiehellman import DiffieHellman class testDiffieHellman(unittest.TestCase): def test_initiateval...
21572b5bef09bd60bd61b68241a155ddb2dd4444
tests/test_children.py
tests/test_children.py
# coding: pyxl from pyxl import html def test_no_filter(): children = <div><p>One</p><p>Two</p></div>.children() assert len(children) == 2 assert str(children[0]) == '<p>One</p>' assert str(children[1]) == '<p>Two</p>' def test_class_filter(): div = <div><p class="yo">Hi</p><p>No</p><p class="yo"...
Add tests for children method.
Add tests for children method. - all children are returned - filter by tag - filter by id - filter by class - negate filter (exclude)
Python
apache-2.0
pyxl4/pyxl4
Add tests for children method. - all children are returned - filter by tag - filter by id - filter by class - negate filter (exclude)
# coding: pyxl from pyxl import html def test_no_filter(): children = <div><p>One</p><p>Two</p></div>.children() assert len(children) == 2 assert str(children[0]) == '<p>One</p>' assert str(children[1]) == '<p>Two</p>' def test_class_filter(): div = <div><p class="yo">Hi</p><p>No</p><p class="yo"...
<commit_before><commit_msg>Add tests for children method. - all children are returned - filter by tag - filter by id - filter by class - negate filter (exclude)<commit_after>
# coding: pyxl from pyxl import html def test_no_filter(): children = <div><p>One</p><p>Two</p></div>.children() assert len(children) == 2 assert str(children[0]) == '<p>One</p>' assert str(children[1]) == '<p>Two</p>' def test_class_filter(): div = <div><p class="yo">Hi</p><p>No</p><p class="yo"...
Add tests for children method. - all children are returned - filter by tag - filter by id - filter by class - negate filter (exclude)# coding: pyxl from pyxl import html def test_no_filter(): children = <div><p>One</p><p>Two</p></div>.children() assert len(children) == 2 assert str(children[0]) == '<p>On...
<commit_before><commit_msg>Add tests for children method. - all children are returned - filter by tag - filter by id - filter by class - negate filter (exclude)<commit_after># coding: pyxl from pyxl import html def test_no_filter(): children = <div><p>One</p><p>Two</p></div>.children() assert len(children) =...
119196cc7d3932c09d5125d1d2f02fd0e6964b43
py/contiguous-array.py
py/contiguous-array.py
class Solution(object): def findMaxLength(self, nums): """ :type nums: List[int] :rtype: int """ pos = {0: -1} v = 0 ans = 0 for i, n in enumerate(nums): v += n * 2 - 1 if v in pos: ans = max(ans, i - pos[v]) ...
Add py solution for 525. Contiguous Array
Add py solution for 525. Contiguous Array 525. Contiguous Array: https://leetcode.com/problems/contiguous-array/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 525. Contiguous Array 525. Contiguous Array: https://leetcode.com/problems/contiguous-array/
class Solution(object): def findMaxLength(self, nums): """ :type nums: List[int] :rtype: int """ pos = {0: -1} v = 0 ans = 0 for i, n in enumerate(nums): v += n * 2 - 1 if v in pos: ans = max(ans, i - pos[v]) ...
<commit_before><commit_msg>Add py solution for 525. Contiguous Array 525. Contiguous Array: https://leetcode.com/problems/contiguous-array/<commit_after>
class Solution(object): def findMaxLength(self, nums): """ :type nums: List[int] :rtype: int """ pos = {0: -1} v = 0 ans = 0 for i, n in enumerate(nums): v += n * 2 - 1 if v in pos: ans = max(ans, i - pos[v]) ...
Add py solution for 525. Contiguous Array 525. Contiguous Array: https://leetcode.com/problems/contiguous-array/class Solution(object): def findMaxLength(self, nums): """ :type nums: List[int] :rtype: int """ pos = {0: -1} v = 0 ans = 0 for i, n in en...
<commit_before><commit_msg>Add py solution for 525. Contiguous Array 525. Contiguous Array: https://leetcode.com/problems/contiguous-array/<commit_after>class Solution(object): def findMaxLength(self, nums): """ :type nums: List[int] :rtype: int """ pos = {0: -1} v =...
70ba2d36dfcd0613096b8b41c15c34bacd8b72e8
tests/test_sscanf.py
tests/test_sscanf.py
import nose import angr import subprocess import logging l = logging.getLogger('angr.tests.sscanf') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_sscanf(threads): test_bin = os.path.join(test_location, "../../binaries/tests/x86_64/sscanf_test") b = angr.Project(test_bin)...
Add test case for sscanf
Add test case for sscanf
Python
bsd-2-clause
haylesr/angr,axt/angr,chubbymaggie/angr,axt/angr,schieb/angr,tyb0807/angr,angr/angr,axt/angr,iamahuman/angr,schieb/angr,angr/angr,iamahuman/angr,schieb/angr,chubbymaggie/angr,chubbymaggie/angr,tyb0807/angr,f-prettyland/angr,f-prettyland/angr,tyb0807/angr,angr/angr,haylesr/angr,f-prettyland/angr,iamahuman/angr
Add test case for sscanf
import nose import angr import subprocess import logging l = logging.getLogger('angr.tests.sscanf') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_sscanf(threads): test_bin = os.path.join(test_location, "../../binaries/tests/x86_64/sscanf_test") b = angr.Project(test_bin)...
<commit_before><commit_msg>Add test case for sscanf<commit_after>
import nose import angr import subprocess import logging l = logging.getLogger('angr.tests.sscanf') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_sscanf(threads): test_bin = os.path.join(test_location, "../../binaries/tests/x86_64/sscanf_test") b = angr.Project(test_bin)...
Add test case for sscanfimport nose import angr import subprocess import logging l = logging.getLogger('angr.tests.sscanf') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_sscanf(threads): test_bin = os.path.join(test_location, "../../binaries/tests/x86_64/sscanf_test") b ...
<commit_before><commit_msg>Add test case for sscanf<commit_after>import nose import angr import subprocess import logging l = logging.getLogger('angr.tests.sscanf') import os test_location = str(os.path.dirname(os.path.realpath(__file__))) def run_sscanf(threads): test_bin = os.path.join(test_location, "../../b...
e92bf205247acffc353529b1a26e7da2acb8d2fb
giveaminute/migrations/versions/008_Fix_invalid_event_ids_in_the_needs_table.py
giveaminute/migrations/versions/008_Fix_invalid_event_ids_in_the_needs_table.py
from sqlalchemy import * from migrate import * def upgrade(migrate_engine): # Upgrade operations go here. Don't create your own engine; bind migrate_engine # to your metadata migrate_engine.execute(""" UPDATE project_need SET event_id=NULL WHERE event_id=0 """) def downgr...
Add a migration to fix bad event_id values
Add a migration to fix bad event_id values
Python
agpl-3.0
codeforeurope/Change-By-Us,codeforamerica/Change-By-Us,watchcat/cbu-rotterdam,codeforamerica/Change-By-Us,localprojects/Change-By-Us,codeforeurope/Change-By-Us,codeforamerica/Change-By-Us,localprojects/Change-By-Us,localprojects/Change-By-Us,codeforeurope/Change-By-Us,codeforamerica/Change-By-Us,watchcat/cbu-rotterdam,...
Add a migration to fix bad event_id values
from sqlalchemy import * from migrate import * def upgrade(migrate_engine): # Upgrade operations go here. Don't create your own engine; bind migrate_engine # to your metadata migrate_engine.execute(""" UPDATE project_need SET event_id=NULL WHERE event_id=0 """) def downgr...
<commit_before><commit_msg>Add a migration to fix bad event_id values<commit_after>
from sqlalchemy import * from migrate import * def upgrade(migrate_engine): # Upgrade operations go here. Don't create your own engine; bind migrate_engine # to your metadata migrate_engine.execute(""" UPDATE project_need SET event_id=NULL WHERE event_id=0 """) def downgr...
Add a migration to fix bad event_id valuesfrom sqlalchemy import * from migrate import * def upgrade(migrate_engine): # Upgrade operations go here. Don't create your own engine; bind migrate_engine # to your metadata migrate_engine.execute(""" UPDATE project_need SET event_id=NULL ...
<commit_before><commit_msg>Add a migration to fix bad event_id values<commit_after>from sqlalchemy import * from migrate import * def upgrade(migrate_engine): # Upgrade operations go here. Don't create your own engine; bind migrate_engine # to your metadata migrate_engine.execute(""" UPDATE projec...
ea311ee5dee288f1efd9ea2d098d0873f152d6f7
alembic/versions/54e898dc3251_bug_878109_shut_cami.py
alembic/versions/54e898dc3251_bug_878109_shut_cami.py
"""bug 878109 shut camino down Revision ID: 54e898dc3251 Revises: 471c6efadde Create Date: 2013-07-03 09:21:07.627571 """ # revision identifiers, used by Alembic. revision = '54e898dc3251' down_revision = '471c6efadde' import os import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgres...
Add migration for camino shutdown
Add migration for camino shutdown
Python
mpl-2.0
bsmedberg/socorro,cliqz/socorro,Tchanders/socorro,yglazko/socorro,linearregression/socorro,pcabido/socorro,adngdb/socorro,KaiRo-at/socorro,AdrianGaudebert/socorro,cliqz/socorro,spthaolt/socorro,KaiRo-at/socorro,Tayamarn/socorro,pcabido/socorro,luser/socorro,Tayamarn/socorro,Tayamarn/socorro,bsmedberg/socorro,Tayamarn/s...
Add migration for camino shutdown
"""bug 878109 shut camino down Revision ID: 54e898dc3251 Revises: 471c6efadde Create Date: 2013-07-03 09:21:07.627571 """ # revision identifiers, used by Alembic. revision = '54e898dc3251' down_revision = '471c6efadde' import os import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgres...
<commit_before><commit_msg>Add migration for camino shutdown<commit_after>
"""bug 878109 shut camino down Revision ID: 54e898dc3251 Revises: 471c6efadde Create Date: 2013-07-03 09:21:07.627571 """ # revision identifiers, used by Alembic. revision = '54e898dc3251' down_revision = '471c6efadde' import os import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgres...
Add migration for camino shutdown"""bug 878109 shut camino down Revision ID: 54e898dc3251 Revises: 471c6efadde Create Date: 2013-07-03 09:21:07.627571 """ # revision identifiers, used by Alembic. revision = '54e898dc3251' down_revision = '471c6efadde' import os import sqlalchemy as sa from alembic import op from sq...
<commit_before><commit_msg>Add migration for camino shutdown<commit_after>"""bug 878109 shut camino down Revision ID: 54e898dc3251 Revises: 471c6efadde Create Date: 2013-07-03 09:21:07.627571 """ # revision identifiers, used by Alembic. revision = '54e898dc3251' down_revision = '471c6efadde' import os import sqlalc...
8c7d1bc554e6b5bbb7900a2f6d976d72795bb454
tools/commitstats.py
tools/commitstats.py
# Run svn log -l <some number> import re import numpy as np import os names = re.compile(r'r\d+\s[|]\s(.*)\s[|]\s200') def get_count(filename, repo): mystr = open(filename).read() result = names.findall(mystr) u = np.unique(result) count = [(x,result.count(x),repo) for x in u] return count ...
Add a tool for determining active SVN committers.
Add a tool for determining active SVN committers.
Python
bsd-3-clause
yiakwy/numpy,GaZ3ll3/numpy,andsor/numpy,mattip/numpy,rgommers/numpy,Anwesh43/numpy,chatcannon/numpy,KaelChen/numpy,ekalosak/numpy,b-carter/numpy,jorisvandenbossche/numpy,bringingheavendown/numpy,Linkid/numpy,mortada/numpy,abalkin/numpy,pyparallel/numpy,has2k1/numpy,ESSS/numpy,tacaswell/numpy,astrofrog/numpy,naritta/num...
Add a tool for determining active SVN committers.
# Run svn log -l <some number> import re import numpy as np import os names = re.compile(r'r\d+\s[|]\s(.*)\s[|]\s200') def get_count(filename, repo): mystr = open(filename).read() result = names.findall(mystr) u = np.unique(result) count = [(x,result.count(x),repo) for x in u] return count ...
<commit_before><commit_msg>Add a tool for determining active SVN committers.<commit_after>
# Run svn log -l <some number> import re import numpy as np import os names = re.compile(r'r\d+\s[|]\s(.*)\s[|]\s200') def get_count(filename, repo): mystr = open(filename).read() result = names.findall(mystr) u = np.unique(result) count = [(x,result.count(x),repo) for x in u] return count ...
Add a tool for determining active SVN committers. # Run svn log -l <some number> import re import numpy as np import os names = re.compile(r'r\d+\s[|]\s(.*)\s[|]\s200') def get_count(filename, repo): mystr = open(filename).read() result = names.findall(mystr) u = np.unique(result) count = [(x,result....
<commit_before><commit_msg>Add a tool for determining active SVN committers.<commit_after> # Run svn log -l <some number> import re import numpy as np import os names = re.compile(r'r\d+\s[|]\s(.*)\s[|]\s200') def get_count(filename, repo): mystr = open(filename).read() result = names.findall(mystr) u = ...
933fdbbd2f09c3ab6869dbbc6c30c698576eb3fd
demos/py_simple/loaders_example.py
demos/py_simple/loaders_example.py
#!/usr/bin/env python import sys import gfxprim.core as core import gfxprim.loaders as loaders import gfxprim.filters as filters def main(): if len(sys.argv) != 2: print("Takes an image as an argument") sys.exit(1) # Load Image img = loaders.LoadImage(sys.argv[2], None) # Save result ...
Add very simple loaders python example.
examples: Add very simple loaders python example.
Python
lgpl-2.1
gfxprim/gfxprim,gfxprim/gfxprim,gfxprim/gfxprim,gfxprim/gfxprim,gfxprim/gfxprim
examples: Add very simple loaders python example.
#!/usr/bin/env python import sys import gfxprim.core as core import gfxprim.loaders as loaders import gfxprim.filters as filters def main(): if len(sys.argv) != 2: print("Takes an image as an argument") sys.exit(1) # Load Image img = loaders.LoadImage(sys.argv[2], None) # Save result ...
<commit_before><commit_msg>examples: Add very simple loaders python example.<commit_after>
#!/usr/bin/env python import sys import gfxprim.core as core import gfxprim.loaders as loaders import gfxprim.filters as filters def main(): if len(sys.argv) != 2: print("Takes an image as an argument") sys.exit(1) # Load Image img = loaders.LoadImage(sys.argv[2], None) # Save result ...
examples: Add very simple loaders python example.#!/usr/bin/env python import sys import gfxprim.core as core import gfxprim.loaders as loaders import gfxprim.filters as filters def main(): if len(sys.argv) != 2: print("Takes an image as an argument") sys.exit(1) # Load Image img = loader...
<commit_before><commit_msg>examples: Add very simple loaders python example.<commit_after>#!/usr/bin/env python import sys import gfxprim.core as core import gfxprim.loaders as loaders import gfxprim.filters as filters def main(): if len(sys.argv) != 2: print("Takes an image as an argument") sys.e...
4b0ed3efd88a1f6ee9ed2a3ea5bb0401cc02122d
creative/app/test/test_forms.py
creative/app/test/test_forms.py
# Copyright 2019 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 tests for test_question_section_is_empty
Add unit tests for test_question_section_is_empty Change-Id: Ic83098dbb5527ef1430bdb8f1159802344ca1d97
Python
apache-2.0
google/brandometer,google/brandometer,google/brandometer
Add unit tests for test_question_section_is_empty Change-Id: Ic83098dbb5527ef1430bdb8f1159802344ca1d97
# Copyright 2019 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 tests for test_question_section_is_empty Change-Id: Ic83098dbb5527ef1430bdb8f1159802344ca1d97<commit_after>
# Copyright 2019 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 tests for test_question_section_is_empty Change-Id: Ic83098dbb5527ef1430bdb8f1159802344ca1d97# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
<commit_before><commit_msg>Add unit tests for test_question_section_is_empty Change-Id: Ic83098dbb5527ef1430bdb8f1159802344ca1d97<commit_after># Copyright 2019 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 obt...
5daad1d1db64082fb0e5ec11089ee37187ab9f03
py/integer-break.py
py/integer-break.py
class Solution(object): def integerBreak(self, n): """ :type n: int :rtype: int """ d = {1: 1, 2:2, 3: 3, 4: 4} d[1] = 1 if n <= 3: return n - 1 for i in xrange(5, n + 1): d[i] = max(d[a] * d[i - a] for a in xrange(1, i / 2 + 1)...
Add py solution for 343. Integer Break
Add py solution for 343. Integer Break 343. Integer Break: https://leetcode.com/problems/integer-break/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 343. Integer Break 343. Integer Break: https://leetcode.com/problems/integer-break/
class Solution(object): def integerBreak(self, n): """ :type n: int :rtype: int """ d = {1: 1, 2:2, 3: 3, 4: 4} d[1] = 1 if n <= 3: return n - 1 for i in xrange(5, n + 1): d[i] = max(d[a] * d[i - a] for a in xrange(1, i / 2 + 1)...
<commit_before><commit_msg>Add py solution for 343. Integer Break 343. Integer Break: https://leetcode.com/problems/integer-break/<commit_after>
class Solution(object): def integerBreak(self, n): """ :type n: int :rtype: int """ d = {1: 1, 2:2, 3: 3, 4: 4} d[1] = 1 if n <= 3: return n - 1 for i in xrange(5, n + 1): d[i] = max(d[a] * d[i - a] for a in xrange(1, i / 2 + 1)...
Add py solution for 343. Integer Break 343. Integer Break: https://leetcode.com/problems/integer-break/class Solution(object): def integerBreak(self, n): """ :type n: int :rtype: int """ d = {1: 1, 2:2, 3: 3, 4: 4} d[1] = 1 if n <= 3: return n - 1...
<commit_before><commit_msg>Add py solution for 343. Integer Break 343. Integer Break: https://leetcode.com/problems/integer-break/<commit_after>class Solution(object): def integerBreak(self, n): """ :type n: int :rtype: int """ d = {1: 1, 2:2, 3: 3, 4: 4} d[1] = 1 ...
9c3e98e75ae5d8819a2e88ffe4088c3f7df02f43
tests/test_models.py
tests/test_models.py
# -*- coding: utf-8 from __future__ import unicode_literals, absolute_import from django.contrib.auth import get_user_model from django.test import TestCase from social_django.models import UserSocialAuth class TestSocialAuthUser(TestCase): def test_user_relationship_none(self): """Accessing User.socia...
Write a few tests for models
Write a few tests for models Wrote these tests while investigating a problem I had while writing a custom backend.
Python
bsd-3-clause
python-social-auth/social-app-django,python-social-auth/social-app-django,python-social-auth/social-app-django
Write a few tests for models Wrote these tests while investigating a problem I had while writing a custom backend.
# -*- coding: utf-8 from __future__ import unicode_literals, absolute_import from django.contrib.auth import get_user_model from django.test import TestCase from social_django.models import UserSocialAuth class TestSocialAuthUser(TestCase): def test_user_relationship_none(self): """Accessing User.socia...
<commit_before><commit_msg>Write a few tests for models Wrote these tests while investigating a problem I had while writing a custom backend.<commit_after>
# -*- coding: utf-8 from __future__ import unicode_literals, absolute_import from django.contrib.auth import get_user_model from django.test import TestCase from social_django.models import UserSocialAuth class TestSocialAuthUser(TestCase): def test_user_relationship_none(self): """Accessing User.socia...
Write a few tests for models Wrote these tests while investigating a problem I had while writing a custom backend.# -*- coding: utf-8 from __future__ import unicode_literals, absolute_import from django.contrib.auth import get_user_model from django.test import TestCase from social_django.models import UserSocialAut...
<commit_before><commit_msg>Write a few tests for models Wrote these tests while investigating a problem I had while writing a custom backend.<commit_after># -*- coding: utf-8 from __future__ import unicode_literals, absolute_import from django.contrib.auth import get_user_model from django.test import TestCase from ...
e3a44a03c0aa8166bb6ce6740a82004cfab7a8ab
test/test_examples.py
test/test_examples.py
import os import subprocess import tempfile import nbformat class TestExamples: def _notebook_run(self, path): """ Execute a notebook via nbconvert and collect output. Returns (parsed nb object, execution errors) """ dirname, __ = os.path.split(path) os.chdir(dirna...
Add tests for jupyter notebooks
Add tests for jupyter notebooks
Python
mit
oemof/feedinlib
Add tests for jupyter notebooks
import os import subprocess import tempfile import nbformat class TestExamples: def _notebook_run(self, path): """ Execute a notebook via nbconvert and collect output. Returns (parsed nb object, execution errors) """ dirname, __ = os.path.split(path) os.chdir(dirna...
<commit_before><commit_msg>Add tests for jupyter notebooks<commit_after>
import os import subprocess import tempfile import nbformat class TestExamples: def _notebook_run(self, path): """ Execute a notebook via nbconvert and collect output. Returns (parsed nb object, execution errors) """ dirname, __ = os.path.split(path) os.chdir(dirna...
Add tests for jupyter notebooksimport os import subprocess import tempfile import nbformat class TestExamples: def _notebook_run(self, path): """ Execute a notebook via nbconvert and collect output. Returns (parsed nb object, execution errors) """ dirname, __ = os.path.spl...
<commit_before><commit_msg>Add tests for jupyter notebooks<commit_after>import os import subprocess import tempfile import nbformat class TestExamples: def _notebook_run(self, path): """ Execute a notebook via nbconvert and collect output. Returns (parsed nb object, execution errors) ...
8a5cf2d72e3530e42d56edc97e0182a81b15fbce
pombola/kenya/management/commands/kenya_dump_petition_and_senate_comments.py
pombola/kenya/management/commands/kenya_dump_petition_and_senate_comments.py
import json from optparse import make_option import re from django.core.management.base import NoArgsCommand from pombola.feedback.models import Feedback from csv import DictWriter def unpack_comment(comment_text): m = re.search('(?s)^({.*?}) (.*)$', comment_text) if not m: raise Exception(u"Found a...
Add a comment to dump petition and senate comments data
KE: Add a comment to dump petition and senate comments data This is needed both for analysis by MIT and to forward the comments on to the senate.
Python
agpl-3.0
mysociety/pombola,mysociety/pombola,mysociety/pombola,mysociety/pombola,patricmutwiri/pombola,ken-muturi/pombola,hzj123/56th,hzj123/56th,geoffkilpin/pombola,patricmutwiri/pombola,ken-muturi/pombola,patricmutwiri/pombola,geoffkilpin/pombola,mysociety/pombola,ken-muturi/pombola,ken-muturi/pombola,hzj123/56th,hzj123/56th,...
KE: Add a comment to dump petition and senate comments data This is needed both for analysis by MIT and to forward the comments on to the senate.
import json from optparse import make_option import re from django.core.management.base import NoArgsCommand from pombola.feedback.models import Feedback from csv import DictWriter def unpack_comment(comment_text): m = re.search('(?s)^({.*?}) (.*)$', comment_text) if not m: raise Exception(u"Found a...
<commit_before><commit_msg>KE: Add a comment to dump petition and senate comments data This is needed both for analysis by MIT and to forward the comments on to the senate.<commit_after>
import json from optparse import make_option import re from django.core.management.base import NoArgsCommand from pombola.feedback.models import Feedback from csv import DictWriter def unpack_comment(comment_text): m = re.search('(?s)^({.*?}) (.*)$', comment_text) if not m: raise Exception(u"Found a...
KE: Add a comment to dump petition and senate comments data This is needed both for analysis by MIT and to forward the comments on to the senate.import json from optparse import make_option import re from django.core.management.base import NoArgsCommand from pombola.feedback.models import Feedback from csv import D...
<commit_before><commit_msg>KE: Add a comment to dump petition and senate comments data This is needed both for analysis by MIT and to forward the comments on to the senate.<commit_after>import json from optparse import make_option import re from django.core.management.base import NoArgsCommand from pombola.feedback....
6d2c9fa6ae3d3c8b25b861b3f369f250e1ba6ed7
asdhash.py
asdhash.py
import asyncio import time import random import string class ASyncDHash(object): def __init__(self): self.nodes = [ASyncNodes('#1'), ASyncNodes('#2')] async def read(self, key): if key % 2 == 0: await self.nodes[0].read(key) else: await self.nodes[1].read(key) async def write(self, key, value): if ...
Add a simple example using asyncio: something that could be used to emulate physical nodes.
Add a simple example using asyncio: something that could be used to emulate physical nodes.
Python
mit
gudnm/dhash
Add a simple example using asyncio: something that could be used to emulate physical nodes.
import asyncio import time import random import string class ASyncDHash(object): def __init__(self): self.nodes = [ASyncNodes('#1'), ASyncNodes('#2')] async def read(self, key): if key % 2 == 0: await self.nodes[0].read(key) else: await self.nodes[1].read(key) async def write(self, key, value): if ...
<commit_before><commit_msg>Add a simple example using asyncio: something that could be used to emulate physical nodes.<commit_after>
import asyncio import time import random import string class ASyncDHash(object): def __init__(self): self.nodes = [ASyncNodes('#1'), ASyncNodes('#2')] async def read(self, key): if key % 2 == 0: await self.nodes[0].read(key) else: await self.nodes[1].read(key) async def write(self, key, value): if ...
Add a simple example using asyncio: something that could be used to emulate physical nodes.import asyncio import time import random import string class ASyncDHash(object): def __init__(self): self.nodes = [ASyncNodes('#1'), ASyncNodes('#2')] async def read(self, key): if key % 2 == 0: await self.nodes[0].re...
<commit_before><commit_msg>Add a simple example using asyncio: something that could be used to emulate physical nodes.<commit_after>import asyncio import time import random import string class ASyncDHash(object): def __init__(self): self.nodes = [ASyncNodes('#1'), ASyncNodes('#2')] async def read(self, key): i...
bec7e3c3e479216d419281af4bf52151101fb6a9
webkit/tools/layout_tests/PRESUBMIT.py
webkit/tools/layout_tests/PRESUBMIT.py
# Copyright (c) 2009 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. """test_expectations.txt presubmit script. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit API ...
Add presubmit check to lint test files.
Add presubmit check to lint test files. BUG=5339 TEST=report error by "gcl presubmit" with bad test_expectations.txt. Review URL: http://codereview.chromium.org/160442 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@22456 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
chuan9/chromium-crosswalk,markYoungH/chromium.src,patrickm/chromium.src,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,Jonekee/chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk...
Add presubmit check to lint test files. BUG=5339 TEST=report error by "gcl presubmit" with bad test_expectations.txt. Review URL: http://codereview.chromium.org/160442 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@22456 0039d316-1c4b-4281-b951-d872f2087c98
# Copyright (c) 2009 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. """test_expectations.txt presubmit script. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit API ...
<commit_before><commit_msg>Add presubmit check to lint test files. BUG=5339 TEST=report error by "gcl presubmit" with bad test_expectations.txt. Review URL: http://codereview.chromium.org/160442 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@22456 0039d316-1c4b-4281-b951-d872f2087c98<commit_after>
# Copyright (c) 2009 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. """test_expectations.txt presubmit script. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit API ...
Add presubmit check to lint test files. BUG=5339 TEST=report error by "gcl presubmit" with bad test_expectations.txt. Review URL: http://codereview.chromium.org/160442 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@22456 0039d316-1c4b-4281-b951-d872f2087c98# Copyright (c) 2009 The Chromium Authors. All rights ...
<commit_before><commit_msg>Add presubmit check to lint test files. BUG=5339 TEST=report error by "gcl presubmit" with bad test_expectations.txt. Review URL: http://codereview.chromium.org/160442 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@22456 0039d316-1c4b-4281-b951-d872f2087c98<commit_after># Copyright (...
195a806d130a20b91ac1c92a39b6de80565c4b67
all_f_g.py
all_f_g.py
# -*- coding: utf-8 -*- """ Created on Tue Feb 03 10:28:37 2015 @author: Jens von der Linden global variables all_f and all_g save value of f,g and r each time an f_func, or g_func is called. In the form [r, f]. To call fs convert to numpy array and all_f[:, 1] for rs all_f[:, 0]. Used for debugging. """ ...
Add module for global debug variables.
Add module for global debug variables.
Python
mit
jensv/fluxtubestability,jensv/fluxtubestability
Add module for global debug variables.
# -*- coding: utf-8 -*- """ Created on Tue Feb 03 10:28:37 2015 @author: Jens von der Linden global variables all_f and all_g save value of f,g and r each time an f_func, or g_func is called. In the form [r, f]. To call fs convert to numpy array and all_f[:, 1] for rs all_f[:, 0]. Used for debugging. """ ...
<commit_before><commit_msg>Add module for global debug variables.<commit_after>
# -*- coding: utf-8 -*- """ Created on Tue Feb 03 10:28:37 2015 @author: Jens von der Linden global variables all_f and all_g save value of f,g and r each time an f_func, or g_func is called. In the form [r, f]. To call fs convert to numpy array and all_f[:, 1] for rs all_f[:, 0]. Used for debugging. """ ...
Add module for global debug variables.# -*- coding: utf-8 -*- """ Created on Tue Feb 03 10:28:37 2015 @author: Jens von der Linden global variables all_f and all_g save value of f,g and r each time an f_func, or g_func is called. In the form [r, f]. To call fs convert to numpy array and all_f[:, 1] for rs a...
<commit_before><commit_msg>Add module for global debug variables.<commit_after># -*- coding: utf-8 -*- """ Created on Tue Feb 03 10:28:37 2015 @author: Jens von der Linden global variables all_f and all_g save value of f,g and r each time an f_func, or g_func is called. In the form [r, f]. To call fs conver...
e5798a7cca03a733c5bef2cdba735ea5a60b1424
fabfile.py
fabfile.py
from fabric.api import * """ Overview ======== This fabric file automates the process of pip packaging and deploying your new pip package to our private pip repository. Requirements ------------ - Must have fabric installed via `pip install fabric` - Must have your setup.py working ...
Add fabric.py helper script back
Add fabric.py helper script back
Python
mit
istresearch/traptor,istresearch/traptor
Add fabric.py helper script back
from fabric.api import * """ Overview ======== This fabric file automates the process of pip packaging and deploying your new pip package to our private pip repository. Requirements ------------ - Must have fabric installed via `pip install fabric` - Must have your setup.py working ...
<commit_before><commit_msg>Add fabric.py helper script back<commit_after>
from fabric.api import * """ Overview ======== This fabric file automates the process of pip packaging and deploying your new pip package to our private pip repository. Requirements ------------ - Must have fabric installed via `pip install fabric` - Must have your setup.py working ...
Add fabric.py helper script backfrom fabric.api import * """ Overview ======== This fabric file automates the process of pip packaging and deploying your new pip package to our private pip repository. Requirements ------------ - Must have fabric installed via `pip install fabric` - ...
<commit_before><commit_msg>Add fabric.py helper script back<commit_after>from fabric.api import * """ Overview ======== This fabric file automates the process of pip packaging and deploying your new pip package to our private pip repository. Requirements ------------ - Must have fabric ...
56e2088505d9c70f1e6df204eec4f05d05de3f93
tests/test_driller.py
tests/test_driller.py
import nose import driller import logging l = logging.getLogger("driller.tests.test_driller") import os bin_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries')) def test_drilling_cgc(): ''' test drilling on the cgc binary, palindrome. ''' binary = "cgc_scored_e...
Add a simple test case to driller
Add a simple test case to driller
Python
bsd-2-clause
shellphish/driller
Add a simple test case to driller
import nose import driller import logging l = logging.getLogger("driller.tests.test_driller") import os bin_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries')) def test_drilling_cgc(): ''' test drilling on the cgc binary, palindrome. ''' binary = "cgc_scored_e...
<commit_before><commit_msg>Add a simple test case to driller<commit_after>
import nose import driller import logging l = logging.getLogger("driller.tests.test_driller") import os bin_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries')) def test_drilling_cgc(): ''' test drilling on the cgc binary, palindrome. ''' binary = "cgc_scored_e...
Add a simple test case to drillerimport nose import driller import logging l = logging.getLogger("driller.tests.test_driller") import os bin_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries')) def test_drilling_cgc(): ''' test drilling on the cgc binary, palindrome. ...
<commit_before><commit_msg>Add a simple test case to driller<commit_after>import nose import driller import logging l = logging.getLogger("driller.tests.test_driller") import os bin_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries')) def test_drilling_cgc(): ''' test d...
f3169011a9225161d004d4318aaf1375c109b0d6
tools/lcp_from_csv.py
tools/lcp_from_csv.py
#!./venv/bin/python import argparse import csv import datetime import sys import re from collections import namedtuple from blag import create_app, db from blag.models import HikeDestination, Hike DATE_FORMAT = '%d.%m.%Y' COORDINATE_FORMAT = re.compile(r'^([0-9.-]+),\s*([0-9.-]+)$') METHOD_MAP = { 'fots': 'foot'...
Add script to load peaks from csv
Add script to load peaks from csv
Python
mit
thusoy/blag,thusoy/blag,thusoy/blag,thusoy/blag
Add script to load peaks from csv
#!./venv/bin/python import argparse import csv import datetime import sys import re from collections import namedtuple from blag import create_app, db from blag.models import HikeDestination, Hike DATE_FORMAT = '%d.%m.%Y' COORDINATE_FORMAT = re.compile(r'^([0-9.-]+),\s*([0-9.-]+)$') METHOD_MAP = { 'fots': 'foot'...
<commit_before><commit_msg>Add script to load peaks from csv<commit_after>
#!./venv/bin/python import argparse import csv import datetime import sys import re from collections import namedtuple from blag import create_app, db from blag.models import HikeDestination, Hike DATE_FORMAT = '%d.%m.%Y' COORDINATE_FORMAT = re.compile(r'^([0-9.-]+),\s*([0-9.-]+)$') METHOD_MAP = { 'fots': 'foot'...
Add script to load peaks from csv#!./venv/bin/python import argparse import csv import datetime import sys import re from collections import namedtuple from blag import create_app, db from blag.models import HikeDestination, Hike DATE_FORMAT = '%d.%m.%Y' COORDINATE_FORMAT = re.compile(r'^([0-9.-]+),\s*([0-9.-]+)$') ...
<commit_before><commit_msg>Add script to load peaks from csv<commit_after>#!./venv/bin/python import argparse import csv import datetime import sys import re from collections import namedtuple from blag import create_app, db from blag.models import HikeDestination, Hike DATE_FORMAT = '%d.%m.%Y' COORDINATE_FORMAT = r...
5235f0eea27360e9891bc905329f8e5fd2e51a4c
src/Scripts/wc-history.py
src/Scripts/wc-history.py
import subprocess # Get history of linecount by date. repo_dir = '/Users/visualstudio/dev/bf-count-lines' def get_num_lines(): # find_cmd = 'find inc src test tools -name "*.cpp" -o -name "*.h" | xargs wc'.split() find_cmd = 'find inc src test tools -name "*.cpp" -o -name "*.h" | grep -v Data | xargs wc' ...
Add quick script to get history of wc.
Add quick script to get history of wc.
Python
mit
BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,danluu/BitFunnel
Add quick script to get history of wc.
import subprocess # Get history of linecount by date. repo_dir = '/Users/visualstudio/dev/bf-count-lines' def get_num_lines(): # find_cmd = 'find inc src test tools -name "*.cpp" -o -name "*.h" | xargs wc'.split() find_cmd = 'find inc src test tools -name "*.cpp" -o -name "*.h" | grep -v Data | xargs wc' ...
<commit_before><commit_msg>Add quick script to get history of wc.<commit_after>
import subprocess # Get history of linecount by date. repo_dir = '/Users/visualstudio/dev/bf-count-lines' def get_num_lines(): # find_cmd = 'find inc src test tools -name "*.cpp" -o -name "*.h" | xargs wc'.split() find_cmd = 'find inc src test tools -name "*.cpp" -o -name "*.h" | grep -v Data | xargs wc' ...
Add quick script to get history of wc.import subprocess # Get history of linecount by date. repo_dir = '/Users/visualstudio/dev/bf-count-lines' def get_num_lines(): # find_cmd = 'find inc src test tools -name "*.cpp" -o -name "*.h" | xargs wc'.split() find_cmd = 'find inc src test tools -name "*.cpp" -o -nam...
<commit_before><commit_msg>Add quick script to get history of wc.<commit_after>import subprocess # Get history of linecount by date. repo_dir = '/Users/visualstudio/dev/bf-count-lines' def get_num_lines(): # find_cmd = 'find inc src test tools -name "*.cpp" -o -name "*.h" | xargs wc'.split() find_cmd = 'find...
04dac71a79e1526ae25350413015c24ee67d608b
fabric/colors.py
fabric/colors.py
""" Functions for wrapping strings in ANSI color codes. """ def _wrap_with(code): def inner(s, bold=False): c = code if bold: c = "1;%s" % c return "\033[%sm%s\033[0m" % (c, s) return inner red = _wrap_with('31') green = _wrap_with('32') yellow = _wrap_with('33') blue = _wr...
Add tiny experimental color library.
Add tiny experimental color library. Re #101.
Python
bsd-2-clause
pgroudas/fabric,rbramwell/fabric,getsentry/fabric,kmonsoor/fabric,ericholscher/fabric,SamuelMarks/fabric,bitmonk/fabric,haridsv/fabric,cmattoon/fabric,jaraco/fabric,rane-hs/fabric-py3,tolbkni/fabric,qinrong/fabric,MjAbuz/fabric,xLegoz/fabric,raimon49/fabric,akaariai/fabric,rodrigc/fabric,mathiasertl/fabric,pashinin/fab...
Add tiny experimental color library. Re #101.
""" Functions for wrapping strings in ANSI color codes. """ def _wrap_with(code): def inner(s, bold=False): c = code if bold: c = "1;%s" % c return "\033[%sm%s\033[0m" % (c, s) return inner red = _wrap_with('31') green = _wrap_with('32') yellow = _wrap_with('33') blue = _wr...
<commit_before><commit_msg>Add tiny experimental color library. Re #101.<commit_after>
""" Functions for wrapping strings in ANSI color codes. """ def _wrap_with(code): def inner(s, bold=False): c = code if bold: c = "1;%s" % c return "\033[%sm%s\033[0m" % (c, s) return inner red = _wrap_with('31') green = _wrap_with('32') yellow = _wrap_with('33') blue = _wr...
Add tiny experimental color library. Re #101.""" Functions for wrapping strings in ANSI color codes. """ def _wrap_with(code): def inner(s, bold=False): c = code if bold: c = "1;%s" % c return "\033[%sm%s\033[0m" % (c, s) return inner red = _wrap_with('31') green = _wrap_w...
<commit_before><commit_msg>Add tiny experimental color library. Re #101.<commit_after>""" Functions for wrapping strings in ANSI color codes. """ def _wrap_with(code): def inner(s, bold=False): c = code if bold: c = "1;%s" % c return "\033[%sm%s\033[0m" % (c, s) return inne...
ca458444856dde7af337c3abb10e8913faaed88a
src/ggrc_workflows/migrations/versions/20150423173706_2b89912f95f1_add_notification_entries_for_existng_.py
src/ggrc_workflows/migrations/versions/20150423173706_2b89912f95f1_add_notification_entries_for_existng_.py
"""add notification entries for existng workflows Revision ID: 2b89912f95f1 Revises: 27b09c761b4e Create Date: 2015-04-23 17:37:06.366115 """ from datetime import date from sqlalchemy import and_ from ggrc import db from ggrc.models import Notification from ggrc_workflows.models import CycleTaskGroupObjectTask, Wor...
Add notifications for all existing objects
Add notifications for all existing objects We assume that the past notifications have not been sent, so we need to add notifications for all future cycle starts and task due dates.
Python
apache-2.0
josthkko/ggrc-core,j0gurt/ggrc-core,jmakov/ggrc-core,edofic/ggrc-core,hasanalom/ggrc-core,hyperNURb/ggrc-core,selahssea/ggrc-core,andrei-karalionak/ggrc-core,edofic/ggrc-core,vladan-m/ggrc-core,VinnieJohns/ggrc-core,jmakov/ggrc-core,vladan-m/ggrc-core,jmakov/ggrc-core,hasanalom/ggrc-core,josthkko/ggrc-core,selahssea/gg...
Add notifications for all existing objects We assume that the past notifications have not been sent, so we need to add notifications for all future cycle starts and task due dates.
"""add notification entries for existng workflows Revision ID: 2b89912f95f1 Revises: 27b09c761b4e Create Date: 2015-04-23 17:37:06.366115 """ from datetime import date from sqlalchemy import and_ from ggrc import db from ggrc.models import Notification from ggrc_workflows.models import CycleTaskGroupObjectTask, Wor...
<commit_before><commit_msg>Add notifications for all existing objects We assume that the past notifications have not been sent, so we need to add notifications for all future cycle starts and task due dates.<commit_after>
"""add notification entries for existng workflows Revision ID: 2b89912f95f1 Revises: 27b09c761b4e Create Date: 2015-04-23 17:37:06.366115 """ from datetime import date from sqlalchemy import and_ from ggrc import db from ggrc.models import Notification from ggrc_workflows.models import CycleTaskGroupObjectTask, Wor...
Add notifications for all existing objects We assume that the past notifications have not been sent, so we need to add notifications for all future cycle starts and task due dates. """add notification entries for existng workflows Revision ID: 2b89912f95f1 Revises: 27b09c761b4e Create Date: 2015-04-23 17:37:06.366115...
<commit_before><commit_msg>Add notifications for all existing objects We assume that the past notifications have not been sent, so we need to add notifications for all future cycle starts and task due dates.<commit_after> """add notification entries for existng workflows Revision ID: 2b89912f95f1 Revises: 27b09c761b4...
98548ce5da63dc10d31e3d8f93d4ea99ccae1f48
tests/machines/merge_overlapping_intervals/vim_merge_overlapping_intervals_test.py
tests/machines/merge_overlapping_intervals/vim_merge_overlapping_intervals_test.py
import subprocess from vim_turing_machine.machines.merge_overlapping_intervals.decode_intervals import decode_intervals from vim_turing_machine.machines.merge_overlapping_intervals.encode_intervals import encode_intervals from vim_turing_machine.machines.merge_overlapping_intervals.merge_overlapping_intervals import M...
Add an integration test for the vim machine.
Add an integration test for the vim machine.
Python
mit
ealter/vim_turing_machine,ealter/vim_turing_machine
Add an integration test for the vim machine.
import subprocess from vim_turing_machine.machines.merge_overlapping_intervals.decode_intervals import decode_intervals from vim_turing_machine.machines.merge_overlapping_intervals.encode_intervals import encode_intervals from vim_turing_machine.machines.merge_overlapping_intervals.merge_overlapping_intervals import M...
<commit_before><commit_msg>Add an integration test for the vim machine.<commit_after>
import subprocess from vim_turing_machine.machines.merge_overlapping_intervals.decode_intervals import decode_intervals from vim_turing_machine.machines.merge_overlapping_intervals.encode_intervals import encode_intervals from vim_turing_machine.machines.merge_overlapping_intervals.merge_overlapping_intervals import M...
Add an integration test for the vim machine.import subprocess from vim_turing_machine.machines.merge_overlapping_intervals.decode_intervals import decode_intervals from vim_turing_machine.machines.merge_overlapping_intervals.encode_intervals import encode_intervals from vim_turing_machine.machines.merge_overlapping_in...
<commit_before><commit_msg>Add an integration test for the vim machine.<commit_after>import subprocess from vim_turing_machine.machines.merge_overlapping_intervals.decode_intervals import decode_intervals from vim_turing_machine.machines.merge_overlapping_intervals.encode_intervals import encode_intervals from vim_tur...
9f552d9df9ea850a178ced2b16d57e5e8849a8fe
tools/perf/page_sets/page_set_unittest.py
tools/perf/page_sets/page_set_unittest.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 os from telemetry.unittest import page_set_smoke_test class PageSetUnitTest(page_set_smoke_test.PageSetSmokeTest): def testSmoke(self): page...
# 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 os from telemetry import decorators from telemetry.unittest import page_set_smoke_test class PageSetUnitTest(page_set_smoke_test.PageSetSmokeTest):...
Disable failing testSmoke on cros.
Disable failing testSmoke on cros. BUG=386416 TEST=bots Review URL: https://codereview.chromium.org/336953004 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@280661 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
ondra-novak/chromium.src,dednal/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,axinging/chromium-crosswalk,jaruba/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/ch...
# 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 os from telemetry.unittest import page_set_smoke_test class PageSetUnitTest(page_set_smoke_test.PageSetSmokeTest): def testSmoke(self): page...
# 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 os from telemetry import decorators from telemetry.unittest import page_set_smoke_test class PageSetUnitTest(page_set_smoke_test.PageSetSmokeTest):...
<commit_before># 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 os from telemetry.unittest import page_set_smoke_test class PageSetUnitTest(page_set_smoke_test.PageSetSmokeTest): def testSmoke(...
# 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 os from telemetry import decorators from telemetry.unittest import page_set_smoke_test class PageSetUnitTest(page_set_smoke_test.PageSetSmokeTest):...
# 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 os from telemetry.unittest import page_set_smoke_test class PageSetUnitTest(page_set_smoke_test.PageSetSmokeTest): def testSmoke(self): page...
<commit_before># 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 os from telemetry.unittest import page_set_smoke_test class PageSetUnitTest(page_set_smoke_test.PageSetSmokeTest): def testSmoke(...
83cadc5fa67536316b9f00a6a16eadbe6e3f927b
common/test/acceptance/accessibility/test_lms_dashboard_axs.py
common/test/acceptance/accessibility/test_lms_dashboard_axs.py
""" Accessibility tests for LMS dashboard page. Run just this test with: SELENIUM_BROWSER=phantomjs paver test_bokchoy -d accessibility -t test_lms_dashboard_axs.py """ from ..tests.lms.test_lms_dashboard import LmsDashboardPageTest class LmsDashboardAxsTest(LmsDashboardPageTest): """ Class to test lms stude...
Add a11y test for lms student dashboard
Add a11y test for lms student dashboard
Python
agpl-3.0
nagyistoce/edx-platform,jonathan-beard/edx-platform,jbzdak/edx-platform,romain-li/edx-platform,jbassen/edx-platform,chand3040/cloud_that,kamalx/edx-platform,J861449197/edx-platform,louyihua/edx-platform,martynovp/edx-platform,cpennington/edx-platform,nagyistoce/edx-platform,caesar2164/edx-platform,shashank971/edx-platf...
Add a11y test for lms student dashboard
""" Accessibility tests for LMS dashboard page. Run just this test with: SELENIUM_BROWSER=phantomjs paver test_bokchoy -d accessibility -t test_lms_dashboard_axs.py """ from ..tests.lms.test_lms_dashboard import LmsDashboardPageTest class LmsDashboardAxsTest(LmsDashboardPageTest): """ Class to test lms stude...
<commit_before><commit_msg>Add a11y test for lms student dashboard<commit_after>
""" Accessibility tests for LMS dashboard page. Run just this test with: SELENIUM_BROWSER=phantomjs paver test_bokchoy -d accessibility -t test_lms_dashboard_axs.py """ from ..tests.lms.test_lms_dashboard import LmsDashboardPageTest class LmsDashboardAxsTest(LmsDashboardPageTest): """ Class to test lms stude...
Add a11y test for lms student dashboard""" Accessibility tests for LMS dashboard page. Run just this test with: SELENIUM_BROWSER=phantomjs paver test_bokchoy -d accessibility -t test_lms_dashboard_axs.py """ from ..tests.lms.test_lms_dashboard import LmsDashboardPageTest class LmsDashboardAxsTest(LmsDashboardPageTes...
<commit_before><commit_msg>Add a11y test for lms student dashboard<commit_after>""" Accessibility tests for LMS dashboard page. Run just this test with: SELENIUM_BROWSER=phantomjs paver test_bokchoy -d accessibility -t test_lms_dashboard_axs.py """ from ..tests.lms.test_lms_dashboard import LmsDashboardPageTest clas...
a38b49d40a10efe27e46a3c703bef4db1d24a3bb
ec2/launch_instance.py
ec2/launch_instance.py
#!/usr/bin/env python ''' Start new ec2 instance with open ssh port ''' __author__ = "Leonid Vasilyev, <vsleonid@gmail.com>" import json import os import sys import time from datetime import datetime import boto import boto.ec2 # based on http://cloud-images.ubuntu.com/releases/precise/release/ INSTANCE_CONFIG = ...
Add script to lauch ec2 instance
Add script to lauch ec2 instance
Python
apache-2.0
lvsl/go-to
Add script to lauch ec2 instance
#!/usr/bin/env python ''' Start new ec2 instance with open ssh port ''' __author__ = "Leonid Vasilyev, <vsleonid@gmail.com>" import json import os import sys import time from datetime import datetime import boto import boto.ec2 # based on http://cloud-images.ubuntu.com/releases/precise/release/ INSTANCE_CONFIG = ...
<commit_before><commit_msg>Add script to lauch ec2 instance<commit_after>
#!/usr/bin/env python ''' Start new ec2 instance with open ssh port ''' __author__ = "Leonid Vasilyev, <vsleonid@gmail.com>" import json import os import sys import time from datetime import datetime import boto import boto.ec2 # based on http://cloud-images.ubuntu.com/releases/precise/release/ INSTANCE_CONFIG = ...
Add script to lauch ec2 instance#!/usr/bin/env python ''' Start new ec2 instance with open ssh port ''' __author__ = "Leonid Vasilyev, <vsleonid@gmail.com>" import json import os import sys import time from datetime import datetime import boto import boto.ec2 # based on http://cloud-images.ubuntu.com/releases/pre...
<commit_before><commit_msg>Add script to lauch ec2 instance<commit_after>#!/usr/bin/env python ''' Start new ec2 instance with open ssh port ''' __author__ = "Leonid Vasilyev, <vsleonid@gmail.com>" import json import os import sys import time from datetime import datetime import boto import boto.ec2 # based on ht...
b1371dc1501da997de7777f32918b920de3a4f3f
state_machine.py
state_machine.py
from enum import Enum class match_state(Enum): state_P1_win = 0 state_P2_win = 1 state_tie = 2 state_betting_open = 3 state_regular_match = 4 state_invalid = 5 def function_P1_win(): pass def function_P2_win(): pass def function_tie(): pass def function_betting_open(): pass...
Add skeleton code for state machine
Add skeleton code for state machine State machine module will be implemented to allow for better unit testing. We can better test each individual match mode using this method.
Python
mit
Jacobinski/SaltBot
Add skeleton code for state machine State machine module will be implemented to allow for better unit testing. We can better test each individual match mode using this method.
from enum import Enum class match_state(Enum): state_P1_win = 0 state_P2_win = 1 state_tie = 2 state_betting_open = 3 state_regular_match = 4 state_invalid = 5 def function_P1_win(): pass def function_P2_win(): pass def function_tie(): pass def function_betting_open(): pass...
<commit_before><commit_msg>Add skeleton code for state machine State machine module will be implemented to allow for better unit testing. We can better test each individual match mode using this method.<commit_after>
from enum import Enum class match_state(Enum): state_P1_win = 0 state_P2_win = 1 state_tie = 2 state_betting_open = 3 state_regular_match = 4 state_invalid = 5 def function_P1_win(): pass def function_P2_win(): pass def function_tie(): pass def function_betting_open(): pass...
Add skeleton code for state machine State machine module will be implemented to allow for better unit testing. We can better test each individual match mode using this method.from enum import Enum class match_state(Enum): state_P1_win = 0 state_P2_win = 1 state_tie = 2 state_betting_open = 3 state...
<commit_before><commit_msg>Add skeleton code for state machine State machine module will be implemented to allow for better unit testing. We can better test each individual match mode using this method.<commit_after>from enum import Enum class match_state(Enum): state_P1_win = 0 state_P2_win = 1 state_tie...
bbbb707b842d7069e77ae9dc99de246caf314a44
openstack_dashboard/enabled/_1610_orchestration_panel_group.py
openstack_dashboard/enabled/_1610_orchestration_panel_group.py
from django.utils.translation import ugettext_lazy as _ # The slug of the panel group to be added to HORIZON_CONFIG. Required. PANEL_GROUP = 'orchestration' # The display name of the PANEL_GROUP. Required. PANEL_GROUP_NAME = _('Ochestration') # The slug of the dashboard the PANEL_GROUP associated with. Required. PANEL...
from django.utils.translation import ugettext_lazy as _ # The slug of the panel group to be added to HORIZON_CONFIG. Required. PANEL_GROUP = 'orchestration' # The display name of the PANEL_GROUP. Required. PANEL_GROUP_NAME = _('Orchestration') # The slug of the dashboard the PANEL_GROUP associated with. Required. PANE...
Fix the misspell Ochestration to Orchestration
Fix the misspell Ochestration to Orchestration Now the 'Ochestration' is misspell This patch fix it Change-Id: I7723354d23f31f3320439ae025c561082bb95115
Python
apache-2.0
NeCTAR-RC/horizon,NeCTAR-RC/horizon,Tesora/tesora-horizon,openstack/horizon,redhat-openstack/horizon,BiznetGIO/horizon,karthik-suresh/horizon,anthonydillon/horizon,yeming233/horizon,redhat-cip/horizon,tqtran7/horizon,endorphinl/horizon-fork,gerrive/horizon,Dark-Hacker/horizon,takeshineshiro/horizon,philoniare/horizon,d...
from django.utils.translation import ugettext_lazy as _ # The slug of the panel group to be added to HORIZON_CONFIG. Required. PANEL_GROUP = 'orchestration' # The display name of the PANEL_GROUP. Required. PANEL_GROUP_NAME = _('Ochestration') # The slug of the dashboard the PANEL_GROUP associated with. Required. PANEL...
from django.utils.translation import ugettext_lazy as _ # The slug of the panel group to be added to HORIZON_CONFIG. Required. PANEL_GROUP = 'orchestration' # The display name of the PANEL_GROUP. Required. PANEL_GROUP_NAME = _('Orchestration') # The slug of the dashboard the PANEL_GROUP associated with. Required. PANE...
<commit_before>from django.utils.translation import ugettext_lazy as _ # The slug of the panel group to be added to HORIZON_CONFIG. Required. PANEL_GROUP = 'orchestration' # The display name of the PANEL_GROUP. Required. PANEL_GROUP_NAME = _('Ochestration') # The slug of the dashboard the PANEL_GROUP associated with. ...
from django.utils.translation import ugettext_lazy as _ # The slug of the panel group to be added to HORIZON_CONFIG. Required. PANEL_GROUP = 'orchestration' # The display name of the PANEL_GROUP. Required. PANEL_GROUP_NAME = _('Orchestration') # The slug of the dashboard the PANEL_GROUP associated with. Required. PANE...
from django.utils.translation import ugettext_lazy as _ # The slug of the panel group to be added to HORIZON_CONFIG. Required. PANEL_GROUP = 'orchestration' # The display name of the PANEL_GROUP. Required. PANEL_GROUP_NAME = _('Ochestration') # The slug of the dashboard the PANEL_GROUP associated with. Required. PANEL...
<commit_before>from django.utils.translation import ugettext_lazy as _ # The slug of the panel group to be added to HORIZON_CONFIG. Required. PANEL_GROUP = 'orchestration' # The display name of the PANEL_GROUP. Required. PANEL_GROUP_NAME = _('Ochestration') # The slug of the dashboard the PANEL_GROUP associated with. ...
14147d9db9760b378b0cc924fcecbe11a75ebda0
examples/bot_vs_bot.py
examples/bot_vs_bot.py
import sc2 from sc2 import Race from sc2.player import Bot from zerg_rush import ZergRushBot def main(): sc2.run_game(sc2.maps.get("Abyssal Reef LE"), [ Bot(Race.Zerg, ZergRushBot()), Bot(Race.Zerg, ZergRushBot()) ], realtime=False) if __name__ == '__main__': main()
Add bot vs bot example
Add bot vs bot example
Python
mit
Dentosal/python-sc2
Add bot vs bot example
import sc2 from sc2 import Race from sc2.player import Bot from zerg_rush import ZergRushBot def main(): sc2.run_game(sc2.maps.get("Abyssal Reef LE"), [ Bot(Race.Zerg, ZergRushBot()), Bot(Race.Zerg, ZergRushBot()) ], realtime=False) if __name__ == '__main__': main()
<commit_before><commit_msg>Add bot vs bot example<commit_after>
import sc2 from sc2 import Race from sc2.player import Bot from zerg_rush import ZergRushBot def main(): sc2.run_game(sc2.maps.get("Abyssal Reef LE"), [ Bot(Race.Zerg, ZergRushBot()), Bot(Race.Zerg, ZergRushBot()) ], realtime=False) if __name__ == '__main__': main()
Add bot vs bot exampleimport sc2 from sc2 import Race from sc2.player import Bot from zerg_rush import ZergRushBot def main(): sc2.run_game(sc2.maps.get("Abyssal Reef LE"), [ Bot(Race.Zerg, ZergRushBot()), Bot(Race.Zerg, ZergRushBot()) ], realtime=False) if __name__ == '__main__': main()
<commit_before><commit_msg>Add bot vs bot example<commit_after>import sc2 from sc2 import Race from sc2.player import Bot from zerg_rush import ZergRushBot def main(): sc2.run_game(sc2.maps.get("Abyssal Reef LE"), [ Bot(Race.Zerg, ZergRushBot()), Bot(Race.Zerg, ZergRushBot()) ], realtime=False...
cef547a9f05fc39ee667606b6561ea3f106a7018
spacy/tests/serialize/test_serialize_tensorizer.py
spacy/tests/serialize/test_serialize_tensorizer.py
# coding: utf-8 from __future__ import unicode_literals from ..util import make_tempdir from ...pipeline import TokenVectorEncoder as Tensorizer import pytest def test_serialize_tensorizer_roundtrip_bytes(en_vocab): tensorizer = Tensorizer(en_vocab) tensorizer.model = tensorizer.Model() tensorizer_b = t...
Add serialization tests for tensorizer
Add serialization tests for tensorizer
Python
mit
spacy-io/spaCy,recognai/spaCy,recognai/spaCy,explosion/spaCy,recognai/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,honnibal/spaCy,aikramer2/spaCy,explosion/spaCy,spacy-io/spaCy,recognai/spaCy,honnibal/spaCy,aikramer2/spaCy,aikramer2/spaCy,aikramer2/spaCy,recognai/spaCy,spacy-io/sp...
Add serialization tests for tensorizer
# coding: utf-8 from __future__ import unicode_literals from ..util import make_tempdir from ...pipeline import TokenVectorEncoder as Tensorizer import pytest def test_serialize_tensorizer_roundtrip_bytes(en_vocab): tensorizer = Tensorizer(en_vocab) tensorizer.model = tensorizer.Model() tensorizer_b = t...
<commit_before><commit_msg>Add serialization tests for tensorizer<commit_after>
# coding: utf-8 from __future__ import unicode_literals from ..util import make_tempdir from ...pipeline import TokenVectorEncoder as Tensorizer import pytest def test_serialize_tensorizer_roundtrip_bytes(en_vocab): tensorizer = Tensorizer(en_vocab) tensorizer.model = tensorizer.Model() tensorizer_b = t...
Add serialization tests for tensorizer# coding: utf-8 from __future__ import unicode_literals from ..util import make_tempdir from ...pipeline import TokenVectorEncoder as Tensorizer import pytest def test_serialize_tensorizer_roundtrip_bytes(en_vocab): tensorizer = Tensorizer(en_vocab) tensorizer.model = t...
<commit_before><commit_msg>Add serialization tests for tensorizer<commit_after># coding: utf-8 from __future__ import unicode_literals from ..util import make_tempdir from ...pipeline import TokenVectorEncoder as Tensorizer import pytest def test_serialize_tensorizer_roundtrip_bytes(en_vocab): tensorizer = Tens...
6ad2a6b20762ebeb842a0d75a4000fc6246d4770
two-factor-authentication/verify-webhook/verify-webhook.6.x.py
two-factor-authentication/verify-webhook/verify-webhook.6.x.py
import base64 import hashlib import hmac from django.conf import settings from django.http import HttpResponseForbidden from functools import wraps try: from urllib.parse import urlencode except ImportError: from urllib import urlencode def validate_authy_request(f): """Validates that incoming requests g...
Add verify 2FA webhook signature Python snippet
Add verify 2FA webhook signature Python snippet
Python
mit
TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets
Add verify 2FA webhook signature Python snippet
import base64 import hashlib import hmac from django.conf import settings from django.http import HttpResponseForbidden from functools import wraps try: from urllib.parse import urlencode except ImportError: from urllib import urlencode def validate_authy_request(f): """Validates that incoming requests g...
<commit_before><commit_msg>Add verify 2FA webhook signature Python snippet<commit_after>
import base64 import hashlib import hmac from django.conf import settings from django.http import HttpResponseForbidden from functools import wraps try: from urllib.parse import urlencode except ImportError: from urllib import urlencode def validate_authy_request(f): """Validates that incoming requests g...
Add verify 2FA webhook signature Python snippetimport base64 import hashlib import hmac from django.conf import settings from django.http import HttpResponseForbidden from functools import wraps try: from urllib.parse import urlencode except ImportError: from urllib import urlencode def validate_authy_reques...
<commit_before><commit_msg>Add verify 2FA webhook signature Python snippet<commit_after>import base64 import hashlib import hmac from django.conf import settings from django.http import HttpResponseForbidden from functools import wraps try: from urllib.parse import urlencode except ImportError: from urllib imp...
d5528f5d5a5a24cdc77e87fcadaa3450fe6d3e3e
playbooks/appsemblerFiles/metalogixUserReport.py
playbooks/appsemblerFiles/metalogixUserReport.py
""" First do the following: ssh to the Metalogix server ``` (if necessary): sudo mv /tmp/metalogix_users.csv /tmp/metalogix_users.(date).csv sudo su edxapp -s /bin/bash cd ~/edx-platform source ~/edxapp_env ./manage.py lms 6002exportusers.csv --settings=aws_appsembler ``` This will output the file transfer_users.txt...
Add a custom user report generation script for Metalogix, with instructions.
Add a custom user report generation script for Metalogix, with instructions.
Python
agpl-3.0
appsembler/configuration,appsembler/configuration,appsembler/configuration,appsembler/configuration
Add a custom user report generation script for Metalogix, with instructions.
""" First do the following: ssh to the Metalogix server ``` (if necessary): sudo mv /tmp/metalogix_users.csv /tmp/metalogix_users.(date).csv sudo su edxapp -s /bin/bash cd ~/edx-platform source ~/edxapp_env ./manage.py lms 6002exportusers.csv --settings=aws_appsembler ``` This will output the file transfer_users.txt...
<commit_before><commit_msg>Add a custom user report generation script for Metalogix, with instructions.<commit_after>
""" First do the following: ssh to the Metalogix server ``` (if necessary): sudo mv /tmp/metalogix_users.csv /tmp/metalogix_users.(date).csv sudo su edxapp -s /bin/bash cd ~/edx-platform source ~/edxapp_env ./manage.py lms 6002exportusers.csv --settings=aws_appsembler ``` This will output the file transfer_users.txt...
Add a custom user report generation script for Metalogix, with instructions.""" First do the following: ssh to the Metalogix server ``` (if necessary): sudo mv /tmp/metalogix_users.csv /tmp/metalogix_users.(date).csv sudo su edxapp -s /bin/bash cd ~/edx-platform source ~/edxapp_env ./manage.py lms 6002exportusers.csv...
<commit_before><commit_msg>Add a custom user report generation script for Metalogix, with instructions.<commit_after>""" First do the following: ssh to the Metalogix server ``` (if necessary): sudo mv /tmp/metalogix_users.csv /tmp/metalogix_users.(date).csv sudo su edxapp -s /bin/bash cd ~/edx-platform source ~/edxap...
f0d24586e962078d87a7fad190435bdd17405c8f
labonneboite/alembic/versions/36188da1a919_allow_empty_alternance_email_in_save.py
labonneboite/alembic/versions/36188da1a919_allow_empty_alternance_email_in_save.py
""" Allow empty alternance email in SAVE Revision ID: 36188da1a919 Revises: 6a40b75d390a Create Date: 2021-07-19 10:33:57.780826 """ from alembic import op from sqlalchemy.dialects import mysql import sqlalchemy as sa # Revision identifiers, used by Alembic. revision = '36188da1a919' down_revision = '6a40b75d390a' b...
Allow empty alterance_email in save tables
Allow empty alterance_email in save tables
Python
agpl-3.0
StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite
Allow empty alterance_email in save tables
""" Allow empty alternance email in SAVE Revision ID: 36188da1a919 Revises: 6a40b75d390a Create Date: 2021-07-19 10:33:57.780826 """ from alembic import op from sqlalchemy.dialects import mysql import sqlalchemy as sa # Revision identifiers, used by Alembic. revision = '36188da1a919' down_revision = '6a40b75d390a' b...
<commit_before><commit_msg>Allow empty alterance_email in save tables<commit_after>
""" Allow empty alternance email in SAVE Revision ID: 36188da1a919 Revises: 6a40b75d390a Create Date: 2021-07-19 10:33:57.780826 """ from alembic import op from sqlalchemy.dialects import mysql import sqlalchemy as sa # Revision identifiers, used by Alembic. revision = '36188da1a919' down_revision = '6a40b75d390a' b...
Allow empty alterance_email in save tables""" Allow empty alternance email in SAVE Revision ID: 36188da1a919 Revises: 6a40b75d390a Create Date: 2021-07-19 10:33:57.780826 """ from alembic import op from sqlalchemy.dialects import mysql import sqlalchemy as sa # Revision identifiers, used by Alembic. revision = '3618...
<commit_before><commit_msg>Allow empty alterance_email in save tables<commit_after>""" Allow empty alternance email in SAVE Revision ID: 36188da1a919 Revises: 6a40b75d390a Create Date: 2021-07-19 10:33:57.780826 """ from alembic import op from sqlalchemy.dialects import mysql import sqlalchemy as sa # Revision ident...
edeaca9bbf1e6f65f11b1e7d1c892c5fd28113a4
bluebottle/clients/management/commands/migrate_start_project.py
bluebottle/clients/management/commands/migrate_start_project.py
from django.core.management.base import BaseCommand from django.db import connection from django.utils.timezone import now from django.contrib.contenttypes.models import ContentType from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant f...
Add import script for start project pages
Add import script for start project pages
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
Add import script for start project pages
from django.core.management.base import BaseCommand from django.db import connection from django.utils.timezone import now from django.contrib.contenttypes.models import ContentType from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant f...
<commit_before><commit_msg>Add import script for start project pages<commit_after>
from django.core.management.base import BaseCommand from django.db import connection from django.utils.timezone import now from django.contrib.contenttypes.models import ContentType from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant f...
Add import script for start project pagesfrom django.core.management.base import BaseCommand from django.db import connection from django.utils.timezone import now from django.contrib.contenttypes.models import ContentType from bluebottle.clients import properties from bluebottle.clients.models import Client from blue...
<commit_before><commit_msg>Add import script for start project pages<commit_after>from django.core.management.base import BaseCommand from django.db import connection from django.utils.timezone import now from django.contrib.contenttypes.models import ContentType from bluebottle.clients import properties from bluebott...
2cf7faf06739eafc30ec6eacb6ded88c898053f1
fabfile.py
fabfile.py
from urllib import request, response import json def can_access(api_key): req = request.Request('https://api.vultr.com/v1/auth/info') req.add_header('API-Key', api_key) try: with request.urlopen(req) as f: data = f.read() if not data: print('Read data fail....
Check if can access vultr.
Check if can access vultr.
Python
apache-2.0
yingxuanxuan/fabric_script
Check if can access vultr.
from urllib import request, response import json def can_access(api_key): req = request.Request('https://api.vultr.com/v1/auth/info') req.add_header('API-Key', api_key) try: with request.urlopen(req) as f: data = f.read() if not data: print('Read data fail....
<commit_before><commit_msg>Check if can access vultr.<commit_after>
from urllib import request, response import json def can_access(api_key): req = request.Request('https://api.vultr.com/v1/auth/info') req.add_header('API-Key', api_key) try: with request.urlopen(req) as f: data = f.read() if not data: print('Read data fail....
Check if can access vultr.from urllib import request, response import json def can_access(api_key): req = request.Request('https://api.vultr.com/v1/auth/info') req.add_header('API-Key', api_key) try: with request.urlopen(req) as f: data = f.read() if not data: ...
<commit_before><commit_msg>Check if can access vultr.<commit_after>from urllib import request, response import json def can_access(api_key): req = request.Request('https://api.vultr.com/v1/auth/info') req.add_header('API-Key', api_key) try: with request.urlopen(req) as f: data = f.rea...
2a7569a20c1840f81d0baf04d9849601ce51e77a
fabfile.py
fabfile.py
""" Deploy Freesound Explorer to labs.freesound.org (required Pythons's fabric installed) """ from __future__ import with_statement from fabric.api import * from fabric.contrib.files import put env.hosts = ['ffont@fs-labs.s.upf.edu'] remote_dir = '/homedtic/ffont/apps/freesound-explorer' def __copy_static(): wi...
Add deploy script using Fabric
Add deploy script using Fabric
Python
mit
ffont/freesound-explorer,ffont/freesound-explorer,ffont/freesound-explorer
Add deploy script using Fabric
""" Deploy Freesound Explorer to labs.freesound.org (required Pythons's fabric installed) """ from __future__ import with_statement from fabric.api import * from fabric.contrib.files import put env.hosts = ['ffont@fs-labs.s.upf.edu'] remote_dir = '/homedtic/ffont/apps/freesound-explorer' def __copy_static(): wi...
<commit_before><commit_msg>Add deploy script using Fabric<commit_after>
""" Deploy Freesound Explorer to labs.freesound.org (required Pythons's fabric installed) """ from __future__ import with_statement from fabric.api import * from fabric.contrib.files import put env.hosts = ['ffont@fs-labs.s.upf.edu'] remote_dir = '/homedtic/ffont/apps/freesound-explorer' def __copy_static(): wi...
Add deploy script using Fabric""" Deploy Freesound Explorer to labs.freesound.org (required Pythons's fabric installed) """ from __future__ import with_statement from fabric.api import * from fabric.contrib.files import put env.hosts = ['ffont@fs-labs.s.upf.edu'] remote_dir = '/homedtic/ffont/apps/freesound-explorer...
<commit_before><commit_msg>Add deploy script using Fabric<commit_after>""" Deploy Freesound Explorer to labs.freesound.org (required Pythons's fabric installed) """ from __future__ import with_statement from fabric.api import * from fabric.contrib.files import put env.hosts = ['ffont@fs-labs.s.upf.edu'] remote_dir =...
6091954f98410c006457875b45f3faf094f2bc78
tests/custom_test_case.py
tests/custom_test_case.py
class CustomTestCase(object): def assertSentence(self, result, expected): try: self.assertEqual(result, expected) except AssertionError as e: e.args = (e.args[0].replace("\\n", "\n"),) # edit the exception's message raise
Add CustomTestCase class to format output of assertEqual
Add CustomTestCase class to format output of assertEqual
Python
mit
kyamaguchi/SublimeObjC2RubyMotion,kyamaguchi/SublimeObjC2RubyMotion
Add CustomTestCase class to format output of assertEqual
class CustomTestCase(object): def assertSentence(self, result, expected): try: self.assertEqual(result, expected) except AssertionError as e: e.args = (e.args[0].replace("\\n", "\n"),) # edit the exception's message raise
<commit_before><commit_msg>Add CustomTestCase class to format output of assertEqual<commit_after>
class CustomTestCase(object): def assertSentence(self, result, expected): try: self.assertEqual(result, expected) except AssertionError as e: e.args = (e.args[0].replace("\\n", "\n"),) # edit the exception's message raise
Add CustomTestCase class to format output of assertEqualclass CustomTestCase(object): def assertSentence(self, result, expected): try: self.assertEqual(result, expected) except AssertionError as e: e.args = (e.args[0].replace("\\n", "\n"),) # edit the exception's message ...
<commit_before><commit_msg>Add CustomTestCase class to format output of assertEqual<commit_after>class CustomTestCase(object): def assertSentence(self, result, expected): try: self.assertEqual(result, expected) except AssertionError as e: e.args = (e.args[0].replace("\\n", "\...
56da76bd91d937576f94576c0e9ac5136c6da4a8
emission/tests/netTests/TestPipeline.py
emission/tests/netTests/TestPipeline.py
import unittest import logging import arrow import os import emission.core.get_database as edb import emission.core.wrapper.localdate as ecwl import emission.tests.common as etc from emission.net.api import pipeline class TestPipeline(unittest.TestCase): def setUp(self): etc.setupRealExample(self, ...
Add a unit test for the pipeline range query
Add a unit test for the pipeline range query So we can check for 1c113c005b260a13bd93c33bf9b033184c2f0ea5 going forward
Python
bsd-3-clause
shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server
Add a unit test for the pipeline range query So we can check for 1c113c005b260a13bd93c33bf9b033184c2f0ea5 going forward
import unittest import logging import arrow import os import emission.core.get_database as edb import emission.core.wrapper.localdate as ecwl import emission.tests.common as etc from emission.net.api import pipeline class TestPipeline(unittest.TestCase): def setUp(self): etc.setupRealExample(self, ...
<commit_before><commit_msg>Add a unit test for the pipeline range query So we can check for 1c113c005b260a13bd93c33bf9b033184c2f0ea5 going forward<commit_after>
import unittest import logging import arrow import os import emission.core.get_database as edb import emission.core.wrapper.localdate as ecwl import emission.tests.common as etc from emission.net.api import pipeline class TestPipeline(unittest.TestCase): def setUp(self): etc.setupRealExample(self, ...
Add a unit test for the pipeline range query So we can check for 1c113c005b260a13bd93c33bf9b033184c2f0ea5 going forwardimport unittest import logging import arrow import os import emission.core.get_database as edb import emission.core.wrapper.localdate as ecwl import emission.tests.common as etc from emission.net.ap...
<commit_before><commit_msg>Add a unit test for the pipeline range query So we can check for 1c113c005b260a13bd93c33bf9b033184c2f0ea5 going forward<commit_after>import unittest import logging import arrow import os import emission.core.get_database as edb import emission.core.wrapper.localdate as ecwl import emission....
6130ef75adf9755ab63f82a9dc98d9be29e2b9bc
models/classifier.py
models/classifier.py
# coding: utf-8 # # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
Add file missed in previous commit.
Add file missed in previous commit.
Python
apache-2.0
asandyz/oppia,danieljjh/oppia,wangsai/oppia,brianrodri/oppia,BenHenning/oppia,prasanna08/oppia,google-code-export/oppia,felipecocco/oppia,AllanYangZhou/oppia,rackstar17/oppia,toooooper/oppia,oppia/oppia,MaximLich/oppia,VictoriaRoux/oppia,Cgruppo/oppia,kingctan/oppia,bjvoth/oppia,gale320/oppia,Atlas-Sailed-Co/oppia,goog...
Add file missed in previous commit.
# coding: utf-8 # # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
<commit_before><commit_msg>Add file missed in previous commit.<commit_after>
# coding: utf-8 # # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
Add file missed in previous commit.# coding: utf-8 # # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/...
<commit_before><commit_msg>Add file missed in previous commit.<commit_after># coding: utf-8 # # Copyright 2013 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...
18a4732ef1f2de5cbfcd61905a609a4ae4eb73e9
numba/cuda/tests/cudadrv/test_managed_alloc.py
numba/cuda/tests/cudadrv/test_managed_alloc.py
import numpy as np from numba.cuda.cudadrv import driver from numba import cuda from numba.cuda.testing import unittest, ContextResettingTestCase from numba.cuda.testing import skip_on_cudasim @skip_on_cudasim('CUDA Driver API unsupported in the simulator') class TestManagedAlloc(ContextResettingTestCase): def te...
Add test for managed alloc
Add test for managed alloc
Python
bsd-2-clause
seibert/numba,numba/numba,gmarkall/numba,IntelLabs/numba,gmarkall/numba,numba/numba,stonebig/numba,IntelLabs/numba,numba/numba,stonebig/numba,numba/numba,stonebig/numba,IntelLabs/numba,cpcloud/numba,stuartarchibald/numba,gmarkall/numba,stuartarchibald/numba,stuartarchibald/numba,seibert/numba,IntelLabs/numba,IntelLabs/...
Add test for managed alloc
import numpy as np from numba.cuda.cudadrv import driver from numba import cuda from numba.cuda.testing import unittest, ContextResettingTestCase from numba.cuda.testing import skip_on_cudasim @skip_on_cudasim('CUDA Driver API unsupported in the simulator') class TestManagedAlloc(ContextResettingTestCase): def te...
<commit_before><commit_msg>Add test for managed alloc<commit_after>
import numpy as np from numba.cuda.cudadrv import driver from numba import cuda from numba.cuda.testing import unittest, ContextResettingTestCase from numba.cuda.testing import skip_on_cudasim @skip_on_cudasim('CUDA Driver API unsupported in the simulator') class TestManagedAlloc(ContextResettingTestCase): def te...
Add test for managed allocimport numpy as np from numba.cuda.cudadrv import driver from numba import cuda from numba.cuda.testing import unittest, ContextResettingTestCase from numba.cuda.testing import skip_on_cudasim @skip_on_cudasim('CUDA Driver API unsupported in the simulator') class TestManagedAlloc(ContextRese...
<commit_before><commit_msg>Add test for managed alloc<commit_after>import numpy as np from numba.cuda.cudadrv import driver from numba import cuda from numba.cuda.testing import unittest, ContextResettingTestCase from numba.cuda.testing import skip_on_cudasim @skip_on_cudasim('CUDA Driver API unsupported in the simul...
1102db025fd41b91d9cfa1ce93dddd72da47926c
py/most-frequent-subtree-sum.py
py/most-frequent-subtree-sum.py
from collections import Counter # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def top_down(self, cur, c): if cur: lsum = self.top_down(cur.left, c)...
Add py solution for 508. Most Frequent Subtree Sum
Add py solution for 508. Most Frequent Subtree Sum 508. Most Frequent Subtree Sum: https://leetcode.com/problems/most-frequent-subtree-sum/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 508. Most Frequent Subtree Sum 508. Most Frequent Subtree Sum: https://leetcode.com/problems/most-frequent-subtree-sum/
from collections import Counter # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def top_down(self, cur, c): if cur: lsum = self.top_down(cur.left, c)...
<commit_before><commit_msg>Add py solution for 508. Most Frequent Subtree Sum 508. Most Frequent Subtree Sum: https://leetcode.com/problems/most-frequent-subtree-sum/<commit_after>
from collections import Counter # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def top_down(self, cur, c): if cur: lsum = self.top_down(cur.left, c)...
Add py solution for 508. Most Frequent Subtree Sum 508. Most Frequent Subtree Sum: https://leetcode.com/problems/most-frequent-subtree-sum/from collections import Counter # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # ...
<commit_before><commit_msg>Add py solution for 508. Most Frequent Subtree Sum 508. Most Frequent Subtree Sum: https://leetcode.com/problems/most-frequent-subtree-sum/<commit_after>from collections import Counter # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self....
bf86fcc000c4bfc085bf198afcec9440b065aeeb
queen/positioning/__init__.py
queen/positioning/__init__.py
class Position(object): """Represents a postion and orientation in the arena.""" def __init__(self, x, y, r=0): self.x = x self.y = y self.r = r % 360 def same_area(self, position, tolerance=1.0): """Returns whether the position is aproximately equal to the given position within said tolerance.""" t = ...
Add positioning module and Position object.
Add positioning module and Position object.
Python
mit
kalail/queen,kalail/queen
Add positioning module and Position object.
class Position(object): """Represents a postion and orientation in the arena.""" def __init__(self, x, y, r=0): self.x = x self.y = y self.r = r % 360 def same_area(self, position, tolerance=1.0): """Returns whether the position is aproximately equal to the given position within said tolerance.""" t = ...
<commit_before><commit_msg>Add positioning module and Position object.<commit_after>
class Position(object): """Represents a postion and orientation in the arena.""" def __init__(self, x, y, r=0): self.x = x self.y = y self.r = r % 360 def same_area(self, position, tolerance=1.0): """Returns whether the position is aproximately equal to the given position within said tolerance.""" t = ...
Add positioning module and Position object. class Position(object): """Represents a postion and orientation in the arena.""" def __init__(self, x, y, r=0): self.x = x self.y = y self.r = r % 360 def same_area(self, position, tolerance=1.0): """Returns whether the position is aproximately equal to the given...
<commit_before><commit_msg>Add positioning module and Position object.<commit_after> class Position(object): """Represents a postion and orientation in the arena.""" def __init__(self, x, y, r=0): self.x = x self.y = y self.r = r % 360 def same_area(self, position, tolerance=1.0): """Returns whether the po...
5bab5673e120e0e4bdb48a55e69bb5ae30e2269e
vimiv/image_enhance.py
vimiv/image_enhance.py
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4 """Wrapper functions for the _image_enhance C extension.""" from gi.repository import Gdk from vimiv import _image_enhance def enhance_bc(pixbuf, brightness, contrast): """Enhance brightness and contrast of a GdkPixbuf.Pixbuf. Args: pixbuf: Original ...
Add python wrapper for C extension
Add python wrapper for C extension
Python
mit
karlch/vimiv,karlch/vimiv,karlch/vimiv
Add python wrapper for C extension
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4 """Wrapper functions for the _image_enhance C extension.""" from gi.repository import Gdk from vimiv import _image_enhance def enhance_bc(pixbuf, brightness, contrast): """Enhance brightness and contrast of a GdkPixbuf.Pixbuf. Args: pixbuf: Original ...
<commit_before><commit_msg>Add python wrapper for C extension<commit_after>
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4 """Wrapper functions for the _image_enhance C extension.""" from gi.repository import Gdk from vimiv import _image_enhance def enhance_bc(pixbuf, brightness, contrast): """Enhance brightness and contrast of a GdkPixbuf.Pixbuf. Args: pixbuf: Original ...
Add python wrapper for C extension# vim: ft=python fileencoding=utf-8 sw=4 et sts=4 """Wrapper functions for the _image_enhance C extension.""" from gi.repository import Gdk from vimiv import _image_enhance def enhance_bc(pixbuf, brightness, contrast): """Enhance brightness and contrast of a GdkPixbuf.Pixbuf. ...
<commit_before><commit_msg>Add python wrapper for C extension<commit_after># vim: ft=python fileencoding=utf-8 sw=4 et sts=4 """Wrapper functions for the _image_enhance C extension.""" from gi.repository import Gdk from vimiv import _image_enhance def enhance_bc(pixbuf, brightness, contrast): """Enhance brightne...
62a6ce74ec6b27a89e6f903385c0fbd91a8a0db7
relay-bot/xrepeat.py
relay-bot/xrepeat.py
import os,sys,xmpp currentUser = None xmppClient = None nicks = {} ###### Bot Command def commandNick(): pass def commandHelp(client, user): message = """ !help - See this menu. !nick <new name> - Change nick name. """ client.send(xmpp.Message(user, message)) ###### Bot Logic def parseCommand(client, ...
Add XMPP relay message bot.
Add XMPP relay message bot.
Python
mit
llun/wordpress-authenticator
Add XMPP relay message bot.
import os,sys,xmpp currentUser = None xmppClient = None nicks = {} ###### Bot Command def commandNick(): pass def commandHelp(client, user): message = """ !help - See this menu. !nick <new name> - Change nick name. """ client.send(xmpp.Message(user, message)) ###### Bot Logic def parseCommand(client, ...
<commit_before><commit_msg>Add XMPP relay message bot.<commit_after>
import os,sys,xmpp currentUser = None xmppClient = None nicks = {} ###### Bot Command def commandNick(): pass def commandHelp(client, user): message = """ !help - See this menu. !nick <new name> - Change nick name. """ client.send(xmpp.Message(user, message)) ###### Bot Logic def parseCommand(client, ...
Add XMPP relay message bot.import os,sys,xmpp currentUser = None xmppClient = None nicks = {} ###### Bot Command def commandNick(): pass def commandHelp(client, user): message = """ !help - See this menu. !nick <new name> - Change nick name. """ client.send(xmpp.Message(user, message)) ###### Bot Logi...
<commit_before><commit_msg>Add XMPP relay message bot.<commit_after>import os,sys,xmpp currentUser = None xmppClient = None nicks = {} ###### Bot Command def commandNick(): pass def commandHelp(client, user): message = """ !help - See this menu. !nick <new name> - Change nick name. """ client.send(xmpp...
1831accb7250b157639f9fc254b33b2976a4f0b7
tests/test_plugin.py
tests/test_plugin.py
from pathlib import Path from ckanext.nhm.plugin import NHMPlugin def test_download_modify_email_templates(): plugin = NHMPlugin() original_plain = 'original plain' original_html = 'original html' base = Path(__file__).parent.parent / 'ckanext' / 'nhm' / 'src' / 'download_emails' with (base / '...
Test plugin integration with IVersionedDatastoreDownloads
Test plugin integration with IVersionedDatastoreDownloads
Python
mit
NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm
Test plugin integration with IVersionedDatastoreDownloads
from pathlib import Path from ckanext.nhm.plugin import NHMPlugin def test_download_modify_email_templates(): plugin = NHMPlugin() original_plain = 'original plain' original_html = 'original html' base = Path(__file__).parent.parent / 'ckanext' / 'nhm' / 'src' / 'download_emails' with (base / '...
<commit_before><commit_msg>Test plugin integration with IVersionedDatastoreDownloads<commit_after>
from pathlib import Path from ckanext.nhm.plugin import NHMPlugin def test_download_modify_email_templates(): plugin = NHMPlugin() original_plain = 'original plain' original_html = 'original html' base = Path(__file__).parent.parent / 'ckanext' / 'nhm' / 'src' / 'download_emails' with (base / '...
Test plugin integration with IVersionedDatastoreDownloadsfrom pathlib import Path from ckanext.nhm.plugin import NHMPlugin def test_download_modify_email_templates(): plugin = NHMPlugin() original_plain = 'original plain' original_html = 'original html' base = Path(__file__).parent.parent / 'ckanex...
<commit_before><commit_msg>Test plugin integration with IVersionedDatastoreDownloads<commit_after>from pathlib import Path from ckanext.nhm.plugin import NHMPlugin def test_download_modify_email_templates(): plugin = NHMPlugin() original_plain = 'original plain' original_html = 'original html' base...
2c4dad9f2249aafd6aa57faf4d8435ba29f97aa6
tests/convergence_tests/spheres_multiple_lspr.py
tests/convergence_tests/spheres_multiple_lspr.py
import numpy from convergence_lspr import (run_convergence, picklesave, pickleload, report_results, richardson_extrapolation_lspr, mesh_multiple) def main(): print('{:-^60}'.format('Running sphere_multiple_lspr test')) try: test_outputs = pick...
Add covnergence test for multiple spheres
Add covnergence test for multiple spheres
Python
bsd-3-clause
barbagroup/pygbe,barbagroup/pygbe,barbagroup/pygbe
Add covnergence test for multiple spheres
import numpy from convergence_lspr import (run_convergence, picklesave, pickleload, report_results, richardson_extrapolation_lspr, mesh_multiple) def main(): print('{:-^60}'.format('Running sphere_multiple_lspr test')) try: test_outputs = pick...
<commit_before><commit_msg>Add covnergence test for multiple spheres<commit_after>
import numpy from convergence_lspr import (run_convergence, picklesave, pickleload, report_results, richardson_extrapolation_lspr, mesh_multiple) def main(): print('{:-^60}'.format('Running sphere_multiple_lspr test')) try: test_outputs = pick...
Add covnergence test for multiple spheresimport numpy from convergence_lspr import (run_convergence, picklesave, pickleload, report_results, richardson_extrapolation_lspr, mesh_multiple) def main(): print('{:-^60}'.format('Running sphere_multiple_lspr tes...
<commit_before><commit_msg>Add covnergence test for multiple spheres<commit_after>import numpy from convergence_lspr import (run_convergence, picklesave, pickleload, report_results, richardson_extrapolation_lspr, mesh_multiple) def main(): print('{:-^60}'...
4c34cb983b0ef009472bdd00cdb24ba9588161c0
fileconv/tests/strip_js_comments.py
fileconv/tests/strip_js_comments.py
import re reexpr = r""" ( # Capture code (?: "(?:\\.|[^"\\])*" # String literal | '(?:\\.|[^'\\])*' # String literal | (?:[^/\n"']|/[^/*\n"'])+ # Any code besides newlines or string literals (es...
Add a (weird) test file for testing the javascript comment stripping
Add a (weird) test file for testing the javascript comment stripping I had this on my drive anyway so why not just add it to the repo.
Python
mit
SublimeText/AAAPackageDev,SublimeText/AAAPackageDev,SublimeText/PackageDev
Add a (weird) test file for testing the javascript comment stripping I had this on my drive anyway so why not just add it to the repo.
import re reexpr = r""" ( # Capture code (?: "(?:\\.|[^"\\])*" # String literal | '(?:\\.|[^'\\])*' # String literal | (?:[^/\n"']|/[^/*\n"'])+ # Any code besides newlines or string literals (es...
<commit_before><commit_msg>Add a (weird) test file for testing the javascript comment stripping I had this on my drive anyway so why not just add it to the repo.<commit_after>
import re reexpr = r""" ( # Capture code (?: "(?:\\.|[^"\\])*" # String literal | '(?:\\.|[^'\\])*' # String literal | (?:[^/\n"']|/[^/*\n"'])+ # Any code besides newlines or string literals (es...
Add a (weird) test file for testing the javascript comment stripping I had this on my drive anyway so why not just add it to the repo.import re reexpr = r""" ( # Capture code (?: "(?:\\.|[^"\\])*" # String literal | '(?:\\.|[^'\\]...
<commit_before><commit_msg>Add a (weird) test file for testing the javascript comment stripping I had this on my drive anyway so why not just add it to the repo.<commit_after>import re reexpr = r""" ( # Capture code (?: "(?:\\.|[^"\\])*" # String literal...
84c581b61eecc4599bce5bff66276f94a8aa31d7
setup.py
setup.py
from distutils.core import setup setup( name='pyxdevkit', version='0.1dev', packages=['pyxdevkit',], license='MIT', author='T.J. Corley', author_email='tjcorley30@hotmail.com', description='xdevkit for python.', long_description=open('README.MD').read(), )
from distutils.core import setup setup( name='pyxdevkit', version='0.1dev', packages=['pyxdevkit',], license='MIT', author='T.J. Corley', author_email='tjcorley30@hotmail.com', description='xdevkit for python.', long_description=open('README.md').read(), )
Make README file extension lowercase so build will pass on case sensitive systems
Make README file extension lowercase so build will pass on case sensitive systems
Python
mit
Fire30/pyxdevkit
from distutils.core import setup setup( name='pyxdevkit', version='0.1dev', packages=['pyxdevkit',], license='MIT', author='T.J. Corley', author_email='tjcorley30@hotmail.com', description='xdevkit for python.', long_description=open('README.MD').read(), )Make README file extension lowe...
from distutils.core import setup setup( name='pyxdevkit', version='0.1dev', packages=['pyxdevkit',], license='MIT', author='T.J. Corley', author_email='tjcorley30@hotmail.com', description='xdevkit for python.', long_description=open('README.md').read(), )
<commit_before>from distutils.core import setup setup( name='pyxdevkit', version='0.1dev', packages=['pyxdevkit',], license='MIT', author='T.J. Corley', author_email='tjcorley30@hotmail.com', description='xdevkit for python.', long_description=open('README.MD').read(), )<commit_msg>Make...
from distutils.core import setup setup( name='pyxdevkit', version='0.1dev', packages=['pyxdevkit',], license='MIT', author='T.J. Corley', author_email='tjcorley30@hotmail.com', description='xdevkit for python.', long_description=open('README.md').read(), )
from distutils.core import setup setup( name='pyxdevkit', version='0.1dev', packages=['pyxdevkit',], license='MIT', author='T.J. Corley', author_email='tjcorley30@hotmail.com', description='xdevkit for python.', long_description=open('README.MD').read(), )Make README file extension lowe...
<commit_before>from distutils.core import setup setup( name='pyxdevkit', version='0.1dev', packages=['pyxdevkit',], license='MIT', author='T.J. Corley', author_email='tjcorley30@hotmail.com', description='xdevkit for python.', long_description=open('README.MD').read(), )<commit_msg>Make...
e6d081d6b13ddd0c3384a942e431e630f9805bde
ci/download_appveyor.py
ci/download_appveyor.py
#!/usr/bin/env python # Downloads AppVeyor artifacts to the local directory. # # This script is a bit hacky. But it gets the job done. import sys import requests def make_request(session, path): url = 'https://ci.appveyor.com/api/%s' % path return session.get(url) def download_artifacts(project): ses...
Add script to download AppVeyor artifacts
Add script to download AppVeyor artifacts
Python
bsd-3-clause
terrelln/python-zstandard,indygreg/python-zstandard,indygreg/python-zstandard,indygreg/python-zstandard,terrelln/python-zstandard,terrelln/python-zstandard,terrelln/python-zstandard,indygreg/python-zstandard
Add script to download AppVeyor artifacts
#!/usr/bin/env python # Downloads AppVeyor artifacts to the local directory. # # This script is a bit hacky. But it gets the job done. import sys import requests def make_request(session, path): url = 'https://ci.appveyor.com/api/%s' % path return session.get(url) def download_artifacts(project): ses...
<commit_before><commit_msg>Add script to download AppVeyor artifacts<commit_after>
#!/usr/bin/env python # Downloads AppVeyor artifacts to the local directory. # # This script is a bit hacky. But it gets the job done. import sys import requests def make_request(session, path): url = 'https://ci.appveyor.com/api/%s' % path return session.get(url) def download_artifacts(project): ses...
Add script to download AppVeyor artifacts#!/usr/bin/env python # Downloads AppVeyor artifacts to the local directory. # # This script is a bit hacky. But it gets the job done. import sys import requests def make_request(session, path): url = 'https://ci.appveyor.com/api/%s' % path return session.get(url) ...
<commit_before><commit_msg>Add script to download AppVeyor artifacts<commit_after>#!/usr/bin/env python # Downloads AppVeyor artifacts to the local directory. # # This script is a bit hacky. But it gets the job done. import sys import requests def make_request(session, path): url = 'https://ci.appveyor.com/api...
f543c113f86773f95e30920e1837764f9c5972a0
sympy/core/tests/test_noncommutative.py
sympy/core/tests/test_noncommutative.py
"""Tests for noncommutative symbols and expressions.""" from sympy import ( conjugate, expand, factor, radsimp, simplify, symbols, I, ) from sympy.abc import x, y, z A, B, C = symbols("A B C", commutative=False) X, Y = symbols("X Y", commutative=False, real=True) Z = X + I*Y def test_comp...
Add tests for noncommutative symbols.
Add tests for noncommutative symbols. - complex - conjugate - expand - factor - radsimp - simplify - subs
Python
bsd-3-clause
Sumith1896/sympy,chaffra/sympy,maniteja123/sympy,pandeyadarsh/sympy,kumarkrishna/sympy,sahmed95/sympy,lidavidm/sympy,mcdaniel67/sympy,ga7g08/sympy,postvakje/sympy,garvitr/sympy,iamutkarshtiwari/sympy,dqnykamp/sympy,atreyv/sympy,madan96/sympy,atreyv/sympy,postvakje/sympy,MridulS/sympy,chaffra/sympy,souravsingh/sympy,mob...
Add tests for noncommutative symbols. - complex - conjugate - expand - factor - radsimp - simplify - subs
"""Tests for noncommutative symbols and expressions.""" from sympy import ( conjugate, expand, factor, radsimp, simplify, symbols, I, ) from sympy.abc import x, y, z A, B, C = symbols("A B C", commutative=False) X, Y = symbols("X Y", commutative=False, real=True) Z = X + I*Y def test_comp...
<commit_before><commit_msg>Add tests for noncommutative symbols. - complex - conjugate - expand - factor - radsimp - simplify - subs<commit_after>
"""Tests for noncommutative symbols and expressions.""" from sympy import ( conjugate, expand, factor, radsimp, simplify, symbols, I, ) from sympy.abc import x, y, z A, B, C = symbols("A B C", commutative=False) X, Y = symbols("X Y", commutative=False, real=True) Z = X + I*Y def test_comp...
Add tests for noncommutative symbols. - complex - conjugate - expand - factor - radsimp - simplify - subs"""Tests for noncommutative symbols and expressions.""" from sympy import ( conjugate, expand, factor, radsimp, simplify, symbols, I, ) from sympy.abc import x, y, z A, B...
<commit_before><commit_msg>Add tests for noncommutative symbols. - complex - conjugate - expand - factor - radsimp - simplify - subs<commit_after>"""Tests for noncommutative symbols and expressions.""" from sympy import ( conjugate, expand, factor, radsimp, simplify, symbols, ...
0e3bbd218c5617ac915a19bbfb2707793c0f907b
scripts/first_admin_levels.py
scripts/first_admin_levels.py
#!/usr/bin/env python import csv import json states = set() with open('2015_06_29_NNHS_2015_Selected EA_Final.xlsx - EA_2015.csv') as csvfile: reader = csv.reader(csvfile, delimiter=',') next(reader) for row in reader: state = row[0] if not state: continue states.add(s...
Add first admin levels script
Add first admin levels script Connects #573.
Python
agpl-3.0
eHealthAfrica/nutsurv,johanneswilm/eha-nutsurv-django,eHealthAfrica/nutsurv,johanneswilm/eha-nutsurv-django,eHealthAfrica/nutsurv,johanneswilm/eha-nutsurv-django
Add first admin levels script Connects #573.
#!/usr/bin/env python import csv import json states = set() with open('2015_06_29_NNHS_2015_Selected EA_Final.xlsx - EA_2015.csv') as csvfile: reader = csv.reader(csvfile, delimiter=',') next(reader) for row in reader: state = row[0] if not state: continue states.add(s...
<commit_before><commit_msg>Add first admin levels script Connects #573.<commit_after>
#!/usr/bin/env python import csv import json states = set() with open('2015_06_29_NNHS_2015_Selected EA_Final.xlsx - EA_2015.csv') as csvfile: reader = csv.reader(csvfile, delimiter=',') next(reader) for row in reader: state = row[0] if not state: continue states.add(s...
Add first admin levels script Connects #573.#!/usr/bin/env python import csv import json states = set() with open('2015_06_29_NNHS_2015_Selected EA_Final.xlsx - EA_2015.csv') as csvfile: reader = csv.reader(csvfile, delimiter=',') next(reader) for row in reader: state = row[0] if not sta...
<commit_before><commit_msg>Add first admin levels script Connects #573.<commit_after>#!/usr/bin/env python import csv import json states = set() with open('2015_06_29_NNHS_2015_Selected EA_Final.xlsx - EA_2015.csv') as csvfile: reader = csv.reader(csvfile, delimiter=',') next(reader) for row in reader: ...
1b92aa6fae1c2e7b9ad232bd69cf87d720fb57aa
integration_tests/test_null_sink.py
integration_tests/test_null_sink.py
#! /usr/bin/python from nose.tools import assert_false import os import tables import numpy as np from tools import check_cmd """ Tests """ def test_null_sink(): """ Testing for null sink case without a source facility """ #Cyclus simulation input for null sink testing sim_input = "./inputs/null_sink.xml"...
Add tests for null sink developed previously in cycamore repository
Add tests for null sink developed previously in cycamore repository
Python
bsd-3-clause
gidden/cyclus,rwcarlsen/cyclus,mbmcgarry/cyclus,gidden/cyclus,rwcarlsen/cyclus,rwcarlsen/cyclus,hodger/cyclus,mbmcgarry/cyclus,hodger/cyclus,mbmcgarry/cyclus,Baaaaam/cyclus,gidden/cyclus,gidden/cyclus,hodger/cyclus,Baaaaam/cyclus,mbmcgarry/cyclus,hodger/cyclus,hodger/cyclus,Baaaaam/cyclus,rwcarlsen/cyclus
Add tests for null sink developed previously in cycamore repository
#! /usr/bin/python from nose.tools import assert_false import os import tables import numpy as np from tools import check_cmd """ Tests """ def test_null_sink(): """ Testing for null sink case without a source facility """ #Cyclus simulation input for null sink testing sim_input = "./inputs/null_sink.xml"...
<commit_before><commit_msg>Add tests for null sink developed previously in cycamore repository<commit_after>
#! /usr/bin/python from nose.tools import assert_false import os import tables import numpy as np from tools import check_cmd """ Tests """ def test_null_sink(): """ Testing for null sink case without a source facility """ #Cyclus simulation input for null sink testing sim_input = "./inputs/null_sink.xml"...
Add tests for null sink developed previously in cycamore repository#! /usr/bin/python from nose.tools import assert_false import os import tables import numpy as np from tools import check_cmd """ Tests """ def test_null_sink(): """ Testing for null sink case without a source facility """ #Cyclus simulation i...
<commit_before><commit_msg>Add tests for null sink developed previously in cycamore repository<commit_after>#! /usr/bin/python from nose.tools import assert_false import os import tables import numpy as np from tools import check_cmd """ Tests """ def test_null_sink(): """ Testing for null sink case without a sou...
1a2e53744422b674e1b96107e79b824174e3f642
pattern_recognition.py
pattern_recognition.py
def constant(diffs): val = diffs.pop() for d in diffs: if d != val: return False return val def pat1(seq): # consider two elements at a time diffs = [] for i in xrange(1, len(seq)): diffs.append( seq[i] - seq[i-1] ) # implicit directionality - factor...
Define a basic interface and successfully recognize +2 pattern
Define a basic interface and successfully recognize +2 pattern
Python
mit
bpetering/python-pattern-recognition
Define a basic interface and successfully recognize +2 pattern
def constant(diffs): val = diffs.pop() for d in diffs: if d != val: return False return val def pat1(seq): # consider two elements at a time diffs = [] for i in xrange(1, len(seq)): diffs.append( seq[i] - seq[i-1] ) # implicit directionality - factor...
<commit_before><commit_msg>Define a basic interface and successfully recognize +2 pattern<commit_after>
def constant(diffs): val = diffs.pop() for d in diffs: if d != val: return False return val def pat1(seq): # consider two elements at a time diffs = [] for i in xrange(1, len(seq)): diffs.append( seq[i] - seq[i-1] ) # implicit directionality - factor...
Define a basic interface and successfully recognize +2 patterndef constant(diffs): val = diffs.pop() for d in diffs: if d != val: return False return val def pat1(seq): # consider two elements at a time diffs = [] for i in xrange(1, len(seq)): diffs.append...
<commit_before><commit_msg>Define a basic interface and successfully recognize +2 pattern<commit_after>def constant(diffs): val = diffs.pop() for d in diffs: if d != val: return False return val def pat1(seq): # consider two elements at a time diffs = [] for i in x...
a482c3e938db1d7fc15d0c28da0fbd4f230803af
lab_mip.py
lab_mip.py
# Copyright 2016 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
Add file with usage of Mixed Integer Programming with Pulp
Add file with usage of Mixed Integer Programming with Pulp
Python
apache-2.0
rustyrobot/bareon-dynamic-allocator,rustyrobot/bareon-allocator,rustyrobot/bareon-allocator,rustyrobot/bareon-dynamic-allocator
Add file with usage of Mixed Integer Programming with Pulp
# Copyright 2016 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
<commit_before><commit_msg>Add file with usage of Mixed Integer Programming with Pulp<commit_after>
# Copyright 2016 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
Add file with usage of Mixed Integer Programming with Pulp# Copyright 2016 Mirantis, 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/license...
<commit_before><commit_msg>Add file with usage of Mixed Integer Programming with Pulp<commit_after># Copyright 2016 Mirantis, 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 ...
a969f342137485dbb6f212bc1aa320770aac1421
cub200_2011_dataset.py
cub200_2011_dataset.py
# -*- coding: utf-8 -*- """ Created on Sat Feb 11 00:57:05 2017 @author: sakurai """ from fuel.datasets import H5PYDataset from fuel.utils import find_in_data_path from fuel.schemes import SequentialScheme from fuel.streams import DataStream class Cub200_2011Dataset(H5PYDataset): _filename = 'cub200_2011/cub20...
Add fuel dataset for CUB200_2011
Add fuel dataset for CUB200_2011
Python
mit
ronekko/deep_metric_learning
Add fuel dataset for CUB200_2011
# -*- coding: utf-8 -*- """ Created on Sat Feb 11 00:57:05 2017 @author: sakurai """ from fuel.datasets import H5PYDataset from fuel.utils import find_in_data_path from fuel.schemes import SequentialScheme from fuel.streams import DataStream class Cub200_2011Dataset(H5PYDataset): _filename = 'cub200_2011/cub20...
<commit_before><commit_msg>Add fuel dataset for CUB200_2011<commit_after>
# -*- coding: utf-8 -*- """ Created on Sat Feb 11 00:57:05 2017 @author: sakurai """ from fuel.datasets import H5PYDataset from fuel.utils import find_in_data_path from fuel.schemes import SequentialScheme from fuel.streams import DataStream class Cub200_2011Dataset(H5PYDataset): _filename = 'cub200_2011/cub20...
Add fuel dataset for CUB200_2011# -*- coding: utf-8 -*- """ Created on Sat Feb 11 00:57:05 2017 @author: sakurai """ from fuel.datasets import H5PYDataset from fuel.utils import find_in_data_path from fuel.schemes import SequentialScheme from fuel.streams import DataStream class Cub200_2011Dataset(H5PYDataset): ...
<commit_before><commit_msg>Add fuel dataset for CUB200_2011<commit_after># -*- coding: utf-8 -*- """ Created on Sat Feb 11 00:57:05 2017 @author: sakurai """ from fuel.datasets import H5PYDataset from fuel.utils import find_in_data_path from fuel.schemes import SequentialScheme from fuel.streams import DataStream c...
627852019b915f9d34f7d036c90f6a1d8307df53
tests/basics/builtin_compile.py
tests/basics/builtin_compile.py
# test compile builtin try: compile except NameError: print("SKIP") import sys sys.exit() c = compile("print(x)", "file", "exec") try: exec(c) except NameError: print("NameError") x = 1 exec(c) exec(c, {"x":2}) exec(c, {}, {"x":3})
Add test for compile builtin.
tests: Add test for compile builtin.
Python
mit
tralamazza/micropython,SungEun-Steve-Kim/test-mp,swegener/micropython,pfalcon/micropython,turbinenreiter/micropython,ceramos/micropython,ericsnowcurrently/micropython,cwyark/micropython,henriknelson/micropython,torwag/micropython,AriZuu/micropython,tobbad/micropython,matthewelse/micropython,Timmenem/micropython,KISSMon...
tests: Add test for compile builtin.
# test compile builtin try: compile except NameError: print("SKIP") import sys sys.exit() c = compile("print(x)", "file", "exec") try: exec(c) except NameError: print("NameError") x = 1 exec(c) exec(c, {"x":2}) exec(c, {}, {"x":3})
<commit_before><commit_msg>tests: Add test for compile builtin.<commit_after>
# test compile builtin try: compile except NameError: print("SKIP") import sys sys.exit() c = compile("print(x)", "file", "exec") try: exec(c) except NameError: print("NameError") x = 1 exec(c) exec(c, {"x":2}) exec(c, {}, {"x":3})
tests: Add test for compile builtin.# test compile builtin try: compile except NameError: print("SKIP") import sys sys.exit() c = compile("print(x)", "file", "exec") try: exec(c) except NameError: print("NameError") x = 1 exec(c) exec(c, {"x":2}) exec(c, {}, {"x":3})
<commit_before><commit_msg>tests: Add test for compile builtin.<commit_after># test compile builtin try: compile except NameError: print("SKIP") import sys sys.exit() c = compile("print(x)", "file", "exec") try: exec(c) except NameError: print("NameError") x = 1 exec(c) exec(c, {"x":2}) exe...
667fb50a3bccaa3f47fc21ec83c1ba2543605c08
tests/unit_tests/test_source_file.py
tests/unit_tests/test_source_file.py
from random import random import h5py import numpy as np import openmc def test_source_file(run_in_tmpdir): # Create source particles source = [] n = 1000 for i in range(n): source.append(openmc.SourceParticle( r=(random(), i, 0), u=(0., 0., 1.), E=float(n ...
Add test for source file generation
Add test for source file generation
Python
mit
amandalund/openmc,mit-crpg/openmc,paulromano/openmc,paulromano/openmc,walshjon/openmc,shikhar413/openmc,mit-crpg/openmc,amandalund/openmc,mit-crpg/openmc,shikhar413/openmc,paulromano/openmc,walshjon/openmc,shikhar413/openmc,paulromano/openmc,shikhar413/openmc,amandalund/openmc,mit-crpg/openmc,walshjon/openmc,amandalund...
Add test for source file generation
from random import random import h5py import numpy as np import openmc def test_source_file(run_in_tmpdir): # Create source particles source = [] n = 1000 for i in range(n): source.append(openmc.SourceParticle( r=(random(), i, 0), u=(0., 0., 1.), E=float(n ...
<commit_before><commit_msg>Add test for source file generation<commit_after>
from random import random import h5py import numpy as np import openmc def test_source_file(run_in_tmpdir): # Create source particles source = [] n = 1000 for i in range(n): source.append(openmc.SourceParticle( r=(random(), i, 0), u=(0., 0., 1.), E=float(n ...
Add test for source file generationfrom random import random import h5py import numpy as np import openmc def test_source_file(run_in_tmpdir): # Create source particles source = [] n = 1000 for i in range(n): source.append(openmc.SourceParticle( r=(random(), i, 0), u=(...
<commit_before><commit_msg>Add test for source file generation<commit_after>from random import random import h5py import numpy as np import openmc def test_source_file(run_in_tmpdir): # Create source particles source = [] n = 1000 for i in range(n): source.append(openmc.SourceParticle( ...
0cc7ef081380a644b04e6150dcab02e8731d1800
doc/deployer/test_export_epub.py
doc/deployer/test_export_epub.py
from gnowsys_ndf.ndf.models import * from gnowsys_ndf.ndf.views.export_to_epub import * n = node_collection.one({'_id': ObjectId('5752b5392e01310424dcf6cc')}) create_epub(n.name, n.collection_dict)
Test export epub script added
Test export epub script added
Python
agpl-3.0
gnowledge/gstudio,gnowledge/gstudio,gnowledge/gstudio,gnowledge/gstudio,gnowledge/gstudio
Test export epub script added
from gnowsys_ndf.ndf.models import * from gnowsys_ndf.ndf.views.export_to_epub import * n = node_collection.one({'_id': ObjectId('5752b5392e01310424dcf6cc')}) create_epub(n.name, n.collection_dict)
<commit_before><commit_msg>Test export epub script added<commit_after>
from gnowsys_ndf.ndf.models import * from gnowsys_ndf.ndf.views.export_to_epub import * n = node_collection.one({'_id': ObjectId('5752b5392e01310424dcf6cc')}) create_epub(n.name, n.collection_dict)
Test export epub script addedfrom gnowsys_ndf.ndf.models import * from gnowsys_ndf.ndf.views.export_to_epub import * n = node_collection.one({'_id': ObjectId('5752b5392e01310424dcf6cc')}) create_epub(n.name, n.collection_dict)
<commit_before><commit_msg>Test export epub script added<commit_after>from gnowsys_ndf.ndf.models import * from gnowsys_ndf.ndf.views.export_to_epub import * n = node_collection.one({'_id': ObjectId('5752b5392e01310424dcf6cc')}) create_epub(n.name, n.collection_dict)
99c81317c10dbcc737497d7ec89d165e2f63791c
defaults.py
defaults.py
ARDUINO_SENSOR_TYPE="arduino" SIMULATED_SENSOR_TYPE="simulated" AUTO_DETERMINE_SENSOR="auto" # TODO - put this as a CNAME and an SRV record in DNS instead IN_PROCESS_DESTINATION="local" UDP_TRANSPORT_TYPE="udp" #DEFAULT_DESTINATION_PORT="_sensors._udp" #DEFAULT_DESTINATION_HOST="192.168.56.1" DEFAULT_DESTINATION_HOST...
ARDUINO_SENSOR_TYPE = "arduino" SIMULATED_SENSOR_TYPE = "simulated" AUTO_DETERMINE_SENSOR = "auto" # TODO - put this as a CNAME and an SRV record in DNS instead IN_PROCESS_DESTINATION = "local" UDP_TRANSPORT_TYPE = "udp" #DEFAULT_DESTINATION_PORT = "_sensors._udp" #DEFAULT_DESTINATION_HOST = "192.168.56.1" DEFAULT_DE...
Add Arduino USB Vendor and product IDs
Add Arduino USB Vendor and product IDs
Python
cc0-1.0
edwinsteele/sensorsproject,edwinsteele/sensorsproject
ARDUINO_SENSOR_TYPE="arduino" SIMULATED_SENSOR_TYPE="simulated" AUTO_DETERMINE_SENSOR="auto" # TODO - put this as a CNAME and an SRV record in DNS instead IN_PROCESS_DESTINATION="local" UDP_TRANSPORT_TYPE="udp" #DEFAULT_DESTINATION_PORT="_sensors._udp" #DEFAULT_DESTINATION_HOST="192.168.56.1" DEFAULT_DESTINATION_HOST...
ARDUINO_SENSOR_TYPE = "arduino" SIMULATED_SENSOR_TYPE = "simulated" AUTO_DETERMINE_SENSOR = "auto" # TODO - put this as a CNAME and an SRV record in DNS instead IN_PROCESS_DESTINATION = "local" UDP_TRANSPORT_TYPE = "udp" #DEFAULT_DESTINATION_PORT = "_sensors._udp" #DEFAULT_DESTINATION_HOST = "192.168.56.1" DEFAULT_DE...
<commit_before> ARDUINO_SENSOR_TYPE="arduino" SIMULATED_SENSOR_TYPE="simulated" AUTO_DETERMINE_SENSOR="auto" # TODO - put this as a CNAME and an SRV record in DNS instead IN_PROCESS_DESTINATION="local" UDP_TRANSPORT_TYPE="udp" #DEFAULT_DESTINATION_PORT="_sensors._udp" #DEFAULT_DESTINATION_HOST="192.168.56.1" DEFAULT_D...
ARDUINO_SENSOR_TYPE = "arduino" SIMULATED_SENSOR_TYPE = "simulated" AUTO_DETERMINE_SENSOR = "auto" # TODO - put this as a CNAME and an SRV record in DNS instead IN_PROCESS_DESTINATION = "local" UDP_TRANSPORT_TYPE = "udp" #DEFAULT_DESTINATION_PORT = "_sensors._udp" #DEFAULT_DESTINATION_HOST = "192.168.56.1" DEFAULT_DE...
ARDUINO_SENSOR_TYPE="arduino" SIMULATED_SENSOR_TYPE="simulated" AUTO_DETERMINE_SENSOR="auto" # TODO - put this as a CNAME and an SRV record in DNS instead IN_PROCESS_DESTINATION="local" UDP_TRANSPORT_TYPE="udp" #DEFAULT_DESTINATION_PORT="_sensors._udp" #DEFAULT_DESTINATION_HOST="192.168.56.1" DEFAULT_DESTINATION_HOST...
<commit_before> ARDUINO_SENSOR_TYPE="arduino" SIMULATED_SENSOR_TYPE="simulated" AUTO_DETERMINE_SENSOR="auto" # TODO - put this as a CNAME and an SRV record in DNS instead IN_PROCESS_DESTINATION="local" UDP_TRANSPORT_TYPE="udp" #DEFAULT_DESTINATION_PORT="_sensors._udp" #DEFAULT_DESTINATION_HOST="192.168.56.1" DEFAULT_D...
bcf4f7672efce52170b9eb5ce5bad8e3b81f969f
tests/test_evaluate.py
tests/test_evaluate.py
import numpy as np from numpy.testing import assert_equal from gala import evaluate as ev def test_contingency_table(): seg = np.array([0, 1, 1, 1, 2, 2, 2, 3]) gt = np.array([1, 1, 1, 2, 2, 2, 2, 0]) ct = ev.contingency_table(seg, gt, ignore_seg=[], ignore_gt=[]) ct0 = ev.contingency_table(seg, gt, ig...
Add test for contingency table fix
Add test for contingency table fix
Python
bsd-3-clause
janelia-flyem/gala,jni/gala
Add test for contingency table fix
import numpy as np from numpy.testing import assert_equal from gala import evaluate as ev def test_contingency_table(): seg = np.array([0, 1, 1, 1, 2, 2, 2, 3]) gt = np.array([1, 1, 1, 2, 2, 2, 2, 0]) ct = ev.contingency_table(seg, gt, ignore_seg=[], ignore_gt=[]) ct0 = ev.contingency_table(seg, gt, ig...
<commit_before><commit_msg>Add test for contingency table fix<commit_after>
import numpy as np from numpy.testing import assert_equal from gala import evaluate as ev def test_contingency_table(): seg = np.array([0, 1, 1, 1, 2, 2, 2, 3]) gt = np.array([1, 1, 1, 2, 2, 2, 2, 0]) ct = ev.contingency_table(seg, gt, ignore_seg=[], ignore_gt=[]) ct0 = ev.contingency_table(seg, gt, ig...
Add test for contingency table fiximport numpy as np from numpy.testing import assert_equal from gala import evaluate as ev def test_contingency_table(): seg = np.array([0, 1, 1, 1, 2, 2, 2, 3]) gt = np.array([1, 1, 1, 2, 2, 2, 2, 0]) ct = ev.contingency_table(seg, gt, ignore_seg=[], ignore_gt=[]) ct0 ...
<commit_before><commit_msg>Add test for contingency table fix<commit_after>import numpy as np from numpy.testing import assert_equal from gala import evaluate as ev def test_contingency_table(): seg = np.array([0, 1, 1, 1, 2, 2, 2, 3]) gt = np.array([1, 1, 1, 2, 2, 2, 2, 0]) ct = ev.contingency_table(seg, ...
4e66798eeac6a4c5dd0a6356aba99286b6ac4df7
polygraph/types/tests/test_union.py
polygraph/types/tests/test_union.py
from unittest import TestCase, skip from polygraph.exceptions import PolygraphValueError from polygraph.types.basic_type import Union from polygraph.types.scalar import Float, Int, String @skip # FIXME class UnionTypeTest(TestCase): def test_commutativity(self): self.assertEqual(Union(String, Int), Unio...
Add unit tests around the Union type
Add unit tests around the Union type
Python
mit
polygraph-python/polygraph
Add unit tests around the Union type
from unittest import TestCase, skip from polygraph.exceptions import PolygraphValueError from polygraph.types.basic_type import Union from polygraph.types.scalar import Float, Int, String @skip # FIXME class UnionTypeTest(TestCase): def test_commutativity(self): self.assertEqual(Union(String, Int), Unio...
<commit_before><commit_msg>Add unit tests around the Union type<commit_after>
from unittest import TestCase, skip from polygraph.exceptions import PolygraphValueError from polygraph.types.basic_type import Union from polygraph.types.scalar import Float, Int, String @skip # FIXME class UnionTypeTest(TestCase): def test_commutativity(self): self.assertEqual(Union(String, Int), Unio...
Add unit tests around the Union typefrom unittest import TestCase, skip from polygraph.exceptions import PolygraphValueError from polygraph.types.basic_type import Union from polygraph.types.scalar import Float, Int, String @skip # FIXME class UnionTypeTest(TestCase): def test_commutativity(self): self....
<commit_before><commit_msg>Add unit tests around the Union type<commit_after>from unittest import TestCase, skip from polygraph.exceptions import PolygraphValueError from polygraph.types.basic_type import Union from polygraph.types.scalar import Float, Int, String @skip # FIXME class UnionTypeTest(TestCase): de...
47cfefd8a37d7face8f35911c089576450f26ef3
tests/sentry/utils/test_cursors.py
tests/sentry/utils/test_cursors.py
from __future__ import absolute_import from mock import Mock from sentry.utils.cursors import build_cursor, Cursor def build_mock(**attrs): obj = Mock() for key, value in attrs.items(): setattr(obj, key, value) obj.__repr__ = lambda x: repr(attrs) return obj def test_build_cursor(): ev...
Add test exhibiting cursor failure
Add test exhibiting cursor failure
Python
bsd-3-clause
gencer/sentry,1tush/sentry,ifduyue/sentry,songyi199111/sentry,fotinakis/sentry,jokey2k/sentry,BayanGroup/sentry,JamesMura/sentry,1tush/sentry,mvaled/sentry,wujuguang/sentry,kevinastone/sentry,gencer/sentry,looker/sentry,ewdurbin/sentry,nicholasserra/sentry,kevinlondon/sentry,boneyao/sentry,daevaorn/sentry,imankulov/sen...
Add test exhibiting cursor failure
from __future__ import absolute_import from mock import Mock from sentry.utils.cursors import build_cursor, Cursor def build_mock(**attrs): obj = Mock() for key, value in attrs.items(): setattr(obj, key, value) obj.__repr__ = lambda x: repr(attrs) return obj def test_build_cursor(): ev...
<commit_before><commit_msg>Add test exhibiting cursor failure<commit_after>
from __future__ import absolute_import from mock import Mock from sentry.utils.cursors import build_cursor, Cursor def build_mock(**attrs): obj = Mock() for key, value in attrs.items(): setattr(obj, key, value) obj.__repr__ = lambda x: repr(attrs) return obj def test_build_cursor(): ev...
Add test exhibiting cursor failurefrom __future__ import absolute_import from mock import Mock from sentry.utils.cursors import build_cursor, Cursor def build_mock(**attrs): obj = Mock() for key, value in attrs.items(): setattr(obj, key, value) obj.__repr__ = lambda x: repr(attrs) return obj...
<commit_before><commit_msg>Add test exhibiting cursor failure<commit_after>from __future__ import absolute_import from mock import Mock from sentry.utils.cursors import build_cursor, Cursor def build_mock(**attrs): obj = Mock() for key, value in attrs.items(): setattr(obj, key, value) obj.__repr...
ba06e9cc8a719c5b362ff63a7ea8aace459fa6a1
tests/test_utilities_efficiency.py
tests/test_utilities_efficiency.py
# -*- coding: utf-8 -*- import unittest from brew.utilities.efficiency import calculate_brew_house_yield from fixtures import recipe class TestEfficiencyUtilities(unittest.TestCase): def setUp(self): self.recipe = recipe def test_calculate_brew_house_yield(self): out = calculate_brew_house_...
Add tests for calculating brew house yield
Add tests for calculating brew house yield
Python
mit
chrisgilmerproj/brewday,chrisgilmerproj/brewday
Add tests for calculating brew house yield
# -*- coding: utf-8 -*- import unittest from brew.utilities.efficiency import calculate_brew_house_yield from fixtures import recipe class TestEfficiencyUtilities(unittest.TestCase): def setUp(self): self.recipe = recipe def test_calculate_brew_house_yield(self): out = calculate_brew_house_...
<commit_before><commit_msg>Add tests for calculating brew house yield<commit_after>
# -*- coding: utf-8 -*- import unittest from brew.utilities.efficiency import calculate_brew_house_yield from fixtures import recipe class TestEfficiencyUtilities(unittest.TestCase): def setUp(self): self.recipe = recipe def test_calculate_brew_house_yield(self): out = calculate_brew_house_...
Add tests for calculating brew house yield# -*- coding: utf-8 -*- import unittest from brew.utilities.efficiency import calculate_brew_house_yield from fixtures import recipe class TestEfficiencyUtilities(unittest.TestCase): def setUp(self): self.recipe = recipe def test_calculate_brew_house_yield(...
<commit_before><commit_msg>Add tests for calculating brew house yield<commit_after># -*- coding: utf-8 -*- import unittest from brew.utilities.efficiency import calculate_brew_house_yield from fixtures import recipe class TestEfficiencyUtilities(unittest.TestCase): def setUp(self): self.recipe = recipe ...
a7abc52fd5e2920070f00678cf788d6bcf1e6ed0
carl/ratios/__init__.py
carl/ratios/__init__.py
# -*- coding: utf-8 -*- # # Carl is free software; you can redistribute it and/or modify it # under the terms of the Revised BSD License; see LICENSE file for # more details. """Density ratio estimators."""
Structure for density ratio estimators
Structure for density ratio estimators
Python
bsd-3-clause
diana-hep/carl,diana-hep/carl
Structure for density ratio estimators
# -*- coding: utf-8 -*- # # Carl is free software; you can redistribute it and/or modify it # under the terms of the Revised BSD License; see LICENSE file for # more details. """Density ratio estimators."""
<commit_before><commit_msg>Structure for density ratio estimators<commit_after>
# -*- coding: utf-8 -*- # # Carl is free software; you can redistribute it and/or modify it # under the terms of the Revised BSD License; see LICENSE file for # more details. """Density ratio estimators."""
Structure for density ratio estimators# -*- coding: utf-8 -*- # # Carl is free software; you can redistribute it and/or modify it # under the terms of the Revised BSD License; see LICENSE file for # more details. """Density ratio estimators."""
<commit_before><commit_msg>Structure for density ratio estimators<commit_after># -*- coding: utf-8 -*- # # Carl is free software; you can redistribute it and/or modify it # under the terms of the Revised BSD License; see LICENSE file for # more details. """Density ratio estimators."""
5026583c661158ca7f5326b12a4737609111a741
peerinst/tests/test_management_commands.py
peerinst/tests/test_management_commands.py
import os import mock from django.core.management import call_command from django.db.utils import DatabaseError from django.test import TestCase devnull = open(os.devnull, 'w') @mock.patch("sys.stdout", devnull) # Get rid of output this command prints to user class SanityCheckTest(TestCase): def test_sanity...
Add tests to sanity check command
Add tests to sanity check command
Python
agpl-3.0
open-craft/dalite-ng,open-craft/dalite-ng,open-craft/dalite-ng
Add tests to sanity check command
import os import mock from django.core.management import call_command from django.db.utils import DatabaseError from django.test import TestCase devnull = open(os.devnull, 'w') @mock.patch("sys.stdout", devnull) # Get rid of output this command prints to user class SanityCheckTest(TestCase): def test_sanity...
<commit_before><commit_msg>Add tests to sanity check command<commit_after>
import os import mock from django.core.management import call_command from django.db.utils import DatabaseError from django.test import TestCase devnull = open(os.devnull, 'w') @mock.patch("sys.stdout", devnull) # Get rid of output this command prints to user class SanityCheckTest(TestCase): def test_sanity...
Add tests to sanity check command import os import mock from django.core.management import call_command from django.db.utils import DatabaseError from django.test import TestCase devnull = open(os.devnull, 'w') @mock.patch("sys.stdout", devnull) # Get rid of output this command prints to user class SanityCheckTes...
<commit_before><commit_msg>Add tests to sanity check command<commit_after> import os import mock from django.core.management import call_command from django.db.utils import DatabaseError from django.test import TestCase devnull = open(os.devnull, 'w') @mock.patch("sys.stdout", devnull) # Get rid of output this co...
6182cc9f1b58f96479a46dea03ffe98a6244e7e0
viewer_examples/plugins/canny_simple.py
viewer_examples/plugins/canny_simple.py
from skimage import data from skimage.filter import canny from skimage.viewer import ImageViewer from skimage.viewer.widgets import Slider from skimage.viewer.plugins.overlayplugin import OverlayPlugin image = data.camera() # Note: ImageViewer must be called before Plugin b/c it starts the event loop. viewer = Image...
Add example of adding widgets to plugin
ENH: Add example of adding widgets to plugin
Python
bsd-3-clause
bennlich/scikit-image,pratapvardhan/scikit-image,emon10005/scikit-image,juliusbierk/scikit-image,Hiyorimi/scikit-image,paalge/scikit-image,emon10005/scikit-image,SamHames/scikit-image,rjeli/scikit-image,dpshelio/scikit-image,paalge/scikit-image,chintak/scikit-image,Midafi/scikit-image,ofgulban/scikit-image,ofgulban/sci...
ENH: Add example of adding widgets to plugin
from skimage import data from skimage.filter import canny from skimage.viewer import ImageViewer from skimage.viewer.widgets import Slider from skimage.viewer.plugins.overlayplugin import OverlayPlugin image = data.camera() # Note: ImageViewer must be called before Plugin b/c it starts the event loop. viewer = Image...
<commit_before><commit_msg>ENH: Add example of adding widgets to plugin<commit_after>
from skimage import data from skimage.filter import canny from skimage.viewer import ImageViewer from skimage.viewer.widgets import Slider from skimage.viewer.plugins.overlayplugin import OverlayPlugin image = data.camera() # Note: ImageViewer must be called before Plugin b/c it starts the event loop. viewer = Image...
ENH: Add example of adding widgets to pluginfrom skimage import data from skimage.filter import canny from skimage.viewer import ImageViewer from skimage.viewer.widgets import Slider from skimage.viewer.plugins.overlayplugin import OverlayPlugin image = data.camera() # Note: ImageViewer must be called before Plugin ...
<commit_before><commit_msg>ENH: Add example of adding widgets to plugin<commit_after>from skimage import data from skimage.filter import canny from skimage.viewer import ImageViewer from skimage.viewer.widgets import Slider from skimage.viewer.plugins.overlayplugin import OverlayPlugin image = data.camera() # Note: ...
952f15762e083d55e8d56e09a40c2b5470bd8e0d
tools/send_github_payloads.py
tools/send_github_payloads.py
#!/usr/bin/python import sys import os import simplejson sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'api')) import zulip zulip_client = zulip.Client(site="http://localhost:9991") payload_dir = "zerver/fixtures/github" for filename in os.listdir(payload_dir): with open(os.path.join(payload_dir,...
Add tool for sending Github payloads to a local instance
Add tool for sending Github payloads to a local instance This is very useful for testing our Github integration. (imported from commit c61fd883c599395d31416a25090e57594fddeadf)
Python
apache-2.0
Suninus/zulip,xuanhan863/zulip,bitemyapp/zulip,jphilipsen05/zulip,mahim97/zulip,amanharitsh123/zulip,zorojean/zulip,zacps/zulip,ApsOps/zulip,eeshangarg/zulip,Cheppers/zulip,andersk/zulip,TigorC/zulip,Suninus/zulip,ipernet/zulip,EasonYi/zulip,eastlhu/zulip,KJin99/zulip,pradiptad/zulip,qq1012803704/zulip,suxinde2009/zuli...
Add tool for sending Github payloads to a local instance This is very useful for testing our Github integration. (imported from commit c61fd883c599395d31416a25090e57594fddeadf)
#!/usr/bin/python import sys import os import simplejson sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'api')) import zulip zulip_client = zulip.Client(site="http://localhost:9991") payload_dir = "zerver/fixtures/github" for filename in os.listdir(payload_dir): with open(os.path.join(payload_dir,...
<commit_before><commit_msg>Add tool for sending Github payloads to a local instance This is very useful for testing our Github integration. (imported from commit c61fd883c599395d31416a25090e57594fddeadf)<commit_after>
#!/usr/bin/python import sys import os import simplejson sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'api')) import zulip zulip_client = zulip.Client(site="http://localhost:9991") payload_dir = "zerver/fixtures/github" for filename in os.listdir(payload_dir): with open(os.path.join(payload_dir,...
Add tool for sending Github payloads to a local instance This is very useful for testing our Github integration. (imported from commit c61fd883c599395d31416a25090e57594fddeadf)#!/usr/bin/python import sys import os import simplejson sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'api')) import zulip ...
<commit_before><commit_msg>Add tool for sending Github payloads to a local instance This is very useful for testing our Github integration. (imported from commit c61fd883c599395d31416a25090e57594fddeadf)<commit_after>#!/usr/bin/python import sys import os import simplejson sys.path.append(os.path.join(os.path.dirnam...
b5d367c172a8bdb3a9c165041a63ffe569c2c28b
examples/xml_to_json.py
examples/xml_to_json.py
#!\usr\bin\env python import os import sys import cybox.bindings.cybox_core_1_0 as core_binding from cybox.core import Observables def from_file(filename): cybox_obj = core_binding.parse(os.path.abspath(filename)) return Observables.from_obj(cybox_obj) def main(): if len(sys.argv) < 2: print "Ar...
Add script to convert CybOX XML to CybOX JSON.
Add script to convert CybOX XML to CybOX JSON.
Python
bsd-3-clause
CybOXProject/python-cybox
Add script to convert CybOX XML to CybOX JSON.
#!\usr\bin\env python import os import sys import cybox.bindings.cybox_core_1_0 as core_binding from cybox.core import Observables def from_file(filename): cybox_obj = core_binding.parse(os.path.abspath(filename)) return Observables.from_obj(cybox_obj) def main(): if len(sys.argv) < 2: print "Ar...
<commit_before><commit_msg>Add script to convert CybOX XML to CybOX JSON.<commit_after>
#!\usr\bin\env python import os import sys import cybox.bindings.cybox_core_1_0 as core_binding from cybox.core import Observables def from_file(filename): cybox_obj = core_binding.parse(os.path.abspath(filename)) return Observables.from_obj(cybox_obj) def main(): if len(sys.argv) < 2: print "Ar...
Add script to convert CybOX XML to CybOX JSON.#!\usr\bin\env python import os import sys import cybox.bindings.cybox_core_1_0 as core_binding from cybox.core import Observables def from_file(filename): cybox_obj = core_binding.parse(os.path.abspath(filename)) return Observables.from_obj(cybox_obj) def main(...
<commit_before><commit_msg>Add script to convert CybOX XML to CybOX JSON.<commit_after>#!\usr\bin\env python import os import sys import cybox.bindings.cybox_core_1_0 as core_binding from cybox.core import Observables def from_file(filename): cybox_obj = core_binding.parse(os.path.abspath(filename)) return O...
4f369b62be57052e534ee48015a383db6c3c7468
util/web/websockets.py
util/web/websockets.py
# Oxypanel # File: util/web/websockets.py # Desc: helpers to make authed websocket requests from uuid import uuid4 import config from app import redis_client from util.web.user import get_current_user def make_websocket_request(websocket, websocket_data): # Generate request key request_key = str(uuid4()) ...
Add helpers to create websocket requests
Add helpers to create websocket requests
Python
mit
oxyio/oxyio,oxyio/oxyio,oxyio/oxyio,oxyio/oxyio
Add helpers to create websocket requests
# Oxypanel # File: util/web/websockets.py # Desc: helpers to make authed websocket requests from uuid import uuid4 import config from app import redis_client from util.web.user import get_current_user def make_websocket_request(websocket, websocket_data): # Generate request key request_key = str(uuid4()) ...
<commit_before><commit_msg>Add helpers to create websocket requests<commit_after>
# Oxypanel # File: util/web/websockets.py # Desc: helpers to make authed websocket requests from uuid import uuid4 import config from app import redis_client from util.web.user import get_current_user def make_websocket_request(websocket, websocket_data): # Generate request key request_key = str(uuid4()) ...
Add helpers to create websocket requests# Oxypanel # File: util/web/websockets.py # Desc: helpers to make authed websocket requests from uuid import uuid4 import config from app import redis_client from util.web.user import get_current_user def make_websocket_request(websocket, websocket_data): # Generate reque...
<commit_before><commit_msg>Add helpers to create websocket requests<commit_after># Oxypanel # File: util/web/websockets.py # Desc: helpers to make authed websocket requests from uuid import uuid4 import config from app import redis_client from util.web.user import get_current_user def make_websocket_request(websock...
c8c616dffcce4a8083e3415607b07da6ae1adc7a
2019/aoc2019/day13.py
2019/aoc2019/day13.py
from typing import TextIO from aoc2019.intcode import Computer, read_program def part1(data: TextIO) -> int: computer = Computer(read_program(data)) computer.run() screen = {} while computer.output: x = computer.output.popleft() y = computer.output.popleft() val = computer....
Implement 2019 day 13 part 1
Implement 2019 day 13 part 1
Python
mit
bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adv...
Implement 2019 day 13 part 1
from typing import TextIO from aoc2019.intcode import Computer, read_program def part1(data: TextIO) -> int: computer = Computer(read_program(data)) computer.run() screen = {} while computer.output: x = computer.output.popleft() y = computer.output.popleft() val = computer....
<commit_before><commit_msg>Implement 2019 day 13 part 1<commit_after>
from typing import TextIO from aoc2019.intcode import Computer, read_program def part1(data: TextIO) -> int: computer = Computer(read_program(data)) computer.run() screen = {} while computer.output: x = computer.output.popleft() y = computer.output.popleft() val = computer....
Implement 2019 day 13 part 1from typing import TextIO from aoc2019.intcode import Computer, read_program def part1(data: TextIO) -> int: computer = Computer(read_program(data)) computer.run() screen = {} while computer.output: x = computer.output.popleft() y = computer.output.pople...
<commit_before><commit_msg>Implement 2019 day 13 part 1<commit_after>from typing import TextIO from aoc2019.intcode import Computer, read_program def part1(data: TextIO) -> int: computer = Computer(read_program(data)) computer.run() screen = {} while computer.output: x = computer.output.po...
a7777a049dab6e3d4b99f8259ebfa39a31d32ae8
IPython/lib/tests/test_clipboard.py
IPython/lib/tests/test_clipboard.py
import nose.tools as nt from IPython.core.error import TryNext from IPython.lib.clipboard import ClipboardEmpty from IPython.utils.py3compat import unicode_type def test_clipboard_get(): # Smoketest for clipboard access - we can't easily guarantee that the # clipboard is accessible and has something on it, bu...
Add simple smoketest for clipboard access
Add simple smoketest for clipboard access
Python
bsd-3-clause
ipython/ipython,ipython/ipython
Add simple smoketest for clipboard access
import nose.tools as nt from IPython.core.error import TryNext from IPython.lib.clipboard import ClipboardEmpty from IPython.utils.py3compat import unicode_type def test_clipboard_get(): # Smoketest for clipboard access - we can't easily guarantee that the # clipboard is accessible and has something on it, bu...
<commit_before><commit_msg>Add simple smoketest for clipboard access<commit_after>
import nose.tools as nt from IPython.core.error import TryNext from IPython.lib.clipboard import ClipboardEmpty from IPython.utils.py3compat import unicode_type def test_clipboard_get(): # Smoketest for clipboard access - we can't easily guarantee that the # clipboard is accessible and has something on it, bu...
Add simple smoketest for clipboard accessimport nose.tools as nt from IPython.core.error import TryNext from IPython.lib.clipboard import ClipboardEmpty from IPython.utils.py3compat import unicode_type def test_clipboard_get(): # Smoketest for clipboard access - we can't easily guarantee that the # clipboard ...
<commit_before><commit_msg>Add simple smoketest for clipboard access<commit_after>import nose.tools as nt from IPython.core.error import TryNext from IPython.lib.clipboard import ClipboardEmpty from IPython.utils.py3compat import unicode_type def test_clipboard_get(): # Smoketest for clipboard access - we can't e...
d01cae37ecb8f52814dee98ad27aa91b6b9be8c9
animerec/user_info.py
animerec/user_info.py
def get_user_info(username): """ Retrieves information via MyAnimeList's API about a user's viewed anime and the corresponding ratings. It only takes into account non-zero ratings. Parameters: ----------- username : string Username of the MyAnimeList user whose data to pull. Returns: -------- seen_titles, ...
Use MAL API to get watched show information.
Use MAL API to get watched show information.
Python
mit
vishaalprasad/AnimeRecommendation
Use MAL API to get watched show information.
def get_user_info(username): """ Retrieves information via MyAnimeList's API about a user's viewed anime and the corresponding ratings. It only takes into account non-zero ratings. Parameters: ----------- username : string Username of the MyAnimeList user whose data to pull. Returns: -------- seen_titles, ...
<commit_before><commit_msg>Use MAL API to get watched show information.<commit_after>
def get_user_info(username): """ Retrieves information via MyAnimeList's API about a user's viewed anime and the corresponding ratings. It only takes into account non-zero ratings. Parameters: ----------- username : string Username of the MyAnimeList user whose data to pull. Returns: -------- seen_titles, ...
Use MAL API to get watched show information.def get_user_info(username): """ Retrieves information via MyAnimeList's API about a user's viewed anime and the corresponding ratings. It only takes into account non-zero ratings. Parameters: ----------- username : string Username of the MyAnimeList user whose data ...
<commit_before><commit_msg>Use MAL API to get watched show information.<commit_after>def get_user_info(username): """ Retrieves information via MyAnimeList's API about a user's viewed anime and the corresponding ratings. It only takes into account non-zero ratings. Parameters: ----------- username : string Use...
0663abd5e89bc7101fc1cfc803e7ffbfd5432af0
test/test_exc.py
test/test_exc.py
import unittest from u2flib_host import exc class APDUErrorTest(unittest.TestCase): def test_init(self): error = exc.APDUError(0x3039) self.assertEqual(error.args[0], '0x3039') self.assertEqual(error.code, 0x3039) self.assertEqual(error.sw1, 0x30) self.assertEqual(error.s...
Add rudimentary unit test for APDUError
Add rudimentary unit test for APDUError
Python
bsd-2-clause
Yubico/python-u2flib-host
Add rudimentary unit test for APDUError
import unittest from u2flib_host import exc class APDUErrorTest(unittest.TestCase): def test_init(self): error = exc.APDUError(0x3039) self.assertEqual(error.args[0], '0x3039') self.assertEqual(error.code, 0x3039) self.assertEqual(error.sw1, 0x30) self.assertEqual(error.s...
<commit_before><commit_msg>Add rudimentary unit test for APDUError<commit_after>
import unittest from u2flib_host import exc class APDUErrorTest(unittest.TestCase): def test_init(self): error = exc.APDUError(0x3039) self.assertEqual(error.args[0], '0x3039') self.assertEqual(error.code, 0x3039) self.assertEqual(error.sw1, 0x30) self.assertEqual(error.s...
Add rudimentary unit test for APDUError import unittest from u2flib_host import exc class APDUErrorTest(unittest.TestCase): def test_init(self): error = exc.APDUError(0x3039) self.assertEqual(error.args[0], '0x3039') self.assertEqual(error.code, 0x3039) self.assertEqual(error.sw1,...
<commit_before><commit_msg>Add rudimentary unit test for APDUError<commit_after> import unittest from u2flib_host import exc class APDUErrorTest(unittest.TestCase): def test_init(self): error = exc.APDUError(0x3039) self.assertEqual(error.args[0], '0x3039') self.assertEqual(error.code, 0x...
9c7ec15d6347d915cd0285927ed651d4ae6508c1
amen/time.py
amen/time.py
#!/usr/bin/env python import six import numpy as np import pandas as pd class TimeSlice(object): """ A slice of time: has a start time, a duration, and a reference to an Audio object. """ def __init__(self, time, duration, audio, unit='s'): self.time = pd.to_timedelta(time, unit=unit) ...
#!/usr/bin/env python import six import numpy as np import pandas as pd class TimeSlice(object): """ A slice of time: has a start time, a duration, and a reference to an Audio object. """ def __init__(self, time, duration, audio, unit='s'): self.time = pd.to_timedelta(time, unit=unit) ...
Fix formatting bug in repr
Fix formatting bug in repr
Python
bsd-2-clause
algorithmic-music-exploration/amen,algorithmic-music-exploration/amen
#!/usr/bin/env python import six import numpy as np import pandas as pd class TimeSlice(object): """ A slice of time: has a start time, a duration, and a reference to an Audio object. """ def __init__(self, time, duration, audio, unit='s'): self.time = pd.to_timedelta(time, unit=unit) ...
#!/usr/bin/env python import six import numpy as np import pandas as pd class TimeSlice(object): """ A slice of time: has a start time, a duration, and a reference to an Audio object. """ def __init__(self, time, duration, audio, unit='s'): self.time = pd.to_timedelta(time, unit=unit) ...
<commit_before>#!/usr/bin/env python import six import numpy as np import pandas as pd class TimeSlice(object): """ A slice of time: has a start time, a duration, and a reference to an Audio object. """ def __init__(self, time, duration, audio, unit='s'): self.time = pd.to_timedelta(time, u...
#!/usr/bin/env python import six import numpy as np import pandas as pd class TimeSlice(object): """ A slice of time: has a start time, a duration, and a reference to an Audio object. """ def __init__(self, time, duration, audio, unit='s'): self.time = pd.to_timedelta(time, unit=unit) ...
#!/usr/bin/env python import six import numpy as np import pandas as pd class TimeSlice(object): """ A slice of time: has a start time, a duration, and a reference to an Audio object. """ def __init__(self, time, duration, audio, unit='s'): self.time = pd.to_timedelta(time, unit=unit) ...
<commit_before>#!/usr/bin/env python import six import numpy as np import pandas as pd class TimeSlice(object): """ A slice of time: has a start time, a duration, and a reference to an Audio object. """ def __init__(self, time, duration, audio, unit='s'): self.time = pd.to_timedelta(time, u...
a15afdd02582267a4d9cb6487f7d3e2fe15d0a72
lib/ansiblelint/rules/TaskHasNameRule.py
lib/ansiblelint/rules/TaskHasNameRule.py
# Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
# Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
Allow meta and debug tasks to not be named
Allow meta and debug tasks to not be named Fixes #176
Python
mit
MatrixCrawler/ansible-lint,dataxu/ansible-lint,willthames/ansible-lint
# Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
# Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
<commit_before># Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, co...
# Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
# Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
<commit_before># Copyright (c) 2016 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, co...
5781f0a7792c07a6d14b8a575e7eebba39c2ee28
tests/test_variable_registration.py
tests/test_variable_registration.py
import angr import nose def test_registration(): s = angr.SimState(arch='AMD64') a1 = s.solver.BVS('a', 64, key=(1,), eternal=True) a2 = s.solver.BVS('a', 64, key=(1,), eternal=True) nose.tools.assert_is(a1, a2) b1 = s.solver.BVS('b', 64, key=(2,), eternal=False) s1 = s.copy() s2 = s.copy...
Add test case for variable registration
Add test case for variable registration
Python
bsd-2-clause
f-prettyland/angr,schieb/angr,tyb0807/angr,iamahuman/angr,angr/angr,tyb0807/angr,f-prettyland/angr,f-prettyland/angr,iamahuman/angr,schieb/angr,tyb0807/angr,angr/angr,angr/angr,iamahuman/angr,schieb/angr
Add test case for variable registration
import angr import nose def test_registration(): s = angr.SimState(arch='AMD64') a1 = s.solver.BVS('a', 64, key=(1,), eternal=True) a2 = s.solver.BVS('a', 64, key=(1,), eternal=True) nose.tools.assert_is(a1, a2) b1 = s.solver.BVS('b', 64, key=(2,), eternal=False) s1 = s.copy() s2 = s.copy...
<commit_before><commit_msg>Add test case for variable registration<commit_after>
import angr import nose def test_registration(): s = angr.SimState(arch='AMD64') a1 = s.solver.BVS('a', 64, key=(1,), eternal=True) a2 = s.solver.BVS('a', 64, key=(1,), eternal=True) nose.tools.assert_is(a1, a2) b1 = s.solver.BVS('b', 64, key=(2,), eternal=False) s1 = s.copy() s2 = s.copy...
Add test case for variable registrationimport angr import nose def test_registration(): s = angr.SimState(arch='AMD64') a1 = s.solver.BVS('a', 64, key=(1,), eternal=True) a2 = s.solver.BVS('a', 64, key=(1,), eternal=True) nose.tools.assert_is(a1, a2) b1 = s.solver.BVS('b', 64, key=(2,), eternal=F...
<commit_before><commit_msg>Add test case for variable registration<commit_after>import angr import nose def test_registration(): s = angr.SimState(arch='AMD64') a1 = s.solver.BVS('a', 64, key=(1,), eternal=True) a2 = s.solver.BVS('a', 64, key=(1,), eternal=True) nose.tools.assert_is(a1, a2) b1 = ...
00754100d3d9c962a3b106ebd296590ad5ccdaea
tests/test_errors.py
tests/test_errors.py
import logging import json import inspect import pytest from mappyfile.parser import Parser from mappyfile.pprint import PrettyPrinter from mappyfile.transformer import MapfileToDict from lark.common import UnexpectedToken # inherits from ParseError # from lark.lexer import UnexpectedInput def output(s): """ ...
Add tests for expected errors
Add tests for expected errors
Python
mit
geographika/mappyfile,geographika/mappyfile
Add tests for expected errors
import logging import json import inspect import pytest from mappyfile.parser import Parser from mappyfile.pprint import PrettyPrinter from mappyfile.transformer import MapfileToDict from lark.common import UnexpectedToken # inherits from ParseError # from lark.lexer import UnexpectedInput def output(s): """ ...
<commit_before><commit_msg>Add tests for expected errors<commit_after>
import logging import json import inspect import pytest from mappyfile.parser import Parser from mappyfile.pprint import PrettyPrinter from mappyfile.transformer import MapfileToDict from lark.common import UnexpectedToken # inherits from ParseError # from lark.lexer import UnexpectedInput def output(s): """ ...
Add tests for expected errorsimport logging import json import inspect import pytest from mappyfile.parser import Parser from mappyfile.pprint import PrettyPrinter from mappyfile.transformer import MapfileToDict from lark.common import UnexpectedToken # inherits from ParseError # from lark.lexer import UnexpectedInput...
<commit_before><commit_msg>Add tests for expected errors<commit_after>import logging import json import inspect import pytest from mappyfile.parser import Parser from mappyfile.pprint import PrettyPrinter from mappyfile.transformer import MapfileToDict from lark.common import UnexpectedToken # inherits from ParseError...
78e5463fbf9cfd87e7b9b5e31741637d8f203219
targets.py
targets.py
""" Functions for managing targets. """ import json import logging import os import glob import services from services import * class Target(object): def __init__(self, json_desc): config = json.loads(json_desc) self.name = config['name'] self.host = config['host'] self.services...
Add module that parses and loads target descriptions.
Add module that parses and loads target descriptions.
Python
bsd-3-clause
vtcsec/wargame-scorer
Add module that parses and loads target descriptions.
""" Functions for managing targets. """ import json import logging import os import glob import services from services import * class Target(object): def __init__(self, json_desc): config = json.loads(json_desc) self.name = config['name'] self.host = config['host'] self.services...
<commit_before><commit_msg>Add module that parses and loads target descriptions.<commit_after>
""" Functions for managing targets. """ import json import logging import os import glob import services from services import * class Target(object): def __init__(self, json_desc): config = json.loads(json_desc) self.name = config['name'] self.host = config['host'] self.services...
Add module that parses and loads target descriptions.""" Functions for managing targets. """ import json import logging import os import glob import services from services import * class Target(object): def __init__(self, json_desc): config = json.loads(json_desc) self.name = config['name'] ...
<commit_before><commit_msg>Add module that parses and loads target descriptions.<commit_after>""" Functions for managing targets. """ import json import logging import os import glob import services from services import * class Target(object): def __init__(self, json_desc): config = json.loads(json_desc...
8c362e8f253190ffb963ad99dcb3cc3594363fc5
tests/test_random.py
tests/test_random.py
import pycron def test_parse_arg(): assert pycron._parse_arg('1/5', 0) is False assert pycron._parse_arg('asd-dsa', 0) is False def test_no_dt(): assert pycron.is_now('* * * * *')
Add couple of random tests, just to achieve 100% test coverage \o/.
Add couple of random tests, just to achieve 100% test coverage \o/.
Python
mit
kipe/pycron
Add couple of random tests, just to achieve 100% test coverage \o/.
import pycron def test_parse_arg(): assert pycron._parse_arg('1/5', 0) is False assert pycron._parse_arg('asd-dsa', 0) is False def test_no_dt(): assert pycron.is_now('* * * * *')
<commit_before><commit_msg>Add couple of random tests, just to achieve 100% test coverage \o/.<commit_after>
import pycron def test_parse_arg(): assert pycron._parse_arg('1/5', 0) is False assert pycron._parse_arg('asd-dsa', 0) is False def test_no_dt(): assert pycron.is_now('* * * * *')
Add couple of random tests, just to achieve 100% test coverage \o/.import pycron def test_parse_arg(): assert pycron._parse_arg('1/5', 0) is False assert pycron._parse_arg('asd-dsa', 0) is False def test_no_dt(): assert pycron.is_now('* * * * *')
<commit_before><commit_msg>Add couple of random tests, just to achieve 100% test coverage \o/.<commit_after>import pycron def test_parse_arg(): assert pycron._parse_arg('1/5', 0) is False assert pycron._parse_arg('asd-dsa', 0) is False def test_no_dt(): assert pycron.is_now('* * * * *')
2644015a9e78dea4ebe152f4c8e30f2e3c62b3e0
tests/test_roster.py
tests/test_roster.py
#!/usr/bin/env python import pytest from datetime import datetime from mlbgame import roster team_id = 117 r = roster.Roster(team_id) def test_roster_url(): roster_url = 'http://mlb.mlb.com/lookup/json/named.roster_40.bam?team_id=117' assert r.roster_url == roster_url def test_roster_is_list(): assert t...
Add a couple simple pytest tests for roster class
Add a couple simple pytest tests for roster class
Python
mit
panzarino/mlbgame,zachpanz88/mlbgame
Add a couple simple pytest tests for roster class
#!/usr/bin/env python import pytest from datetime import datetime from mlbgame import roster team_id = 117 r = roster.Roster(team_id) def test_roster_url(): roster_url = 'http://mlb.mlb.com/lookup/json/named.roster_40.bam?team_id=117' assert r.roster_url == roster_url def test_roster_is_list(): assert t...
<commit_before><commit_msg>Add a couple simple pytest tests for roster class<commit_after>
#!/usr/bin/env python import pytest from datetime import datetime from mlbgame import roster team_id = 117 r = roster.Roster(team_id) def test_roster_url(): roster_url = 'http://mlb.mlb.com/lookup/json/named.roster_40.bam?team_id=117' assert r.roster_url == roster_url def test_roster_is_list(): assert t...
Add a couple simple pytest tests for roster class#!/usr/bin/env python import pytest from datetime import datetime from mlbgame import roster team_id = 117 r = roster.Roster(team_id) def test_roster_url(): roster_url = 'http://mlb.mlb.com/lookup/json/named.roster_40.bam?team_id=117' assert r.roster_url == ros...
<commit_before><commit_msg>Add a couple simple pytest tests for roster class<commit_after>#!/usr/bin/env python import pytest from datetime import datetime from mlbgame import roster team_id = 117 r = roster.Roster(team_id) def test_roster_url(): roster_url = 'http://mlb.mlb.com/lookup/json/named.roster_40.bam?te...
6c84b31b54b21bcfeddd6fca8c77f44eb1a30cf2
final/problem7.py
final/problem7.py
# Problem 7 # 20.0 points possible (graded) # Write a function called general_poly. def general_poly(L): """ L, a list of numbers (n0, n1, n2, ... nk) Returns a function, which when applied to a value x, returns the value n0 * x^k + n1 * x^(k-1) + ... nk * x^0 """ numList = L[::-1] def apply(number): ...
Implement the general_poly function that reurns a function, applies a number, and returns a value
Implement the general_poly function that reurns a function, applies a number, and returns a value
Python
mit
Kunal57/MIT_6.00.1x
Implement the general_poly function that reurns a function, applies a number, and returns a value
# Problem 7 # 20.0 points possible (graded) # Write a function called general_poly. def general_poly(L): """ L, a list of numbers (n0, n1, n2, ... nk) Returns a function, which when applied to a value x, returns the value n0 * x^k + n1 * x^(k-1) + ... nk * x^0 """ numList = L[::-1] def apply(number): ...
<commit_before><commit_msg>Implement the general_poly function that reurns a function, applies a number, and returns a value<commit_after>
# Problem 7 # 20.0 points possible (graded) # Write a function called general_poly. def general_poly(L): """ L, a list of numbers (n0, n1, n2, ... nk) Returns a function, which when applied to a value x, returns the value n0 * x^k + n1 * x^(k-1) + ... nk * x^0 """ numList = L[::-1] def apply(number): ...
Implement the general_poly function that reurns a function, applies a number, and returns a value# Problem 7 # 20.0 points possible (graded) # Write a function called general_poly. def general_poly(L): """ L, a list of numbers (n0, n1, n2, ... nk) Returns a function, which when applied to a value x, returns the va...
<commit_before><commit_msg>Implement the general_poly function that reurns a function, applies a number, and returns a value<commit_after># Problem 7 # 20.0 points possible (graded) # Write a function called general_poly. def general_poly(L): """ L, a list of numbers (n0, n1, n2, ... nk) Returns a function, which ...
c99eeda83b9623e88a694a27a6aa83d0ecaecf0f
website/jdpages/migrations/0011_headerimagevalidator.py
website/jdpages/migrations/0011_headerimagevalidator.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import mezzanine.core.fields import website.jdpages.models class Migration(migrations.Migration): dependencies = [ ('jdpages', '0010_pageheaderimagewidget_pageheadersettingswidget'), ] opera...
Add missing migration for header image validator
Add missing migration for header image validator
Python
mit
jonge-democraten/website,jonge-democraten/website,jonge-democraten/website,jonge-democraten/website
Add missing migration for header image validator
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import mezzanine.core.fields import website.jdpages.models class Migration(migrations.Migration): dependencies = [ ('jdpages', '0010_pageheaderimagewidget_pageheadersettingswidget'), ] opera...
<commit_before><commit_msg>Add missing migration for header image validator<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import mezzanine.core.fields import website.jdpages.models class Migration(migrations.Migration): dependencies = [ ('jdpages', '0010_pageheaderimagewidget_pageheadersettingswidget'), ] opera...
Add missing migration for header image validator# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import mezzanine.core.fields import website.jdpages.models class Migration(migrations.Migration): dependencies = [ ('jdpages', '0010_pageheaderimagewid...
<commit_before><commit_msg>Add missing migration for header image validator<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import mezzanine.core.fields import website.jdpages.models class Migration(migrations.Migration): dependencies = [ ...
da3f2b5f4d6993130299bd54bf8f56e0004861b9
doc/examples/plot_label.py
doc/examples/plot_label.py
""" =================== Label image regions =================== This example shows how to segment an image with image labelling. """ import matplotlib.pyplot as plt import matplotlib.patches as mpatches from skimage import data from skimage.filter import threshold_otsu from skimage.segmentation import clear_border ...
Add example script for image labelling
Add example script for image labelling
Python
bsd-3-clause
GaZ3ll3/scikit-image,SamHames/scikit-image,michaelaye/scikit-image,GaZ3ll3/scikit-image,pratapvardhan/scikit-image,vighneshbirodkar/scikit-image,SamHames/scikit-image,paalge/scikit-image,paalge/scikit-image,emon10005/scikit-image,paalge/scikit-image,michaelaye/scikit-image,blink1073/scikit-image,warmspringwinds/scikit-...
Add example script for image labelling
""" =================== Label image regions =================== This example shows how to segment an image with image labelling. """ import matplotlib.pyplot as plt import matplotlib.patches as mpatches from skimage import data from skimage.filter import threshold_otsu from skimage.segmentation import clear_border ...
<commit_before><commit_msg>Add example script for image labelling<commit_after>
""" =================== Label image regions =================== This example shows how to segment an image with image labelling. """ import matplotlib.pyplot as plt import matplotlib.patches as mpatches from skimage import data from skimage.filter import threshold_otsu from skimage.segmentation import clear_border ...
Add example script for image labelling""" =================== Label image regions =================== This example shows how to segment an image with image labelling. """ import matplotlib.pyplot as plt import matplotlib.patches as mpatches from skimage import data from skimage.filter import threshold_otsu from ski...
<commit_before><commit_msg>Add example script for image labelling<commit_after>""" =================== Label image regions =================== This example shows how to segment an image with image labelling. """ import matplotlib.pyplot as plt import matplotlib.patches as mpatches from skimage import data from skim...
15cdcfe30e8599ff2968a0848169e48ad1ade831
fetch_configs/syzygy.py
fetch_configs/syzygy.py
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import config_util # pylint: disable=F0401 # This class doesn't need an __init__ method, so we disable the warning # pylint: disable=W0232 cla...
Add a Syzygy fetch config.
Add a Syzygy fetch config. Review URL: https://codereview.chromium.org/1749213002 git-svn-id: fd409f4bdeea2bb50a5d34bb4d4bfc2046a5a3dd@299057 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
CoherentLabs/depot_tools,CoherentLabs/depot_tools,primiano/depot_tools,primiano/depot_tools,primiano/depot_tools
Add a Syzygy fetch config. Review URL: https://codereview.chromium.org/1749213002 git-svn-id: fd409f4bdeea2bb50a5d34bb4d4bfc2046a5a3dd@299057 0039d316-1c4b-4281-b951-d872f2087c98
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import config_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 a Syzygy fetch config. Review URL: https://codereview.chromium.org/1749213002 git-svn-id: fd409f4bdeea2bb50a5d34bb4d4bfc2046a5a3dd@299057 0039d316-1c4b-4281-b951-d872f2087c98<commit_after>
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import config_util # pylint: disable=F0401 # This class doesn't need an __init__ method, so we disable the warning # pylint: disable=W0232 cla...
Add a Syzygy fetch config. Review URL: https://codereview.chromium.org/1749213002 git-svn-id: fd409f4bdeea2bb50a5d34bb4d4bfc2046a5a3dd@299057 0039d316-1c4b-4281-b951-d872f2087c98# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found...
<commit_before><commit_msg>Add a Syzygy fetch config. Review URL: https://codereview.chromium.org/1749213002 git-svn-id: fd409f4bdeea2bb50a5d34bb4d4bfc2046a5a3dd@299057 0039d316-1c4b-4281-b951-d872f2087c98<commit_after># Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed b...
b8f101cb91a24879591bc97531d14764de86760b
jenkins/list_jobs.py
jenkins/list_jobs.py
from __future__ import print_function import glob import os import re import json JOBS_PATH = './' os.chdir(JOBS_PATH) jobs = { 'job': [], 'pipelineJob': [] } for job_file in glob.glob("*.groovy"): with open(os.path.join(JOBS_PATH, job_file)) as f: data = f.read() for j in jobs.keys(): ...
Add script to list all jenkins jobs
Add script to list all jenkins jobs
Python
mit
madcore-ai/core,madcore-ai/core
Add script to list all jenkins jobs
from __future__ import print_function import glob import os import re import json JOBS_PATH = './' os.chdir(JOBS_PATH) jobs = { 'job': [], 'pipelineJob': [] } for job_file in glob.glob("*.groovy"): with open(os.path.join(JOBS_PATH, job_file)) as f: data = f.read() for j in jobs.keys(): ...
<commit_before><commit_msg>Add script to list all jenkins jobs<commit_after>
from __future__ import print_function import glob import os import re import json JOBS_PATH = './' os.chdir(JOBS_PATH) jobs = { 'job': [], 'pipelineJob': [] } for job_file in glob.glob("*.groovy"): with open(os.path.join(JOBS_PATH, job_file)) as f: data = f.read() for j in jobs.keys(): ...
Add script to list all jenkins jobsfrom __future__ import print_function import glob import os import re import json JOBS_PATH = './' os.chdir(JOBS_PATH) jobs = { 'job': [], 'pipelineJob': [] } for job_file in glob.glob("*.groovy"): with open(os.path.join(JOBS_PATH, job_file)) as f: data = f.re...
<commit_before><commit_msg>Add script to list all jenkins jobs<commit_after>from __future__ import print_function import glob import os import re import json JOBS_PATH = './' os.chdir(JOBS_PATH) jobs = { 'job': [], 'pipelineJob': [] } for job_file in glob.glob("*.groovy"): with open(os.path.join(JOBS_P...
54ed840b15a264c23c069f780d1fd6b62912ebf6
Snippets/remove-overlaps.py
Snippets/remove-overlaps.py
#! /usr/bin/env python3 # Example script to remove overlaps in TTF using skia-pathops import sys from fontTools.ttLib import TTFont from fontTools.pens.recordingPen import DecomposingRecordingPen from fontTools.pens.ttGlyphPen import TTGlyphPen try: import pathops except ImportError: sys.exit( "This...
Add snippet to remove overlaps on TTF with skia-pathops
Add snippet to remove overlaps on TTF with skia-pathops
Python
mit
fonttools/fonttools,googlefonts/fonttools
Add snippet to remove overlaps on TTF with skia-pathops
#! /usr/bin/env python3 # Example script to remove overlaps in TTF using skia-pathops import sys from fontTools.ttLib import TTFont from fontTools.pens.recordingPen import DecomposingRecordingPen from fontTools.pens.ttGlyphPen import TTGlyphPen try: import pathops except ImportError: sys.exit( "This...
<commit_before><commit_msg>Add snippet to remove overlaps on TTF with skia-pathops<commit_after>
#! /usr/bin/env python3 # Example script to remove overlaps in TTF using skia-pathops import sys from fontTools.ttLib import TTFont from fontTools.pens.recordingPen import DecomposingRecordingPen from fontTools.pens.ttGlyphPen import TTGlyphPen try: import pathops except ImportError: sys.exit( "This...
Add snippet to remove overlaps on TTF with skia-pathops#! /usr/bin/env python3 # Example script to remove overlaps in TTF using skia-pathops import sys from fontTools.ttLib import TTFont from fontTools.pens.recordingPen import DecomposingRecordingPen from fontTools.pens.ttGlyphPen import TTGlyphPen try: import ...
<commit_before><commit_msg>Add snippet to remove overlaps on TTF with skia-pathops<commit_after>#! /usr/bin/env python3 # Example script to remove overlaps in TTF using skia-pathops import sys from fontTools.ttLib import TTFont from fontTools.pens.recordingPen import DecomposingRecordingPen from fontTools.pens.ttGly...
abe89039e48087568f0b8ccc8987e848704da4ab
src/pretix/__main__.py
src/pretix/__main__.py
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pretix.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
Allow to call manage.py as python -m pretix
Allow to call manage.py as python -m pretix
Python
apache-2.0
Flamacue/pretix,Flamacue/pretix,Flamacue/pretix,Flamacue/pretix
Allow to call manage.py as python -m pretix
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pretix.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
<commit_before><commit_msg>Allow to call manage.py as python -m pretix<commit_after>
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pretix.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
Allow to call manage.py as python -m pretiximport os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pretix.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
<commit_before><commit_msg>Allow to call manage.py as python -m pretix<commit_after>import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pretix.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
e6ce8e25ac819a874eb4e42087157f9cf780e0e4
lib/rapidsms/contrib/messagelog/tests.py
lib/rapidsms/contrib/messagelog/tests.py
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from rapidsms.conf import settings import rapidsms.contrib.messagelog.app def test_messagelog(): app = rapidsms.contrib.messagelog.app.App() # Invoke _log, make sure it doesn't blow up regardless of Django version app._log('I', {}, "text")
Add a test for contrib.messagelog's _log() method
Add a test for contrib.messagelog's _log() method
Python
bsd-3-clause
ehealthafrica-ci/rapidsms,catalpainternational/rapidsms,eHealthAfrica/rapidsms,peterayeni/rapidsms,eHealthAfrica/rapidsms,ehealthafrica-ci/rapidsms,ehealthafrica-ci/rapidsms,lsgunth/rapidsms,lsgunth/rapidsms,peterayeni/rapidsms,caktus/rapidsms,lsgunth/rapidsms,lsgunth/rapidsms,eHealthAfrica/rapidsms,catalpainternationa...
Add a test for contrib.messagelog's _log() method
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from rapidsms.conf import settings import rapidsms.contrib.messagelog.app def test_messagelog(): app = rapidsms.contrib.messagelog.app.App() # Invoke _log, make sure it doesn't blow up regardless of Django version app._log('I', {}, "text")
<commit_before><commit_msg>Add a test for contrib.messagelog's _log() method<commit_after>
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from rapidsms.conf import settings import rapidsms.contrib.messagelog.app def test_messagelog(): app = rapidsms.contrib.messagelog.app.App() # Invoke _log, make sure it doesn't blow up regardless of Django version app._log('I', {}, "text")
Add a test for contrib.messagelog's _log() method#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from rapidsms.conf import settings import rapidsms.contrib.messagelog.app def test_messagelog(): app = rapidsms.contrib.messagelog.app.App() # Invoke _log, make sure it doesn't blow up regardless of Django ve...
<commit_before><commit_msg>Add a test for contrib.messagelog's _log() method<commit_after>#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from rapidsms.conf import settings import rapidsms.contrib.messagelog.app def test_messagelog(): app = rapidsms.contrib.messagelog.app.App() # Invoke _log, make sure i...
36f91ef53deba081cf84802a3fbfeda3b319a752
importio2/commands/extractor_document_generator.py
importio2/commands/extractor_document_generator.py
# # Copyright 2017 Import.io # # 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, ...
Add initial stub of documentation command
Add initial stub of documentation command
Python
apache-2.0
dgwartney-io/import-io-api-python,dgwartney-io/import-io-api-python
Add initial stub of documentation command
# # Copyright 2017 Import.io # # 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, ...
<commit_before><commit_msg>Add initial stub of documentation command<commit_after>
# # Copyright 2017 Import.io # # 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, ...
Add initial stub of documentation command# # Copyright 2017 Import.io # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
<commit_before><commit_msg>Add initial stub of documentation command<commit_after># # Copyright 2017 Import.io # # 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/li...