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
5b8518d3b7bdd55ee20dec81f18c4b9a8732decd
test/views/test_failures.py
test/views/test_failures.py
from textwrap import dedent import pytest from puppetboard.views.failures import get_friendly_error # flake8: noqa @pytest.mark.parametrize("raw_message,friendly_message", [ ("Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation " "Error: Error while evaluating a Res...
Add tests for friendly errors
Add tests for friendly errors
Python
apache-2.0
voxpupuli/puppetboard,voxpupuli/puppetboard,voxpupuli/puppetboard
Add tests for friendly errors
from textwrap import dedent import pytest from puppetboard.views.failures import get_friendly_error # flake8: noqa @pytest.mark.parametrize("raw_message,friendly_message", [ ("Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation " "Error: Error while evaluating a Res...
<commit_before><commit_msg>Add tests for friendly errors<commit_after>
from textwrap import dedent import pytest from puppetboard.views.failures import get_friendly_error # flake8: noqa @pytest.mark.parametrize("raw_message,friendly_message", [ ("Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation " "Error: Error while evaluating a Res...
Add tests for friendly errorsfrom textwrap import dedent import pytest from puppetboard.views.failures import get_friendly_error # flake8: noqa @pytest.mark.parametrize("raw_message,friendly_message", [ ("Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation " "Error:...
<commit_before><commit_msg>Add tests for friendly errors<commit_after>from textwrap import dedent import pytest from puppetboard.views.failures import get_friendly_error # flake8: noqa @pytest.mark.parametrize("raw_message,friendly_message", [ ("Could not retrieve catalog from remote server: Error 500 on SERVER...
5b7b301c3f9dd906b8450acc5b28dbcb35fe973a
candidates/management/commands/candidates_fix_not_standing.py
candidates/management/commands/candidates_fix_not_standing.py
from __future__ import print_function, unicode_literals from django.core.management.base import BaseCommand from popolo.models import Membership from candidates.models import PersonExtra class Command(BaseCommand): help = "Find elections in not_standing that should be removed" def add_arguments(self, pars...
Add a script to fix the not_standing relationships of people
Add a script to fix the not_standing relationships of people There was a bug in bulk adding people which meant that their "not_standing" status for an election wasn't removed when reinstating them as a candidate in that election. That bug has been fixed in the parent commit, but there are still people in the database...
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
Add a script to fix the not_standing relationships of people There was a bug in bulk adding people which meant that their "not_standing" status for an election wasn't removed when reinstating them as a candidate in that election. That bug has been fixed in the parent commit, but there are still people in the database...
from __future__ import print_function, unicode_literals from django.core.management.base import BaseCommand from popolo.models import Membership from candidates.models import PersonExtra class Command(BaseCommand): help = "Find elections in not_standing that should be removed" def add_arguments(self, pars...
<commit_before><commit_msg>Add a script to fix the not_standing relationships of people There was a bug in bulk adding people which meant that their "not_standing" status for an election wasn't removed when reinstating them as a candidate in that election. That bug has been fixed in the parent commit, but there are s...
from __future__ import print_function, unicode_literals from django.core.management.base import BaseCommand from popolo.models import Membership from candidates.models import PersonExtra class Command(BaseCommand): help = "Find elections in not_standing that should be removed" def add_arguments(self, pars...
Add a script to fix the not_standing relationships of people There was a bug in bulk adding people which meant that their "not_standing" status for an election wasn't removed when reinstating them as a candidate in that election. That bug has been fixed in the parent commit, but there are still people in the database...
<commit_before><commit_msg>Add a script to fix the not_standing relationships of people There was a bug in bulk adding people which meant that their "not_standing" status for an election wasn't removed when reinstating them as a candidate in that election. That bug has been fixed in the parent commit, but there are s...
a2efa662f0f5b8fe77da5673cb6d6df2e2f583d2
django/website/contacts/migrations/0004_auto_20160421_1645.py
django/website/contacts/migrations/0004_auto_20160421_1645.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def add_user_profiles(apps, schema_editor): User = apps.get_model('contacts', 'User') UserPreferences = apps.get_model('contacts', 'UserPreferences') for user in User.objects.all(): UserPrefe...
Add migration to create user profiles
Add migration to create user profiles
Python
agpl-3.0
aptivate/kashana,aptivate/alfie,daniell/kashana,aptivate/alfie,daniell/kashana,aptivate/kashana,aptivate/alfie,daniell/kashana,daniell/kashana,aptivate/kashana,aptivate/alfie,aptivate/kashana
Add migration to create user profiles
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def add_user_profiles(apps, schema_editor): User = apps.get_model('contacts', 'User') UserPreferences = apps.get_model('contacts', 'UserPreferences') for user in User.objects.all(): UserPrefe...
<commit_before><commit_msg>Add migration to create user profiles<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def add_user_profiles(apps, schema_editor): User = apps.get_model('contacts', 'User') UserPreferences = apps.get_model('contacts', 'UserPreferences') for user in User.objects.all(): UserPrefe...
Add migration to create user profiles# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def add_user_profiles(apps, schema_editor): User = apps.get_model('contacts', 'User') UserPreferences = apps.get_model('contacts', 'UserPreferences') for user in ...
<commit_before><commit_msg>Add migration to create user profiles<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def add_user_profiles(apps, schema_editor): User = apps.get_model('contacts', 'User') UserPreferences = apps.get_model('contac...
572f6d8e789495fc34ed67230b10b0c1f0b3572f
helusers/tests/test_utils.py
helusers/tests/test_utils.py
import pytest import random from uuid import UUID from helusers.utils import uuid_to_username, username_to_uuid def test_uuid_to_username(): assert uuid_to_username('00fbac99-0bab-5e66-8e84-2e567ea4d1f6') == 'u-ad52zgilvnpgnduefzlh5jgr6y' def test_username_to_uuid(): assert username_to_uuid('u-ad52zgilvnpgn...
Add some tests for helusers
Add some tests for helusers
Python
bsd-2-clause
City-of-Helsinki/django-helusers,City-of-Helsinki/django-helusers
Add some tests for helusers
import pytest import random from uuid import UUID from helusers.utils import uuid_to_username, username_to_uuid def test_uuid_to_username(): assert uuid_to_username('00fbac99-0bab-5e66-8e84-2e567ea4d1f6') == 'u-ad52zgilvnpgnduefzlh5jgr6y' def test_username_to_uuid(): assert username_to_uuid('u-ad52zgilvnpgn...
<commit_before><commit_msg>Add some tests for helusers<commit_after>
import pytest import random from uuid import UUID from helusers.utils import uuid_to_username, username_to_uuid def test_uuid_to_username(): assert uuid_to_username('00fbac99-0bab-5e66-8e84-2e567ea4d1f6') == 'u-ad52zgilvnpgnduefzlh5jgr6y' def test_username_to_uuid(): assert username_to_uuid('u-ad52zgilvnpgn...
Add some tests for helusersimport pytest import random from uuid import UUID from helusers.utils import uuid_to_username, username_to_uuid def test_uuid_to_username(): assert uuid_to_username('00fbac99-0bab-5e66-8e84-2e567ea4d1f6') == 'u-ad52zgilvnpgnduefzlh5jgr6y' def test_username_to_uuid(): assert userna...
<commit_before><commit_msg>Add some tests for helusers<commit_after>import pytest import random from uuid import UUID from helusers.utils import uuid_to_username, username_to_uuid def test_uuid_to_username(): assert uuid_to_username('00fbac99-0bab-5e66-8e84-2e567ea4d1f6') == 'u-ad52zgilvnpgnduefzlh5jgr6y' def t...
3127cface44165d3200657c3fa626a5051c6ad48
tests/test_show_resource.py
tests/test_show_resource.py
from nose.plugins.attrib import attr from rightscale.rightscale import RightScale, Resource @attr('rc_creds', 'real_conn') def test_show_first_cloud(): api = RightScale() res = api.clouds.show(res_id=1) assert isinstance(res, Resource)
Test API call that only returns a single Resource
Test API call that only returns a single Resource
Python
mit
diranged/python-rightscale-1,brantai/python-rightscale
Test API call that only returns a single Resource
from nose.plugins.attrib import attr from rightscale.rightscale import RightScale, Resource @attr('rc_creds', 'real_conn') def test_show_first_cloud(): api = RightScale() res = api.clouds.show(res_id=1) assert isinstance(res, Resource)
<commit_before><commit_msg>Test API call that only returns a single Resource<commit_after>
from nose.plugins.attrib import attr from rightscale.rightscale import RightScale, Resource @attr('rc_creds', 'real_conn') def test_show_first_cloud(): api = RightScale() res = api.clouds.show(res_id=1) assert isinstance(res, Resource)
Test API call that only returns a single Resourcefrom nose.plugins.attrib import attr from rightscale.rightscale import RightScale, Resource @attr('rc_creds', 'real_conn') def test_show_first_cloud(): api = RightScale() res = api.clouds.show(res_id=1) assert isinstance(res, Resource)
<commit_before><commit_msg>Test API call that only returns a single Resource<commit_after>from nose.plugins.attrib import attr from rightscale.rightscale import RightScale, Resource @attr('rc_creds', 'real_conn') def test_show_first_cloud(): api = RightScale() res = api.clouds.show(res_id=1) assert isins...
d76809021c99f841cd8d123058d307404b7c025c
py/split-array-into-consecutive-subsequences.py
py/split-array-into-consecutive-subsequences.py
from itertools import groupby class Solution(object): def isPossible(self, nums): """ :type nums: List[int] :rtype: bool """ prev = None not_full_1, not_full_2, attach = 0, 0, 0 for n, items in groupby(nums): cnt = len(list(items)) if p...
Add py solution for 659. Split Array into Consecutive Subsequences
Add py solution for 659. Split Array into Consecutive Subsequences 659. Split Array into Consecutive Subsequences: https://leetcode.com/problems/split-array-into-consecutive-subsequences/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 659. Split Array into Consecutive Subsequences 659. Split Array into Consecutive Subsequences: https://leetcode.com/problems/split-array-into-consecutive-subsequences/
from itertools import groupby class Solution(object): def isPossible(self, nums): """ :type nums: List[int] :rtype: bool """ prev = None not_full_1, not_full_2, attach = 0, 0, 0 for n, items in groupby(nums): cnt = len(list(items)) if p...
<commit_before><commit_msg>Add py solution for 659. Split Array into Consecutive Subsequences 659. Split Array into Consecutive Subsequences: https://leetcode.com/problems/split-array-into-consecutive-subsequences/<commit_after>
from itertools import groupby class Solution(object): def isPossible(self, nums): """ :type nums: List[int] :rtype: bool """ prev = None not_full_1, not_full_2, attach = 0, 0, 0 for n, items in groupby(nums): cnt = len(list(items)) if p...
Add py solution for 659. Split Array into Consecutive Subsequences 659. Split Array into Consecutive Subsequences: https://leetcode.com/problems/split-array-into-consecutive-subsequences/from itertools import groupby class Solution(object): def isPossible(self, nums): """ :type nums: List[int] ...
<commit_before><commit_msg>Add py solution for 659. Split Array into Consecutive Subsequences 659. Split Array into Consecutive Subsequences: https://leetcode.com/problems/split-array-into-consecutive-subsequences/<commit_after>from itertools import groupby class Solution(object): def isPossible(self, nums): ...
f8db46b40629cfdb145a4a000d47277f72090c5b
powerline/lib/memoize.py
powerline/lib/memoize.py
# vim:fileencoding=utf-8:noet from functools import wraps import time def default_cache_key(**kwargs): return frozenset(kwargs.items()) class memoize(object): '''Memoization decorator with timeout.''' def __init__(self, timeout, cache_key=default_cache_key, cache_reg_func=None): self.timeout = timeout self....
# vim:fileencoding=utf-8:noet from functools import wraps try: # Python>=3.3, the only valid clock source for this job from time import monotonic as time except ImportError: # System time, is affected by clock updates. from time import time def default_cache_key(**kwargs): return frozenset(kwargs.items()) cla...
Use proper clock if possible
Use proper clock if possible
Python
mit
Liangjianghao/powerline,kenrachynski/powerline,darac/powerline,darac/powerline,bezhermoso/powerline,firebitsbr/powerline,bartvm/powerline,cyrixhero/powerline,junix/powerline,prvnkumar/powerline,s0undt3ch/powerline,S0lll0s/powerline,Luffin/powerline,EricSB/powerline,dragon788/powerline,prvnkumar/powerline,wfscheper/powe...
# vim:fileencoding=utf-8:noet from functools import wraps import time def default_cache_key(**kwargs): return frozenset(kwargs.items()) class memoize(object): '''Memoization decorator with timeout.''' def __init__(self, timeout, cache_key=default_cache_key, cache_reg_func=None): self.timeout = timeout self....
# vim:fileencoding=utf-8:noet from functools import wraps try: # Python>=3.3, the only valid clock source for this job from time import monotonic as time except ImportError: # System time, is affected by clock updates. from time import time def default_cache_key(**kwargs): return frozenset(kwargs.items()) cla...
<commit_before># vim:fileencoding=utf-8:noet from functools import wraps import time def default_cache_key(**kwargs): return frozenset(kwargs.items()) class memoize(object): '''Memoization decorator with timeout.''' def __init__(self, timeout, cache_key=default_cache_key, cache_reg_func=None): self.timeout = ...
# vim:fileencoding=utf-8:noet from functools import wraps try: # Python>=3.3, the only valid clock source for this job from time import monotonic as time except ImportError: # System time, is affected by clock updates. from time import time def default_cache_key(**kwargs): return frozenset(kwargs.items()) cla...
# vim:fileencoding=utf-8:noet from functools import wraps import time def default_cache_key(**kwargs): return frozenset(kwargs.items()) class memoize(object): '''Memoization decorator with timeout.''' def __init__(self, timeout, cache_key=default_cache_key, cache_reg_func=None): self.timeout = timeout self....
<commit_before># vim:fileencoding=utf-8:noet from functools import wraps import time def default_cache_key(**kwargs): return frozenset(kwargs.items()) class memoize(object): '''Memoization decorator with timeout.''' def __init__(self, timeout, cache_key=default_cache_key, cache_reg_func=None): self.timeout = ...
0886d0fe49f4176bfe6860c643d240a9b7e0053d
db/player_draft.py
db/player_draft.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from .common import Base, session_scope class PlayerDraft(Base): __tablename__ = 'player_drafts' __autoload__ = True def __init__(self, player_id, team_id, year, round, overall, dft_type='e'): self.player_id = player_id self.team_id =...
Integrate initial version of player draft item
Integrate initial version of player draft item
Python
mit
leaffan/pynhldb
Integrate initial version of player draft item
#!/usr/bin/env python # -*- coding: utf-8 -*- from .common import Base, session_scope class PlayerDraft(Base): __tablename__ = 'player_drafts' __autoload__ = True def __init__(self, player_id, team_id, year, round, overall, dft_type='e'): self.player_id = player_id self.team_id =...
<commit_before><commit_msg>Integrate initial version of player draft item<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- from .common import Base, session_scope class PlayerDraft(Base): __tablename__ = 'player_drafts' __autoload__ = True def __init__(self, player_id, team_id, year, round, overall, dft_type='e'): self.player_id = player_id self.team_id =...
Integrate initial version of player draft item#!/usr/bin/env python # -*- coding: utf-8 -*- from .common import Base, session_scope class PlayerDraft(Base): __tablename__ = 'player_drafts' __autoload__ = True def __init__(self, player_id, team_id, year, round, overall, dft_type='e'): self.pl...
<commit_before><commit_msg>Integrate initial version of player draft item<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- from .common import Base, session_scope class PlayerDraft(Base): __tablename__ = 'player_drafts' __autoload__ = True def __init__(self, player_id, team_id, year, round, ov...
699f1f42e0387ac542cbe0905f825079e7aab755
testupload.py
testupload.py
#!/usr/bin/python from datetime import datetime from datetime import timedelta import subprocess import time import logging from wrappers import GPhoto from wrappers import Identify from wrappers import Curl #sudo /usr/local/bin/gphoto2 --capture-image-and-download --filename 'test3.jpg' #curl --form "fileupload=@te...
Add upload and delay test
Add upload and delay test
Python
mit
Lakerfield/timelapse
Add upload and delay test
#!/usr/bin/python from datetime import datetime from datetime import timedelta import subprocess import time import logging from wrappers import GPhoto from wrappers import Identify from wrappers import Curl #sudo /usr/local/bin/gphoto2 --capture-image-and-download --filename 'test3.jpg' #curl --form "fileupload=@te...
<commit_before><commit_msg>Add upload and delay test<commit_after>
#!/usr/bin/python from datetime import datetime from datetime import timedelta import subprocess import time import logging from wrappers import GPhoto from wrappers import Identify from wrappers import Curl #sudo /usr/local/bin/gphoto2 --capture-image-and-download --filename 'test3.jpg' #curl --form "fileupload=@te...
Add upload and delay test#!/usr/bin/python from datetime import datetime from datetime import timedelta import subprocess import time import logging from wrappers import GPhoto from wrappers import Identify from wrappers import Curl #sudo /usr/local/bin/gphoto2 --capture-image-and-download --filename 'test3.jpg' #cu...
<commit_before><commit_msg>Add upload and delay test<commit_after>#!/usr/bin/python from datetime import datetime from datetime import timedelta import subprocess import time import logging from wrappers import GPhoto from wrappers import Identify from wrappers import Curl #sudo /usr/local/bin/gphoto2 --capture-imag...
67164cadc3f3445298da2fb490971cf22e2f146b
curious/ext/loapi/__init__.py
curious/ext/loapi/__init__.py
""" A lower-level State that doesn't do any special object handling. """ import inspect import typing from curious.gateway import Gateway from curious.state import State class PureDispatchState(State): """ A lower-level State that doesn't do any special object handling. This state allows you to pass JSON...
Add very low level state handlers.
Add very low level state handlers.
Python
mit
SunDwarf/curious
Add very low level state handlers.
""" A lower-level State that doesn't do any special object handling. """ import inspect import typing from curious.gateway import Gateway from curious.state import State class PureDispatchState(State): """ A lower-level State that doesn't do any special object handling. This state allows you to pass JSON...
<commit_before><commit_msg>Add very low level state handlers.<commit_after>
""" A lower-level State that doesn't do any special object handling. """ import inspect import typing from curious.gateway import Gateway from curious.state import State class PureDispatchState(State): """ A lower-level State that doesn't do any special object handling. This state allows you to pass JSON...
Add very low level state handlers.""" A lower-level State that doesn't do any special object handling. """ import inspect import typing from curious.gateway import Gateway from curious.state import State class PureDispatchState(State): """ A lower-level State that doesn't do any special object handling. ...
<commit_before><commit_msg>Add very low level state handlers.<commit_after>""" A lower-level State that doesn't do any special object handling. """ import inspect import typing from curious.gateway import Gateway from curious.state import State class PureDispatchState(State): """ A lower-level State that doe...
af7b495b954bb624cbd95e0019fa3b2cb3be6b05
rsa.py
rsa.py
#!/usr/local/bin/python """ RSA.py @author Elliot and Erica """ import random from cryptography_utilities import (block_split, decimal_to_binary, binary_to_decimal, gcd, extended_gcd, random_prime, left_pad, pad_plaintext, unpad_plaintext, random_relative_prime, group_exponentiation) MODULUS_BITS = 16 ...
Implement a public-key cipher (RSA)
Implement a public-key cipher (RSA)
Python
mit
ElliotPenson/cryptography
Implement a public-key cipher (RSA)
#!/usr/local/bin/python """ RSA.py @author Elliot and Erica """ import random from cryptography_utilities import (block_split, decimal_to_binary, binary_to_decimal, gcd, extended_gcd, random_prime, left_pad, pad_plaintext, unpad_plaintext, random_relative_prime, group_exponentiation) MODULUS_BITS = 16 ...
<commit_before><commit_msg>Implement a public-key cipher (RSA)<commit_after>
#!/usr/local/bin/python """ RSA.py @author Elliot and Erica """ import random from cryptography_utilities import (block_split, decimal_to_binary, binary_to_decimal, gcd, extended_gcd, random_prime, left_pad, pad_plaintext, unpad_plaintext, random_relative_prime, group_exponentiation) MODULUS_BITS = 16 ...
Implement a public-key cipher (RSA)#!/usr/local/bin/python """ RSA.py @author Elliot and Erica """ import random from cryptography_utilities import (block_split, decimal_to_binary, binary_to_decimal, gcd, extended_gcd, random_prime, left_pad, pad_plaintext, unpad_plaintext, random_relative_prime, group_e...
<commit_before><commit_msg>Implement a public-key cipher (RSA)<commit_after>#!/usr/local/bin/python """ RSA.py @author Elliot and Erica """ import random from cryptography_utilities import (block_split, decimal_to_binary, binary_to_decimal, gcd, extended_gcd, random_prime, left_pad, pad_plaintext, unpad_plai...
3f55d16fb40acc07cf07588249126cc543d9ad07
dissector/main.py
dissector/main.py
import os import sys sys.path.append('../p4_hlir/') from p4_hlir.main import HLIR p4_source = sys.argv[1] absolute_source = os.path.join(os.getcwd(), p4_source) if not os.path.isfile(absolute_source): print "Source file '" + p4_source + \ "' could not be opened or does not exist." hlir = HLIR(absolute_s...
Read a P4 file and get its HLIR.
Read a P4 file and get its HLIR.
Python
apache-2.0
yo2seol/P4-Wireshark-Dissector
Read a P4 file and get its HLIR.
import os import sys sys.path.append('../p4_hlir/') from p4_hlir.main import HLIR p4_source = sys.argv[1] absolute_source = os.path.join(os.getcwd(), p4_source) if not os.path.isfile(absolute_source): print "Source file '" + p4_source + \ "' could not be opened or does not exist." hlir = HLIR(absolute_s...
<commit_before><commit_msg>Read a P4 file and get its HLIR.<commit_after>
import os import sys sys.path.append('../p4_hlir/') from p4_hlir.main import HLIR p4_source = sys.argv[1] absolute_source = os.path.join(os.getcwd(), p4_source) if not os.path.isfile(absolute_source): print "Source file '" + p4_source + \ "' could not be opened or does not exist." hlir = HLIR(absolute_s...
Read a P4 file and get its HLIR.import os import sys sys.path.append('../p4_hlir/') from p4_hlir.main import HLIR p4_source = sys.argv[1] absolute_source = os.path.join(os.getcwd(), p4_source) if not os.path.isfile(absolute_source): print "Source file '" + p4_source + \ "' could not be opened or does not...
<commit_before><commit_msg>Read a P4 file and get its HLIR.<commit_after>import os import sys sys.path.append('../p4_hlir/') from p4_hlir.main import HLIR p4_source = sys.argv[1] absolute_source = os.path.join(os.getcwd(), p4_source) if not os.path.isfile(absolute_source): print "Source file '" + p4_source + \ ...
31525d83ea74852709b1dd1596854a74c050f9f2
scripts/add_requests.py
scripts/add_requests.py
from google.cloud import firestore import argparse import datetime import names import random def queryUsers(db): users_ref = db.collection(u'users') docs = users_ref.get() docList = list() for doc in docs: docList.append(doc) return docList def queryRequests(db): requests_ref = db.collection(u'requests') do...
Add script to add requests
Add script to add requests
Python
mit
frinder/frinder-app,frinder/frinder-app,frinder/frinder-app
Add script to add requests
from google.cloud import firestore import argparse import datetime import names import random def queryUsers(db): users_ref = db.collection(u'users') docs = users_ref.get() docList = list() for doc in docs: docList.append(doc) return docList def queryRequests(db): requests_ref = db.collection(u'requests') do...
<commit_before><commit_msg>Add script to add requests<commit_after>
from google.cloud import firestore import argparse import datetime import names import random def queryUsers(db): users_ref = db.collection(u'users') docs = users_ref.get() docList = list() for doc in docs: docList.append(doc) return docList def queryRequests(db): requests_ref = db.collection(u'requests') do...
Add script to add requestsfrom google.cloud import firestore import argparse import datetime import names import random def queryUsers(db): users_ref = db.collection(u'users') docs = users_ref.get() docList = list() for doc in docs: docList.append(doc) return docList def queryRequests(db): requests_ref = db.c...
<commit_before><commit_msg>Add script to add requests<commit_after>from google.cloud import firestore import argparse import datetime import names import random def queryUsers(db): users_ref = db.collection(u'users') docs = users_ref.get() docList = list() for doc in docs: docList.append(doc) return docList de...
e5716c90e97d1364c551701f3bae772f08c9c561
upload/management/commands/import_sheet.py
upload/management/commands/import_sheet.py
import csv from django.contrib.auth.models import User from opencivicdata.models import Jurisdiction, Division from upload.backend.parser import import_stream from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): args = '<csv> <jurisdiction> <source> <user>' help = 'Lo...
Add management command to do one-off imports.
Add management command to do one-off imports.
Python
bsd-3-clause
opencivicdata/opencivicdata.org,opencivicdata/opencivicdata.org,opencivicdata/opencivicdata.org
Add management command to do one-off imports.
import csv from django.contrib.auth.models import User from opencivicdata.models import Jurisdiction, Division from upload.backend.parser import import_stream from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): args = '<csv> <jurisdiction> <source> <user>' help = 'Lo...
<commit_before><commit_msg>Add management command to do one-off imports.<commit_after>
import csv from django.contrib.auth.models import User from opencivicdata.models import Jurisdiction, Division from upload.backend.parser import import_stream from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): args = '<csv> <jurisdiction> <source> <user>' help = 'Lo...
Add management command to do one-off imports.import csv from django.contrib.auth.models import User from opencivicdata.models import Jurisdiction, Division from upload.backend.parser import import_stream from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): args = '<csv> <...
<commit_before><commit_msg>Add management command to do one-off imports.<commit_after>import csv from django.contrib.auth.models import User from opencivicdata.models import Jurisdiction, Division from upload.backend.parser import import_stream from django.core.management.base import BaseCommand, CommandError class ...
127dbd5779280fc62f56f06f8ef2733b7aa4cdd9
corehq/apps/case_search/tests/test_case_search_registry.py
corehq/apps/case_search/tests/test_case_search_registry.py
import uuid from django.test import TestCase from casexml.apps.case.mock import CaseBlock from corehq.apps.case_search.models import CaseSearchConfig from corehq.apps.domain.shortcuts import create_user from corehq.apps.es.tests.utils import ( case_search_es_setup, case_search_es_teardown, es_test, ) fro...
Add test setup for registry case search
Add test setup for registry case search
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Add test setup for registry case search
import uuid from django.test import TestCase from casexml.apps.case.mock import CaseBlock from corehq.apps.case_search.models import CaseSearchConfig from corehq.apps.domain.shortcuts import create_user from corehq.apps.es.tests.utils import ( case_search_es_setup, case_search_es_teardown, es_test, ) fro...
<commit_before><commit_msg>Add test setup for registry case search<commit_after>
import uuid from django.test import TestCase from casexml.apps.case.mock import CaseBlock from corehq.apps.case_search.models import CaseSearchConfig from corehq.apps.domain.shortcuts import create_user from corehq.apps.es.tests.utils import ( case_search_es_setup, case_search_es_teardown, es_test, ) fro...
Add test setup for registry case searchimport uuid from django.test import TestCase from casexml.apps.case.mock import CaseBlock from corehq.apps.case_search.models import CaseSearchConfig from corehq.apps.domain.shortcuts import create_user from corehq.apps.es.tests.utils import ( case_search_es_setup, case...
<commit_before><commit_msg>Add test setup for registry case search<commit_after>import uuid from django.test import TestCase from casexml.apps.case.mock import CaseBlock from corehq.apps.case_search.models import CaseSearchConfig from corehq.apps.domain.shortcuts import create_user from corehq.apps.es.tests.utils im...
3f3f6e2e3a7f62e7fcaa24c4260a0f09e0800b6a
tests/test_bounce.py
tests/test_bounce.py
import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) #ball = pygame.image.load("ball.bmp") ball = pygame.surface.Surface((100, 100)) ball.fill(pygame.Color(0, 0, 255, 255)) ballrect = ball.get_rect() clock = pygame.time.Clock() while ...
Add simple animation example from pygame tutorial
Add simple animation example from pygame tutorial
Python
lgpl-2.1
caseyc37/pygame_cffi,CTPUG/pygame_cffi,CTPUG/pygame_cffi,CTPUG/pygame_cffi,GertBurger/pygame_cffi,GertBurger/pygame_cffi,caseyc37/pygame_cffi,caseyc37/pygame_cffi,GertBurger/pygame_cffi,GertBurger/pygame_cffi
Add simple animation example from pygame tutorial
import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) #ball = pygame.image.load("ball.bmp") ball = pygame.surface.Surface((100, 100)) ball.fill(pygame.Color(0, 0, 255, 255)) ballrect = ball.get_rect() clock = pygame.time.Clock() while ...
<commit_before><commit_msg>Add simple animation example from pygame tutorial<commit_after>
import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) #ball = pygame.image.load("ball.bmp") ball = pygame.surface.Surface((100, 100)) ball.fill(pygame.Color(0, 0, 255, 255)) ballrect = ball.get_rect() clock = pygame.time.Clock() while ...
Add simple animation example from pygame tutorialimport sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) #ball = pygame.image.load("ball.bmp") ball = pygame.surface.Surface((100, 100)) ball.fill(pygame.Color(0, 0, 255, 255)) ballrect = ba...
<commit_before><commit_msg>Add simple animation example from pygame tutorial<commit_after>import sys, pygame pygame.init() size = width, height = 320, 240 speed = [2, 2] black = 0, 0, 0 screen = pygame.display.set_mode(size) #ball = pygame.image.load("ball.bmp") ball = pygame.surface.Surface((100, 100)) ball.fill(py...
264b4112ccfdebeb7524036b6f32d49fa38bb321
tests/test_heroku.py
tests/test_heroku.py
"""Tests for the Wallace API.""" import subprocess import re import requests class TestHeroku(object): """The Heroku test class.""" def test_sandbox(self): """Launch the experiment on Heroku.""" sandbox_output = subprocess.check_output( "cd examples/bartlett1932; wallace sandbox...
Create test for sandboxing via Heroku
Create test for sandboxing via Heroku
Python
mit
berkeley-cocosci/Wallace,suchow/Wallace,Dallinger/Dallinger,jcpeterson/Dallinger,jcpeterson/Dallinger,Dallinger/Dallinger,suchow/Wallace,berkeley-cocosci/Wallace,jcpeterson/Dallinger,suchow/Wallace,jcpeterson/Dallinger,Dallinger/Dallinger,jcpeterson/Dallinger,berkeley-cocosci/Wallace,Dallinger/Dallinger,Dallinger/Dalli...
Create test for sandboxing via Heroku
"""Tests for the Wallace API.""" import subprocess import re import requests class TestHeroku(object): """The Heroku test class.""" def test_sandbox(self): """Launch the experiment on Heroku.""" sandbox_output = subprocess.check_output( "cd examples/bartlett1932; wallace sandbox...
<commit_before><commit_msg>Create test for sandboxing via Heroku<commit_after>
"""Tests for the Wallace API.""" import subprocess import re import requests class TestHeroku(object): """The Heroku test class.""" def test_sandbox(self): """Launch the experiment on Heroku.""" sandbox_output = subprocess.check_output( "cd examples/bartlett1932; wallace sandbox...
Create test for sandboxing via Heroku"""Tests for the Wallace API.""" import subprocess import re import requests class TestHeroku(object): """The Heroku test class.""" def test_sandbox(self): """Launch the experiment on Heroku.""" sandbox_output = subprocess.check_output( "cd e...
<commit_before><commit_msg>Create test for sandboxing via Heroku<commit_after>"""Tests for the Wallace API.""" import subprocess import re import requests class TestHeroku(object): """The Heroku test class.""" def test_sandbox(self): """Launch the experiment on Heroku.""" sandbox_output = s...
c20b1b8c2362f2484baacd15acd9d72ae1e2b6d7
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. git-svn-id: 77a43f9646713b91fea7788fad5dfbf67e151ece@7427 94b884b6-d6fd-0310-90d3-974f1d3f35e1
Python
bsd-3-clause
teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,jasonmccampbell/numpy-refactor-sprint,jasonmccampbell/numpy-refactor-sprint,Ademan/NumPy-GSoC,teoliphant/numpy-refactor,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,teoliphant/numpy-refactor,Ademan/NumPy-GSoC,Ademan/NumPy-GSoC,Ademan/Num...
Add a tool for determining active SVN committers. git-svn-id: 77a43f9646713b91fea7788fad5dfbf67e151ece@7427 94b884b6-d6fd-0310-90d3-974f1d3f35e1
# 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. git-svn-id: 77a43f9646713b91fea7788fad5dfbf67e151ece@7427 94b884b6-d6fd-0310-90d3-974f1d3f35e1<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. git-svn-id: 77a43f9646713b91fea7788fad5dfbf67e151ece@7427 94b884b6-d6fd-0310-90d3-974f1d3f35e1 # 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(file...
<commit_before><commit_msg>Add a tool for determining active SVN committers. git-svn-id: 77a43f9646713b91fea7788fad5dfbf67e151ece@7427 94b884b6-d6fd-0310-90d3-974f1d3f35e1<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_cou...
d3df6283db7e9ed56c41f4e7a866c8622743da40
set_markdown_template.py
set_markdown_template.py
import sublime import sublime_plugin from os.path import exists, join TEMPLATE_NAME = "custom-template.html" def set_template(): path = join(sublime.packages_path(), "User", TEMPLATE_NAME) settings = sublime.load_settings("MarkdownPreview.sublime-settings") if settings.get("html_template") != path: ...
Add script to set markdown template
Add script to set markdown template
Python
mit
facelessuser/SublimeRandomCrap,facelessuser/SublimeRandomCrap
Add script to set markdown template
import sublime import sublime_plugin from os.path import exists, join TEMPLATE_NAME = "custom-template.html" def set_template(): path = join(sublime.packages_path(), "User", TEMPLATE_NAME) settings = sublime.load_settings("MarkdownPreview.sublime-settings") if settings.get("html_template") != path: ...
<commit_before><commit_msg>Add script to set markdown template<commit_after>
import sublime import sublime_plugin from os.path import exists, join TEMPLATE_NAME = "custom-template.html" def set_template(): path = join(sublime.packages_path(), "User", TEMPLATE_NAME) settings = sublime.load_settings("MarkdownPreview.sublime-settings") if settings.get("html_template") != path: ...
Add script to set markdown templateimport sublime import sublime_plugin from os.path import exists, join TEMPLATE_NAME = "custom-template.html" def set_template(): path = join(sublime.packages_path(), "User", TEMPLATE_NAME) settings = sublime.load_settings("MarkdownPreview.sublime-settings") if settings....
<commit_before><commit_msg>Add script to set markdown template<commit_after>import sublime import sublime_plugin from os.path import exists, join TEMPLATE_NAME = "custom-template.html" def set_template(): path = join(sublime.packages_path(), "User", TEMPLATE_NAME) settings = sublime.load_settings("MarkdownPr...
53b17d83300d5d1607e0124229bf830cb1eb8a31
xmlrpc_download.py
xmlrpc_download.py
#!/usr/bin/env python import json import sys import xmlrpc.client # XXX Edit this to your liking MAX_BUG_ID = 3210 EXPORT_FILE = "bugzilla.json" BLACKLIST = [489, 3188] class RPCEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, xmlrpc.client.DateTime): return o.value raise NotImplementedErr...
Add an XML-RPC downloader for bugzilla
Add an XML-RPC downloader for bugzilla
Python
mit
jleclanche/bugzilla-to-github
Add an XML-RPC downloader for bugzilla
#!/usr/bin/env python import json import sys import xmlrpc.client # XXX Edit this to your liking MAX_BUG_ID = 3210 EXPORT_FILE = "bugzilla.json" BLACKLIST = [489, 3188] class RPCEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, xmlrpc.client.DateTime): return o.value raise NotImplementedErr...
<commit_before><commit_msg>Add an XML-RPC downloader for bugzilla<commit_after>
#!/usr/bin/env python import json import sys import xmlrpc.client # XXX Edit this to your liking MAX_BUG_ID = 3210 EXPORT_FILE = "bugzilla.json" BLACKLIST = [489, 3188] class RPCEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, xmlrpc.client.DateTime): return o.value raise NotImplementedErr...
Add an XML-RPC downloader for bugzilla#!/usr/bin/env python import json import sys import xmlrpc.client # XXX Edit this to your liking MAX_BUG_ID = 3210 EXPORT_FILE = "bugzilla.json" BLACKLIST = [489, 3188] class RPCEncoder(json.JSONEncoder): def default(self, o): if isinstance(o, xmlrpc.client.DateTime): re...
<commit_before><commit_msg>Add an XML-RPC downloader for bugzilla<commit_after>#!/usr/bin/env python import json import sys import xmlrpc.client # XXX Edit this to your liking MAX_BUG_ID = 3210 EXPORT_FILE = "bugzilla.json" BLACKLIST = [489, 3188] class RPCEncoder(json.JSONEncoder): def default(self, o): if isi...
d1afa600338bb0d9c1c040a42b6de5504e48d699
similar_photos_sqlite.py
similar_photos_sqlite.py
import graphlab import sqlite3 def main(): # load photos with their deep features photos = graphlab.SFrame('photos_deep_features.gl') # train a nearest neighbors model on deep features of photos nn_model = graphlab.nearest_neighbors.create(photos, features=['deep_features'], label='path') # ...
Store names of similar photos into sqlite database
Store names of similar photos into sqlite database
Python
mit
aysent/yelp-photo-explorer
Store names of similar photos into sqlite database
import graphlab import sqlite3 def main(): # load photos with their deep features photos = graphlab.SFrame('photos_deep_features.gl') # train a nearest neighbors model on deep features of photos nn_model = graphlab.nearest_neighbors.create(photos, features=['deep_features'], label='path') # ...
<commit_before><commit_msg>Store names of similar photos into sqlite database<commit_after>
import graphlab import sqlite3 def main(): # load photos with their deep features photos = graphlab.SFrame('photos_deep_features.gl') # train a nearest neighbors model on deep features of photos nn_model = graphlab.nearest_neighbors.create(photos, features=['deep_features'], label='path') # ...
Store names of similar photos into sqlite databaseimport graphlab import sqlite3 def main(): # load photos with their deep features photos = graphlab.SFrame('photos_deep_features.gl') # train a nearest neighbors model on deep features of photos nn_model = graphlab.nearest_neighbors.create(photos,...
<commit_before><commit_msg>Store names of similar photos into sqlite database<commit_after>import graphlab import sqlite3 def main(): # load photos with their deep features photos = graphlab.SFrame('photos_deep_features.gl') # train a nearest neighbors model on deep features of photos nn_model = ...
272b2238ce9d0d8d1424a470bb7f4f7b41edd9e0
script/unarchive-forecast.py
script/unarchive-forecast.py
#!/usr/bin/env python3 import pickle import sys class Forecast: pass for fn in sys.argv: with open(fn,"rb") as fp: forecast = pickle.load(fp) print(dir(forecast))
Add unarchiver of the forecast
Add unarchiver of the forecast
Python
mit
nushio3/UFCORIN,nushio3/UFCORIN,nushio3/UFCORIN,nushio3/UFCORIN,nushio3/UFCORIN
Add unarchiver of the forecast
#!/usr/bin/env python3 import pickle import sys class Forecast: pass for fn in sys.argv: with open(fn,"rb") as fp: forecast = pickle.load(fp) print(dir(forecast))
<commit_before><commit_msg>Add unarchiver of the forecast<commit_after>
#!/usr/bin/env python3 import pickle import sys class Forecast: pass for fn in sys.argv: with open(fn,"rb") as fp: forecast = pickle.load(fp) print(dir(forecast))
Add unarchiver of the forecast#!/usr/bin/env python3 import pickle import sys class Forecast: pass for fn in sys.argv: with open(fn,"rb") as fp: forecast = pickle.load(fp) print(dir(forecast))
<commit_before><commit_msg>Add unarchiver of the forecast<commit_after>#!/usr/bin/env python3 import pickle import sys class Forecast: pass for fn in sys.argv: with open(fn,"rb") as fp: forecast = pickle.load(fp) print(dir(forecast))
733726467c397ff530a556e9a624466994e7c13c
wagtailmenus/tests/test_commands.py
wagtailmenus/tests/test_commands.py
from __future__ import absolute_import, unicode_literals from django.test import TestCase from django.core.management import call_command from wagtail.wagtailcore.models import Site from wagtailmenus import app_settings class TestAutoPopulateMainMenus(TestCase): fixtures = ['test.json'] def setUp(self): ...
Add tests for new command
Add tests for new command
Python
mit
rkhleics/wagtailmenus,rkhleics/wagtailmenus,ababic/wagtailmenus,rkhleics/wagtailmenus,ababic/wagtailmenus,ababic/wagtailmenus
Add tests for new command
from __future__ import absolute_import, unicode_literals from django.test import TestCase from django.core.management import call_command from wagtail.wagtailcore.models import Site from wagtailmenus import app_settings class TestAutoPopulateMainMenus(TestCase): fixtures = ['test.json'] def setUp(self): ...
<commit_before><commit_msg>Add tests for new command<commit_after>
from __future__ import absolute_import, unicode_literals from django.test import TestCase from django.core.management import call_command from wagtail.wagtailcore.models import Site from wagtailmenus import app_settings class TestAutoPopulateMainMenus(TestCase): fixtures = ['test.json'] def setUp(self): ...
Add tests for new commandfrom __future__ import absolute_import, unicode_literals from django.test import TestCase from django.core.management import call_command from wagtail.wagtailcore.models import Site from wagtailmenus import app_settings class TestAutoPopulateMainMenus(TestCase): fixtures = ['test.json']...
<commit_before><commit_msg>Add tests for new command<commit_after>from __future__ import absolute_import, unicode_literals from django.test import TestCase from django.core.management import call_command from wagtail.wagtailcore.models import Site from wagtailmenus import app_settings class TestAutoPopulateMainMenu...
4cb37cabb3aa171391958f4d6e6d0eb5b8731989
climate_data/migrations/0022_auto_20170623_0236.py
climate_data/migrations/0022_auto_20170623_0236.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-06-23 02:36 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('climate_data', '0021_auto_20170619_2053'), ] opera...
Add migration which updates field / model metadata.
Add migration which updates field / model metadata.
Python
apache-2.0
qubs/data-centre,qubs/climate-data-api,qubs/data-centre,qubs/climate-data-api
Add migration which updates field / model metadata.
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-06-23 02:36 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('climate_data', '0021_auto_20170619_2053'), ] opera...
<commit_before><commit_msg>Add migration which updates field / model metadata.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-06-23 02:36 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('climate_data', '0021_auto_20170619_2053'), ] opera...
Add migration which updates field / model metadata.# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-06-23 02:36 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('climate_...
<commit_before><commit_msg>Add migration which updates field / model metadata.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-06-23 02:36 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration):...
32525203ee392be60c0ea32a817323ccf5cace12
kirppu/tests/test_itemdump.py
kirppu/tests/test_itemdump.py
from django.test import Client, TestCase from ..models import Item from .factories import EventFactory, EventPermissionFactory, ItemFactory, ItemTypeFactory, UserFactory, VendorFactory class ItemDumpTest(TestCase): def _addPermission(self): EventPermissionFactory(event=self.event, user=self.user, can_see...
Add simple test for item dump.
Add simple test for item dump.
Python
mit
jlaunonen/kirppu,jlaunonen/kirppu,jlaunonen/kirppu,jlaunonen/kirppu
Add simple test for item dump.
from django.test import Client, TestCase from ..models import Item from .factories import EventFactory, EventPermissionFactory, ItemFactory, ItemTypeFactory, UserFactory, VendorFactory class ItemDumpTest(TestCase): def _addPermission(self): EventPermissionFactory(event=self.event, user=self.user, can_see...
<commit_before><commit_msg>Add simple test for item dump.<commit_after>
from django.test import Client, TestCase from ..models import Item from .factories import EventFactory, EventPermissionFactory, ItemFactory, ItemTypeFactory, UserFactory, VendorFactory class ItemDumpTest(TestCase): def _addPermission(self): EventPermissionFactory(event=self.event, user=self.user, can_see...
Add simple test for item dump.from django.test import Client, TestCase from ..models import Item from .factories import EventFactory, EventPermissionFactory, ItemFactory, ItemTypeFactory, UserFactory, VendorFactory class ItemDumpTest(TestCase): def _addPermission(self): EventPermissionFactory(event=self....
<commit_before><commit_msg>Add simple test for item dump.<commit_after>from django.test import Client, TestCase from ..models import Item from .factories import EventFactory, EventPermissionFactory, ItemFactory, ItemTypeFactory, UserFactory, VendorFactory class ItemDumpTest(TestCase): def _addPermission(self): ...
e5e068c5fa94d68aa81dbcd3e498ba17dae37d2c
axelrod/tests/test_reflex.py
axelrod/tests/test_reflex.py
""" Test suite for Reflex Axelrod PD player. """ import axelrod from test_player import TestPlayer class Reflex_test(TestPlayer): def test_initial_nice_strategy(self): """ First response should always be cooperation. """ p1 = axelrod.Reflex() p2 = axelrod.Player() self.assertEqual...
""" Test suite for Reflex Axelrod PD player. """ import axelrod from test_player import TestPlayer class Reflex_test(TestPlayer): name = "Reflex" player = axelrod.Reflex stochastic = False def test_strategy(self): """ First response should always be cooperation. """ p1 = axelrod.Ref...
Simplify tests to new format.
Simplify tests to new format.
Python
mit
emmagordon/Axelrod,uglyfruitcake/Axelrod,kathryncrouch/Axelrod,emmagordon/Axelrod,mojones/Axelrod,drvinceknight/Axelrod,bootandy/Axelrod,uglyfruitcake/Axelrod,bootandy/Axelrod,risicle/Axelrod,risicle/Axelrod,mojones/Axelrod,kathryncrouch/Axelrod
""" Test suite for Reflex Axelrod PD player. """ import axelrod from test_player import TestPlayer class Reflex_test(TestPlayer): def test_initial_nice_strategy(self): """ First response should always be cooperation. """ p1 = axelrod.Reflex() p2 = axelrod.Player() self.assertEqual...
""" Test suite for Reflex Axelrod PD player. """ import axelrod from test_player import TestPlayer class Reflex_test(TestPlayer): name = "Reflex" player = axelrod.Reflex stochastic = False def test_strategy(self): """ First response should always be cooperation. """ p1 = axelrod.Ref...
<commit_before>""" Test suite for Reflex Axelrod PD player. """ import axelrod from test_player import TestPlayer class Reflex_test(TestPlayer): def test_initial_nice_strategy(self): """ First response should always be cooperation. """ p1 = axelrod.Reflex() p2 = axelrod.Player() s...
""" Test suite for Reflex Axelrod PD player. """ import axelrod from test_player import TestPlayer class Reflex_test(TestPlayer): name = "Reflex" player = axelrod.Reflex stochastic = False def test_strategy(self): """ First response should always be cooperation. """ p1 = axelrod.Ref...
""" Test suite for Reflex Axelrod PD player. """ import axelrod from test_player import TestPlayer class Reflex_test(TestPlayer): def test_initial_nice_strategy(self): """ First response should always be cooperation. """ p1 = axelrod.Reflex() p2 = axelrod.Player() self.assertEqual...
<commit_before>""" Test suite for Reflex Axelrod PD player. """ import axelrod from test_player import TestPlayer class Reflex_test(TestPlayer): def test_initial_nice_strategy(self): """ First response should always be cooperation. """ p1 = axelrod.Reflex() p2 = axelrod.Player() s...
357067b0cfe6fd781813404ba7d587f5bd00917a
bazaar/goods/utils.py
bazaar/goods/utils.py
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from .models import Product, PriceList def get_default_price_list(): """ Return the default price list """ try: return PriceList.objects.get(default=True) except PriceList.DoesNotExist: ...
Add utility function to retrieve default price list and to create a product from a good
Add utility function to retrieve default price list and to create a product from a good
Python
bsd-2-clause
evonove/django-bazaar,meghabhoj/NEWBAZAAR,meghabhoj/NEWBAZAAR,meghabhoj/NEWBAZAAR,evonove/django-bazaar,evonove/django-bazaar
Add utility function to retrieve default price list and to create a product from a good
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from .models import Product, PriceList def get_default_price_list(): """ Return the default price list """ try: return PriceList.objects.get(default=True) except PriceList.DoesNotExist: ...
<commit_before><commit_msg>Add utility function to retrieve default price list and to create a product from a good<commit_after>
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from .models import Product, PriceList def get_default_price_list(): """ Return the default price list """ try: return PriceList.objects.get(default=True) except PriceList.DoesNotExist: ...
Add utility function to retrieve default price list and to create a product from a goodfrom __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from .models import Product, PriceList def get_default_price_list(): """ Return the default price list """ try: ...
<commit_before><commit_msg>Add utility function to retrieve default price list and to create a product from a good<commit_after>from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from .models import Product, PriceList def get_default_price_list(): """ Return the ...
576c2a1565fe9860c1188a9862b54e24aab64ed4
tests/test_update_languages.py
tests/test_update_languages.py
# tests.test_update_languagess # coding=utf-8 from __future__ import unicode_literals import nose.tools as nose from mock import patch import utilities.update_languages as update_langs from tests import set_up, tear_down from tests.decorators import redirect_stdout_unicode @nose.with_setup(set_up, tear_down) @patc...
Add tests for update_languages utility
Add tests for update_languages utility
Python
mit
caleb531/youversion-suggest,caleb531/youversion-suggest
Add tests for update_languages utility
# tests.test_update_languagess # coding=utf-8 from __future__ import unicode_literals import nose.tools as nose from mock import patch import utilities.update_languages as update_langs from tests import set_up, tear_down from tests.decorators import redirect_stdout_unicode @nose.with_setup(set_up, tear_down) @patc...
<commit_before><commit_msg>Add tests for update_languages utility<commit_after>
# tests.test_update_languagess # coding=utf-8 from __future__ import unicode_literals import nose.tools as nose from mock import patch import utilities.update_languages as update_langs from tests import set_up, tear_down from tests.decorators import redirect_stdout_unicode @nose.with_setup(set_up, tear_down) @patc...
Add tests for update_languages utility# tests.test_update_languagess # coding=utf-8 from __future__ import unicode_literals import nose.tools as nose from mock import patch import utilities.update_languages as update_langs from tests import set_up, tear_down from tests.decorators import redirect_stdout_unicode @no...
<commit_before><commit_msg>Add tests for update_languages utility<commit_after># tests.test_update_languagess # coding=utf-8 from __future__ import unicode_literals import nose.tools as nose from mock import patch import utilities.update_languages as update_langs from tests import set_up, tear_down from tests.decora...
66da5a6bd67ae3645eeff5856ae4614e4be9f5d8
microdrop/tests/update_dmf_control_board.py
microdrop/tests/update_dmf_control_board.py
import os import subprocess if __name__ == '__main__': os.chdir('microdrop/plugins') if not os.path.exists('dmf_control_board'): print 'Clone dmf_control_board repository...' subprocess.call(['git', 'clone', 'http://microfluidics.utoronto.ca/git/dmf_control_board.git']...
Add script for downloading latest dmf_control_board
Add script for downloading latest dmf_control_board
Python
bsd-3-clause
wheeler-microfluidics/microdrop
Add script for downloading latest dmf_control_board
import os import subprocess if __name__ == '__main__': os.chdir('microdrop/plugins') if not os.path.exists('dmf_control_board'): print 'Clone dmf_control_board repository...' subprocess.call(['git', 'clone', 'http://microfluidics.utoronto.ca/git/dmf_control_board.git']...
<commit_before><commit_msg>Add script for downloading latest dmf_control_board<commit_after>
import os import subprocess if __name__ == '__main__': os.chdir('microdrop/plugins') if not os.path.exists('dmf_control_board'): print 'Clone dmf_control_board repository...' subprocess.call(['git', 'clone', 'http://microfluidics.utoronto.ca/git/dmf_control_board.git']...
Add script for downloading latest dmf_control_boardimport os import subprocess if __name__ == '__main__': os.chdir('microdrop/plugins') if not os.path.exists('dmf_control_board'): print 'Clone dmf_control_board repository...' subprocess.call(['git', 'clone', 'http://mi...
<commit_before><commit_msg>Add script for downloading latest dmf_control_board<commit_after>import os import subprocess if __name__ == '__main__': os.chdir('microdrop/plugins') if not os.path.exists('dmf_control_board'): print 'Clone dmf_control_board repository...' subprocess.call...
4173d3abeeda29ffbd81379233e88311780b6b09
tests/test_load.py
tests/test_load.py
from .utils import TemplateTestCase, Mock from knights import Template class LoadTagTest(TemplateTestCase): def test_load_default(self): t = Template('{! knights.defaultfilters !}') self.assertIn('title', t.parser.filters)
Add a test for library loading
Add a test for library loading
Python
mit
funkybob/knights-templater,funkybob/knights-templater
Add a test for library loading
from .utils import TemplateTestCase, Mock from knights import Template class LoadTagTest(TemplateTestCase): def test_load_default(self): t = Template('{! knights.defaultfilters !}') self.assertIn('title', t.parser.filters)
<commit_before><commit_msg>Add a test for library loading<commit_after>
from .utils import TemplateTestCase, Mock from knights import Template class LoadTagTest(TemplateTestCase): def test_load_default(self): t = Template('{! knights.defaultfilters !}') self.assertIn('title', t.parser.filters)
Add a test for library loadingfrom .utils import TemplateTestCase, Mock from knights import Template class LoadTagTest(TemplateTestCase): def test_load_default(self): t = Template('{! knights.defaultfilters !}') self.assertIn('title', t.parser.filters)
<commit_before><commit_msg>Add a test for library loading<commit_after>from .utils import TemplateTestCase, Mock from knights import Template class LoadTagTest(TemplateTestCase): def test_load_default(self): t = Template('{! knights.defaultfilters !}') self.assertIn('title', t.parser.filters)
fe62ab5e609aba0c1739ca81d5cdd266d208a217
Build/make_payload.py
Build/make_payload.py
'''Quick and dirty script to generate vs.payload blocks for a set of URLs. Usage: make_payload.py URL [URL ...] ''' __author__ = 'Steve Dower <[email protected]>' __version__ = '0.1' import hashlib import os import urllib.request import sys for u in sys.argv[1:]: is_temp = False if os.path.isf...
Add MSI generating tool for python updating
Add MSI generating tool for python updating
Python
apache-2.0
int19h/PTVS,int19h/PTVS,int19h/PTVS,int19h/PTVS,int19h/PTVS,int19h/PTVS
Add MSI generating tool for python updating
'''Quick and dirty script to generate vs.payload blocks for a set of URLs. Usage: make_payload.py URL [URL ...] ''' __author__ = 'Steve Dower <[email protected]>' __version__ = '0.1' import hashlib import os import urllib.request import sys for u in sys.argv[1:]: is_temp = False if os.path.isf...
<commit_before><commit_msg>Add MSI generating tool for python updating<commit_after>
'''Quick and dirty script to generate vs.payload blocks for a set of URLs. Usage: make_payload.py URL [URL ...] ''' __author__ = 'Steve Dower <[email protected]>' __version__ = '0.1' import hashlib import os import urllib.request import sys for u in sys.argv[1:]: is_temp = False if os.path.isf...
Add MSI generating tool for python updating'''Quick and dirty script to generate vs.payload blocks for a set of URLs. Usage: make_payload.py URL [URL ...] ''' __author__ = 'Steve Dower <[email protected]>' __version__ = '0.1' import hashlib import os import urllib.request import sys for u in sys.argv[...
<commit_before><commit_msg>Add MSI generating tool for python updating<commit_after>'''Quick and dirty script to generate vs.payload blocks for a set of URLs. Usage: make_payload.py URL [URL ...] ''' __author__ = 'Steve Dower <[email protected]>' __version__ = '0.1' import hashlib import os import urll...
739e302506cb542011b8f022c6175637feaf20b4
misc/disablepasscomplexity.py
misc/disablepasscomplexity.py
#!/usr/bin/env python import pyghmi.util.webclient as webclient import json import os import sys tmppassword = 'to3BdS91ABrd' missingargs = False if 'XCCUSER' not in os.environ: print('Must set XCCUSER environment variable') missingargs = True if 'XCCPASS' not in os.environ: print('Must set XCCPASS environ...
Add an example for just disabling password complexity
Add an example for just disabling password complexity
Python
apache-2.0
jjohnson42/confluent,jjohnson42/confluent,xcat2/confluent,xcat2/confluent,jjohnson42/confluent,xcat2/confluent,jjohnson42/confluent,xcat2/confluent,xcat2/confluent,jjohnson42/confluent
Add an example for just disabling password complexity
#!/usr/bin/env python import pyghmi.util.webclient as webclient import json import os import sys tmppassword = 'to3BdS91ABrd' missingargs = False if 'XCCUSER' not in os.environ: print('Must set XCCUSER environment variable') missingargs = True if 'XCCPASS' not in os.environ: print('Must set XCCPASS environ...
<commit_before><commit_msg>Add an example for just disabling password complexity<commit_after>
#!/usr/bin/env python import pyghmi.util.webclient as webclient import json import os import sys tmppassword = 'to3BdS91ABrd' missingargs = False if 'XCCUSER' not in os.environ: print('Must set XCCUSER environment variable') missingargs = True if 'XCCPASS' not in os.environ: print('Must set XCCPASS environ...
Add an example for just disabling password complexity#!/usr/bin/env python import pyghmi.util.webclient as webclient import json import os import sys tmppassword = 'to3BdS91ABrd' missingargs = False if 'XCCUSER' not in os.environ: print('Must set XCCUSER environment variable') missingargs = True if 'XCCPASS' n...
<commit_before><commit_msg>Add an example for just disabling password complexity<commit_after>#!/usr/bin/env python import pyghmi.util.webclient as webclient import json import os import sys tmppassword = 'to3BdS91ABrd' missingargs = False if 'XCCUSER' not in os.environ: print('Must set XCCUSER environment variabl...
72c38a8b67b23080ab9fea7a6fd3405b2f88ad7a
wm_metrics/count_articles_improved_for_image_collection.py
wm_metrics/count_articles_improved_for_image_collection.py
# -*- coding: utf-8 -*- """Analysing a Glamorous report to identify articles improved.""" import sys import xml.dom.minidom def handle_node_attribute(node, tag_name, attribute_name): """Return the contents of a tag based on his given name inside of a given node.""" element = node.getElementsByTagName(tag_na...
Add script to compute articles improved for media collection
Add script to compute articles improved for media collection
Python
mit
Commonists/wm_metrics,Commonists/wm_metrics,Commonists/wm_metrics,Commonists/wm_metrics
Add script to compute articles improved for media collection
# -*- coding: utf-8 -*- """Analysing a Glamorous report to identify articles improved.""" import sys import xml.dom.minidom def handle_node_attribute(node, tag_name, attribute_name): """Return the contents of a tag based on his given name inside of a given node.""" element = node.getElementsByTagName(tag_na...
<commit_before><commit_msg>Add script to compute articles improved for media collection<commit_after>
# -*- coding: utf-8 -*- """Analysing a Glamorous report to identify articles improved.""" import sys import xml.dom.minidom def handle_node_attribute(node, tag_name, attribute_name): """Return the contents of a tag based on his given name inside of a given node.""" element = node.getElementsByTagName(tag_na...
Add script to compute articles improved for media collection# -*- coding: utf-8 -*- """Analysing a Glamorous report to identify articles improved.""" import sys import xml.dom.minidom def handle_node_attribute(node, tag_name, attribute_name): """Return the contents of a tag based on his given name inside of a g...
<commit_before><commit_msg>Add script to compute articles improved for media collection<commit_after># -*- coding: utf-8 -*- """Analysing a Glamorous report to identify articles improved.""" import sys import xml.dom.minidom def handle_node_attribute(node, tag_name, attribute_name): """Return the contents of a ...
bd2f302e2bcc02a3f222d0c00be9fe61351517e2
flask_typecheck_decorator.py
flask_typecheck_decorator.py
#!/usr/bin/env python3 import json from flask import Response, Flask, request import inspect from typecheck import typecheck from typing import ( List, Dict) def typed_service(func): def service(): print(request.json) print(type(request.json)) args_...
Add first draft of Flask type check decorator
Add first draft of Flask type check decorator
Python
mit
jacopofar/runtime_typecheck
Add first draft of Flask type check decorator
#!/usr/bin/env python3 import json from flask import Response, Flask, request import inspect from typecheck import typecheck from typing import ( List, Dict) def typed_service(func): def service(): print(request.json) print(type(request.json)) args_...
<commit_before><commit_msg>Add first draft of Flask type check decorator<commit_after>
#!/usr/bin/env python3 import json from flask import Response, Flask, request import inspect from typecheck import typecheck from typing import ( List, Dict) def typed_service(func): def service(): print(request.json) print(type(request.json)) args_...
Add first draft of Flask type check decorator#!/usr/bin/env python3 import json from flask import Response, Flask, request import inspect from typecheck import typecheck from typing import ( List, Dict) def typed_service(func): def service(): print(request.json) ...
<commit_before><commit_msg>Add first draft of Flask type check decorator<commit_after>#!/usr/bin/env python3 import json from flask import Response, Flask, request import inspect from typecheck import typecheck from typing import ( List, Dict) def typed_service(func): def ...
0b547b69c9e603f77de6d8855a2fe1f153ba49d5
busshaming/fetch_realtime.py
busshaming/fetch_realtime.py
import os from datetime import datetime, timedelta import django import pytz import requests from google.transit import gtfs_realtime_pb2 django.setup() from busshaming.models import Feed, TripDate, RealtimeEntry, Stop GTFS_API_KEY = os.environ.get('TRANSPORT_NSW_API_KEY') def process_trip_update(trip_dates, stop...
Add script which logs realtime data into the db.
Add script which logs realtime data into the db.
Python
mit
katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming
Add script which logs realtime data into the db.
import os from datetime import datetime, timedelta import django import pytz import requests from google.transit import gtfs_realtime_pb2 django.setup() from busshaming.models import Feed, TripDate, RealtimeEntry, Stop GTFS_API_KEY = os.environ.get('TRANSPORT_NSW_API_KEY') def process_trip_update(trip_dates, stop...
<commit_before><commit_msg>Add script which logs realtime data into the db.<commit_after>
import os from datetime import datetime, timedelta import django import pytz import requests from google.transit import gtfs_realtime_pb2 django.setup() from busshaming.models import Feed, TripDate, RealtimeEntry, Stop GTFS_API_KEY = os.environ.get('TRANSPORT_NSW_API_KEY') def process_trip_update(trip_dates, stop...
Add script which logs realtime data into the db.import os from datetime import datetime, timedelta import django import pytz import requests from google.transit import gtfs_realtime_pb2 django.setup() from busshaming.models import Feed, TripDate, RealtimeEntry, Stop GTFS_API_KEY = os.environ.get('TRANSPORT_NSW_API_...
<commit_before><commit_msg>Add script which logs realtime data into the db.<commit_after>import os from datetime import datetime, timedelta import django import pytz import requests from google.transit import gtfs_realtime_pb2 django.setup() from busshaming.models import Feed, TripDate, RealtimeEntry, Stop GTFS_API...
f226c81bbc7052dcac0993bacdaa4a93761b4dce
cvmfs/webapi/test-api.py
cvmfs/webapi/test-api.py
#! /usr/bin/env python # This tester listens on port 8051 for a single http request, with # a URL that starts with /api/v.... # It exits after one request. # It assumes that GeoIP is already installed on the current machine # with an installation of cvmfs-server, but reads the rest from # the current directory. fr...
Add this little development tester for webapi
Add this little development tester for webapi
Python
bsd-3-clause
trshaffer/cvmfs,MicBrain/cvmfs,cvmfs-testing/cvmfs,alhowaidi/cvmfsNDN,Moliholy/cvmfs,alhowaidi/cvmfsNDN,trshaffer/cvmfs,DrDaveD/cvmfs,Moliholy/cvmfs,cvmfs/cvmfs,djw8605/cvmfs,reneme/cvmfs,MicBrain/cvmfs,cvmfs/cvmfs,Moliholy/cvmfs,trshaffer/cvmfs,cvmfs/cvmfs,alhowaidi/cvmfsNDN,cvmfs-testing/cvmfs,DrDaveD/cvmfs,Moliholy/...
Add this little development tester for webapi
#! /usr/bin/env python # This tester listens on port 8051 for a single http request, with # a URL that starts with /api/v.... # It exits after one request. # It assumes that GeoIP is already installed on the current machine # with an installation of cvmfs-server, but reads the rest from # the current directory. fr...
<commit_before><commit_msg>Add this little development tester for webapi<commit_after>
#! /usr/bin/env python # This tester listens on port 8051 for a single http request, with # a URL that starts with /api/v.... # It exits after one request. # It assumes that GeoIP is already installed on the current machine # with an installation of cvmfs-server, but reads the rest from # the current directory. fr...
Add this little development tester for webapi#! /usr/bin/env python # This tester listens on port 8051 for a single http request, with # a URL that starts with /api/v.... # It exits after one request. # It assumes that GeoIP is already installed on the current machine # with an installation of cvmfs-server, but read...
<commit_before><commit_msg>Add this little development tester for webapi<commit_after>#! /usr/bin/env python # This tester listens on port 8051 for a single http request, with # a URL that starts with /api/v.... # It exits after one request. # It assumes that GeoIP is already installed on the current machine # with ...
2dfd9cfc42e17f36446ff5da36e497bfff8d1d89
sara_flexbe_states/src/sara_flexbe_states/Wonderland_Request.py
sara_flexbe_states/src/sara_flexbe_states/Wonderland_Request.py
#!/usr/bin/env python # encoding=utf8 import requests from flexbe_core import EventState, Logger class Wonderland_Request(EventState): ''' MoveArm receive a ROS pose as input and launch a ROS service with the same pose ># url string url to call <= response string Finish job. ''' def __init__(sel...
Add a state for send requests to Wonderland.
Add a state for send requests to Wonderland.
Python
bsd-3-clause
WalkingMachine/sara_behaviors,WalkingMachine/sara_behaviors
Add a state for send requests to Wonderland.
#!/usr/bin/env python # encoding=utf8 import requests from flexbe_core import EventState, Logger class Wonderland_Request(EventState): ''' MoveArm receive a ROS pose as input and launch a ROS service with the same pose ># url string url to call <= response string Finish job. ''' def __init__(sel...
<commit_before><commit_msg>Add a state for send requests to Wonderland.<commit_after>
#!/usr/bin/env python # encoding=utf8 import requests from flexbe_core import EventState, Logger class Wonderland_Request(EventState): ''' MoveArm receive a ROS pose as input and launch a ROS service with the same pose ># url string url to call <= response string Finish job. ''' def __init__(sel...
Add a state for send requests to Wonderland.#!/usr/bin/env python # encoding=utf8 import requests from flexbe_core import EventState, Logger class Wonderland_Request(EventState): ''' MoveArm receive a ROS pose as input and launch a ROS service with the same pose ># url string url to call <= response stri...
<commit_before><commit_msg>Add a state for send requests to Wonderland.<commit_after>#!/usr/bin/env python # encoding=utf8 import requests from flexbe_core import EventState, Logger class Wonderland_Request(EventState): ''' MoveArm receive a ROS pose as input and launch a ROS service with the same pose ># url ...
1f6ec9185edfe3469c5ae0c991a308a06599bcd9
backend/globaleaks/db/migrations/update_22_23.py
backend/globaleaks/db/migrations/update_22_23.py
# -*- encoding: utf-8 -*- from storm.locals import Int, Bool, Unicode, DateTime, JSON, Reference, ReferenceSet from globaleaks.db.base_updater import TableReplacer from globaleaks.models import BaseModel, Model class InternalFile_v_22(Model): __storm_table__ = 'internalfile' internaltip_id = Unicode() na...
Add migration script 22->23 (to be completed)
Add migration script 22->23 (to be completed)
Python
agpl-3.0
vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks
Add migration script 22->23 (to be completed)
# -*- encoding: utf-8 -*- from storm.locals import Int, Bool, Unicode, DateTime, JSON, Reference, ReferenceSet from globaleaks.db.base_updater import TableReplacer from globaleaks.models import BaseModel, Model class InternalFile_v_22(Model): __storm_table__ = 'internalfile' internaltip_id = Unicode() na...
<commit_before><commit_msg>Add migration script 22->23 (to be completed)<commit_after>
# -*- encoding: utf-8 -*- from storm.locals import Int, Bool, Unicode, DateTime, JSON, Reference, ReferenceSet from globaleaks.db.base_updater import TableReplacer from globaleaks.models import BaseModel, Model class InternalFile_v_22(Model): __storm_table__ = 'internalfile' internaltip_id = Unicode() na...
Add migration script 22->23 (to be completed)# -*- encoding: utf-8 -*- from storm.locals import Int, Bool, Unicode, DateTime, JSON, Reference, ReferenceSet from globaleaks.db.base_updater import TableReplacer from globaleaks.models import BaseModel, Model class InternalFile_v_22(Model): __storm_table__ = 'intern...
<commit_before><commit_msg>Add migration script 22->23 (to be completed)<commit_after># -*- encoding: utf-8 -*- from storm.locals import Int, Bool, Unicode, DateTime, JSON, Reference, ReferenceSet from globaleaks.db.base_updater import TableReplacer from globaleaks.models import BaseModel, Model class InternalFile_v...
604ce43cd9a66ae52224d174bc5743bcbfc86546
test/test_url_parser.py
test/test_url_parser.py
import pytest from lib.purl import Purl from lib.purl_exc import * class TestParserFunctions(object): def test_simple_url(self): str_url = 'http://blank' url = Purl(str_url) assert str(url) == str_url str_url = 'https://blank' url = Purl(str_url) assert str(url) == str_url str_url = '...
Add url parsing unit tests
Add url parsing unit tests
Python
mit
ultrabluewolf/p.url
Add url parsing unit tests
import pytest from lib.purl import Purl from lib.purl_exc import * class TestParserFunctions(object): def test_simple_url(self): str_url = 'http://blank' url = Purl(str_url) assert str(url) == str_url str_url = 'https://blank' url = Purl(str_url) assert str(url) == str_url str_url = '...
<commit_before><commit_msg>Add url parsing unit tests<commit_after>
import pytest from lib.purl import Purl from lib.purl_exc import * class TestParserFunctions(object): def test_simple_url(self): str_url = 'http://blank' url = Purl(str_url) assert str(url) == str_url str_url = 'https://blank' url = Purl(str_url) assert str(url) == str_url str_url = '...
Add url parsing unit testsimport pytest from lib.purl import Purl from lib.purl_exc import * class TestParserFunctions(object): def test_simple_url(self): str_url = 'http://blank' url = Purl(str_url) assert str(url) == str_url str_url = 'https://blank' url = Purl(str_url) assert str(url) =...
<commit_before><commit_msg>Add url parsing unit tests<commit_after>import pytest from lib.purl import Purl from lib.purl_exc import * class TestParserFunctions(object): def test_simple_url(self): str_url = 'http://blank' url = Purl(str_url) assert str(url) == str_url str_url = 'https://blank' ...
4a60fdf4896a41d52fc90e8a5f719976e605e8cc
lazy_helpers.py
lazy_helpers.py
# Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None def get(self): if self._driver is None: from selenium import webdriver self._driver = webdriver.Firefox() return self._driver class LazyPool(object): _poo...
Move the lazy classes out for the serializer to be able to find them
Move the lazy classes out for the serializer to be able to find them
Python
apache-2.0
holdenk/diversity-analytics,holdenk/diversity-analytics
Move the lazy classes out for the serializer to be able to find them
# Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None def get(self): if self._driver is None: from selenium import webdriver self._driver = webdriver.Firefox() return self._driver class LazyPool(object): _poo...
<commit_before><commit_msg>Move the lazy classes out for the serializer to be able to find them<commit_after>
# Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None def get(self): if self._driver is None: from selenium import webdriver self._driver = webdriver.Firefox() return self._driver class LazyPool(object): _poo...
Move the lazy classes out for the serializer to be able to find them# Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None def get(self): if self._driver is None: from selenium import webdriver self._driver = webdriver.Fire...
<commit_before><commit_msg>Move the lazy classes out for the serializer to be able to find them<commit_after># Lazy objects, for the serializer to find them we put them here class LazyDriver(object): _driver = None def get(self): if self._driver is None: from selenium import webdriver ...
d247427d60944d529fa17865ac4e0556a9ccda3f
tools/telemetry/telemetry/page/actions/navigate.py
tools/telemetry/telemetry/page/actions/navigate.py
# Copyright 2013 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. from telemetry.page.actions import page_action class NavigateAction(page_action.PageAction): def __init__(self, attributes=None): super(NavigateAction...
# Copyright 2013 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. from telemetry.page.actions import page_action class NavigateAction(page_action.PageAction): def __init__(self, attributes=None): super(NavigateAction...
Add a timeout attr to NavigateAction.
Add a timeout attr to NavigateAction. BUG=320748 Review URL: https://codereview.chromium.org/202483006 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@257922 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
dushu1203/chromium.src,Just-D/chromium-1,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,ondra-novak/chromium.src,hgl888/chromium-crosswalk,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,Just-D/ch...
# Copyright 2013 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. from telemetry.page.actions import page_action class NavigateAction(page_action.PageAction): def __init__(self, attributes=None): super(NavigateAction...
# Copyright 2013 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. from telemetry.page.actions import page_action class NavigateAction(page_action.PageAction): def __init__(self, attributes=None): super(NavigateAction...
<commit_before># Copyright 2013 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. from telemetry.page.actions import page_action class NavigateAction(page_action.PageAction): def __init__(self, attributes=None): super...
# Copyright 2013 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. from telemetry.page.actions import page_action class NavigateAction(page_action.PageAction): def __init__(self, attributes=None): super(NavigateAction...
# Copyright 2013 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. from telemetry.page.actions import page_action class NavigateAction(page_action.PageAction): def __init__(self, attributes=None): super(NavigateAction...
<commit_before># Copyright 2013 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. from telemetry.page.actions import page_action class NavigateAction(page_action.PageAction): def __init__(self, attributes=None): super...
ee66b13c952118f85e0ce14264da29807e8ab814
trunk/examples/gaussian_smoother.py
trunk/examples/gaussian_smoother.py
import matplotlib.pyplot as plt x = np.linspace(-10, 10, 40) y = np.linspace(-15, 15, 60) Y,X = np.meshgrid(y,x) noise = np.random.randn(*X.shape) * 10 data = X**2 + Y**2 + noise data = np.ma.array(data, mask=((X**2 + Y**2) < 0.4)) data_filt = gaussian_filter(x, y, data, 4, 4) plt.subplot(1, 2, 1) plt.imshow(data.T,...
Add example using the gaussian smoother/filter.
Add example using the gaussian smoother/filter. git-svn-id: acf0ef94bfce630b1a882387fc03ab8593ec6522@292 150532fb-1d5b-0410-a8ab-efec50f980d4
Python
bsd-3-clause
dopplershift/MetPy,dopplershift/MetPy,deeplycloudy/MetPy,jrleeman/MetPy,ahaberlie/MetPy,ahaberlie/MetPy,ahill818/MetPy,Unidata/MetPy,jrleeman/MetPy,Unidata/MetPy,ShawnMurd/MetPy
Add example using the gaussian smoother/filter. git-svn-id: acf0ef94bfce630b1a882387fc03ab8593ec6522@292 150532fb-1d5b-0410-a8ab-efec50f980d4
import matplotlib.pyplot as plt x = np.linspace(-10, 10, 40) y = np.linspace(-15, 15, 60) Y,X = np.meshgrid(y,x) noise = np.random.randn(*X.shape) * 10 data = X**2 + Y**2 + noise data = np.ma.array(data, mask=((X**2 + Y**2) < 0.4)) data_filt = gaussian_filter(x, y, data, 4, 4) plt.subplot(1, 2, 1) plt.imshow(data.T,...
<commit_before><commit_msg>Add example using the gaussian smoother/filter. git-svn-id: acf0ef94bfce630b1a882387fc03ab8593ec6522@292 150532fb-1d5b-0410-a8ab-efec50f980d4<commit_after>
import matplotlib.pyplot as plt x = np.linspace(-10, 10, 40) y = np.linspace(-15, 15, 60) Y,X = np.meshgrid(y,x) noise = np.random.randn(*X.shape) * 10 data = X**2 + Y**2 + noise data = np.ma.array(data, mask=((X**2 + Y**2) < 0.4)) data_filt = gaussian_filter(x, y, data, 4, 4) plt.subplot(1, 2, 1) plt.imshow(data.T,...
Add example using the gaussian smoother/filter. git-svn-id: acf0ef94bfce630b1a882387fc03ab8593ec6522@292 150532fb-1d5b-0410-a8ab-efec50f980d4import matplotlib.pyplot as plt x = np.linspace(-10, 10, 40) y = np.linspace(-15, 15, 60) Y,X = np.meshgrid(y,x) noise = np.random.randn(*X.shape) * 10 data = X**2 + Y**2 + nois...
<commit_before><commit_msg>Add example using the gaussian smoother/filter. git-svn-id: acf0ef94bfce630b1a882387fc03ab8593ec6522@292 150532fb-1d5b-0410-a8ab-efec50f980d4<commit_after>import matplotlib.pyplot as plt x = np.linspace(-10, 10, 40) y = np.linspace(-15, 15, 60) Y,X = np.meshgrid(y,x) noise = np.random.randn...
62955786e7ffd2e961849860dfd2146ef611890c
src/logfile_values.py
src/logfile_values.py
#!/usr/bin/env python # # logfile_values.py # # Copyright (c) 2017, InnoGames GmbH # """ logfile_values.py -- a python script to find metrics values in log file This script is using last line of log file to get metric value by column number python logfile_values.py --metric="metric1:1" --metric="metric2:2" ... """ f...
Add plugin to parse values from log file
Add plugin to parse values from log file
Python
mit
innogames/igcollect
Add plugin to parse values from log file
#!/usr/bin/env python # # logfile_values.py # # Copyright (c) 2017, InnoGames GmbH # """ logfile_values.py -- a python script to find metrics values in log file This script is using last line of log file to get metric value by column number python logfile_values.py --metric="metric1:1" --metric="metric2:2" ... """ f...
<commit_before><commit_msg>Add plugin to parse values from log file<commit_after>
#!/usr/bin/env python # # logfile_values.py # # Copyright (c) 2017, InnoGames GmbH # """ logfile_values.py -- a python script to find metrics values in log file This script is using last line of log file to get metric value by column number python logfile_values.py --metric="metric1:1" --metric="metric2:2" ... """ f...
Add plugin to parse values from log file#!/usr/bin/env python # # logfile_values.py # # Copyright (c) 2017, InnoGames GmbH # """ logfile_values.py -- a python script to find metrics values in log file This script is using last line of log file to get metric value by column number python logfile_values.py --metric="me...
<commit_before><commit_msg>Add plugin to parse values from log file<commit_after>#!/usr/bin/env python # # logfile_values.py # # Copyright (c) 2017, InnoGames GmbH # """ logfile_values.py -- a python script to find metrics values in log file This script is using last line of log file to get metric value by column numb...
a3dc1ebac114d1591dd9cdb211e6d975a10b0da3
education/management/commands/reschedule_teacher_weekly_polls.py
education/management/commands/reschedule_teacher_weekly_polls.py
''' Created on Feb 21, 2013 @author: raybesiga ''' from django.core.management.base import BaseCommand from education.models import reschedule_teacher_weekly_polls from optparse import OptionParser, make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-g", "...
Add new reschedule teacher weekly poll
Add new reschedule teacher weekly poll
Python
bsd-3-clause
unicefuganda/edtrac,unicefuganda/edtrac,unicefuganda/edtrac
Add new reschedule teacher weekly poll
''' Created on Feb 21, 2013 @author: raybesiga ''' from django.core.management.base import BaseCommand from education.models import reschedule_teacher_weekly_polls from optparse import OptionParser, make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-g", "...
<commit_before><commit_msg>Add new reschedule teacher weekly poll<commit_after>
''' Created on Feb 21, 2013 @author: raybesiga ''' from django.core.management.base import BaseCommand from education.models import reschedule_teacher_weekly_polls from optparse import OptionParser, make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-g", "...
Add new reschedule teacher weekly poll''' Created on Feb 21, 2013 @author: raybesiga ''' from django.core.management.base import BaseCommand from education.models import reschedule_teacher_weekly_polls from optparse import OptionParser, make_option class Command(BaseCommand): option_list = BaseCommand.optio...
<commit_before><commit_msg>Add new reschedule teacher weekly poll<commit_after>''' Created on Feb 21, 2013 @author: raybesiga ''' from django.core.management.base import BaseCommand from education.models import reschedule_teacher_weekly_polls from optparse import OptionParser, make_option class Command(BaseCommand):...
d64e576e74ddc68364259ed4ca941165a9038a56
tests/test_digitdestroyer.py
tests/test_digitdestroyer.py
from unittest import TestCase from spicedham.digitdestroyer import DigitDestroyer class TestDigitDestroyer(TestCase): def test_classify(self): dd = DigitDestroyer() dd.filter_match = 1 dd.filter_miss = 0 match_message = ['1', '2', '3', '1', '1'] miss_message = ['a', '1...
Add a test for the digitdestroyer filter
Add a test for the digitdestroyer filter
Python
mpl-2.0
mozilla/spicedham,mozilla/spicedham
Add a test for the digitdestroyer filter
from unittest import TestCase from spicedham.digitdestroyer import DigitDestroyer class TestDigitDestroyer(TestCase): def test_classify(self): dd = DigitDestroyer() dd.filter_match = 1 dd.filter_miss = 0 match_message = ['1', '2', '3', '1', '1'] miss_message = ['a', '1...
<commit_before><commit_msg>Add a test for the digitdestroyer filter<commit_after>
from unittest import TestCase from spicedham.digitdestroyer import DigitDestroyer class TestDigitDestroyer(TestCase): def test_classify(self): dd = DigitDestroyer() dd.filter_match = 1 dd.filter_miss = 0 match_message = ['1', '2', '3', '1', '1'] miss_message = ['a', '1...
Add a test for the digitdestroyer filterfrom unittest import TestCase from spicedham.digitdestroyer import DigitDestroyer class TestDigitDestroyer(TestCase): def test_classify(self): dd = DigitDestroyer() dd.filter_match = 1 dd.filter_miss = 0 match_message = ['1', '2', '3', '...
<commit_before><commit_msg>Add a test for the digitdestroyer filter<commit_after>from unittest import TestCase from spicedham.digitdestroyer import DigitDestroyer class TestDigitDestroyer(TestCase): def test_classify(self): dd = DigitDestroyer() dd.filter_match = 1 dd.filter_miss = 0 ...
0fd33596d292f758a463f95dbbbcbbd729fd15cb
datatools/scripts/terms_from_marcframe.py
datatools/scripts/terms_from_marcframe.py
import json def get_terms(marcframe): terms = set() for k, v in marcframe['entityTypeMap'].items(): terms.add(k) terms.update(v.get('instanceTypes', [])) dfn_keys = {'property', 'addProperty', 'link', 'addLink', 'domainEntity', 'rangeEntity'} def add_terms(dfn): for k, v in dfn....
Make simple script for finding terms used in marcframe
Make simple script for finding terms used in marcframe
Python
apache-2.0
libris/librisxl,libris/librisxl,libris/librisxl
Make simple script for finding terms used in marcframe
import json def get_terms(marcframe): terms = set() for k, v in marcframe['entityTypeMap'].items(): terms.add(k) terms.update(v.get('instanceTypes', [])) dfn_keys = {'property', 'addProperty', 'link', 'addLink', 'domainEntity', 'rangeEntity'} def add_terms(dfn): for k, v in dfn....
<commit_before><commit_msg>Make simple script for finding terms used in marcframe<commit_after>
import json def get_terms(marcframe): terms = set() for k, v in marcframe['entityTypeMap'].items(): terms.add(k) terms.update(v.get('instanceTypes', [])) dfn_keys = {'property', 'addProperty', 'link', 'addLink', 'domainEntity', 'rangeEntity'} def add_terms(dfn): for k, v in dfn....
Make simple script for finding terms used in marcframeimport json def get_terms(marcframe): terms = set() for k, v in marcframe['entityTypeMap'].items(): terms.add(k) terms.update(v.get('instanceTypes', [])) dfn_keys = {'property', 'addProperty', 'link', 'addLink', 'domainEntity', 'rangeEnt...
<commit_before><commit_msg>Make simple script for finding terms used in marcframe<commit_after>import json def get_terms(marcframe): terms = set() for k, v in marcframe['entityTypeMap'].items(): terms.add(k) terms.update(v.get('instanceTypes', [])) dfn_keys = {'property', 'addProperty', 'li...
64bb470bc58d6d467f4bd807f82cc56aa5e674bc
nova/tests/test_sqlalchemy.py
nova/tests/test_sqlalchemy.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 Rackspace Hosting # 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.apach...
Add eventlet db_pool use for mysql
Add eventlet db_pool use for mysql This adds the use of eventlet's db_pool module so that we can make mysql calls without blocking the whole process. New config options are introduced: sql_dbpool_enable -- Enables the use of eventlet's db_pool sql_min_pool_size -- Set the minimum number of SQL connections The defau...
Python
apache-2.0
n0ano/gantt,n0ano/gantt
Add eventlet db_pool use for mysql This adds the use of eventlet's db_pool module so that we can make mysql calls without blocking the whole process. New config options are introduced: sql_dbpool_enable -- Enables the use of eventlet's db_pool sql_min_pool_size -- Set the minimum number of SQL connections The defau...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 Rackspace Hosting # 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.apach...
<commit_before><commit_msg>Add eventlet db_pool use for mysql This adds the use of eventlet's db_pool module so that we can make mysql calls without blocking the whole process. New config options are introduced: sql_dbpool_enable -- Enables the use of eventlet's db_pool sql_min_pool_size -- Set the minimum number of...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 Rackspace Hosting # 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.apach...
Add eventlet db_pool use for mysql This adds the use of eventlet's db_pool module so that we can make mysql calls without blocking the whole process. New config options are introduced: sql_dbpool_enable -- Enables the use of eventlet's db_pool sql_min_pool_size -- Set the minimum number of SQL connections The defau...
<commit_before><commit_msg>Add eventlet db_pool use for mysql This adds the use of eventlet's db_pool module so that we can make mysql calls without blocking the whole process. New config options are introduced: sql_dbpool_enable -- Enables the use of eventlet's db_pool sql_min_pool_size -- Set the minimum number of...
f10b89d8c2b847555223a4a025d78e1223f57696
scripts/fork_my_feedstocks.py
scripts/fork_my_feedstocks.py
#!/usr/bin/env conda-execute """ This script can be run to fork conda-forge feedstocks to which you are a maintainer. This is super useful if you maintain many feedstocks and would like to cutdown maintenance on your next PR... Requires a token stored in the environment variable `GH_TOKEN` with the permissions `publi...
Add a script to fork all feedstocks one is a maintainer on.
scripts: Add a script to fork all feedstocks one is a maintainer on.
Python
bsd-3-clause
conda-forge/conda-forge.github.io,conda-forge/conda-forge.github.io,conda-forge/conda-forge.github.io,conda-forge/conda-forge.github.io
scripts: Add a script to fork all feedstocks one is a maintainer on.
#!/usr/bin/env conda-execute """ This script can be run to fork conda-forge feedstocks to which you are a maintainer. This is super useful if you maintain many feedstocks and would like to cutdown maintenance on your next PR... Requires a token stored in the environment variable `GH_TOKEN` with the permissions `publi...
<commit_before><commit_msg>scripts: Add a script to fork all feedstocks one is a maintainer on.<commit_after>
#!/usr/bin/env conda-execute """ This script can be run to fork conda-forge feedstocks to which you are a maintainer. This is super useful if you maintain many feedstocks and would like to cutdown maintenance on your next PR... Requires a token stored in the environment variable `GH_TOKEN` with the permissions `publi...
scripts: Add a script to fork all feedstocks one is a maintainer on.#!/usr/bin/env conda-execute """ This script can be run to fork conda-forge feedstocks to which you are a maintainer. This is super useful if you maintain many feedstocks and would like to cutdown maintenance on your next PR... Requires a token store...
<commit_before><commit_msg>scripts: Add a script to fork all feedstocks one is a maintainer on.<commit_after>#!/usr/bin/env conda-execute """ This script can be run to fork conda-forge feedstocks to which you are a maintainer. This is super useful if you maintain many feedstocks and would like to cutdown maintenance o...
773a389f2ae69384f09cbada8b4b2615a7c430de
celery/tests/test_messaging.py
celery/tests/test_messaging.py
import unittest from celery.messaging import MSG_OPTIONS, get_msg_options, extract_msg_options class TestMsgOptions(unittest.TestCase): def test_MSG_OPTIONS(self): self.assertTrue(MSG_OPTIONS) def test_extract_msg_options(self): testing = {"mandatory": True, "routing_key": "foo.xuzzy"} ...
Add regression test for the message options bug.
Add regression test for the message options bug.
Python
bsd-3-clause
frac/celery,cbrepo/celery,frac/celery,ask/celery,ask/celery,WoLpH/celery,mitsuhiko/celery,cbrepo/celery,mitsuhiko/celery,WoLpH/celery
Add regression test for the message options bug.
import unittest from celery.messaging import MSG_OPTIONS, get_msg_options, extract_msg_options class TestMsgOptions(unittest.TestCase): def test_MSG_OPTIONS(self): self.assertTrue(MSG_OPTIONS) def test_extract_msg_options(self): testing = {"mandatory": True, "routing_key": "foo.xuzzy"} ...
<commit_before><commit_msg>Add regression test for the message options bug.<commit_after>
import unittest from celery.messaging import MSG_OPTIONS, get_msg_options, extract_msg_options class TestMsgOptions(unittest.TestCase): def test_MSG_OPTIONS(self): self.assertTrue(MSG_OPTIONS) def test_extract_msg_options(self): testing = {"mandatory": True, "routing_key": "foo.xuzzy"} ...
Add regression test for the message options bug.import unittest from celery.messaging import MSG_OPTIONS, get_msg_options, extract_msg_options class TestMsgOptions(unittest.TestCase): def test_MSG_OPTIONS(self): self.assertTrue(MSG_OPTIONS) def test_extract_msg_options(self): testing = {"man...
<commit_before><commit_msg>Add regression test for the message options bug.<commit_after>import unittest from celery.messaging import MSG_OPTIONS, get_msg_options, extract_msg_options class TestMsgOptions(unittest.TestCase): def test_MSG_OPTIONS(self): self.assertTrue(MSG_OPTIONS) def test_extract_m...
4448f88734a3fb631a02aeb9b84675575226845d
examples/matplotlib/matplotlib_example.py
examples/matplotlib/matplotlib_example.py
# Copyright 2013 Christoph Reiter # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. import sys sys.path.insert...
Add a matplotlib example (needs cffi)
Add a matplotlib example (needs cffi)
Python
lgpl-2.1
lazka/pgi,lazka/pgi
Add a matplotlib example (needs cffi)
# Copyright 2013 Christoph Reiter # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. import sys sys.path.insert...
<commit_before><commit_msg>Add a matplotlib example (needs cffi)<commit_after>
# Copyright 2013 Christoph Reiter # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. import sys sys.path.insert...
Add a matplotlib example (needs cffi)# Copyright 2013 Christoph Reiter # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later...
<commit_before><commit_msg>Add a matplotlib example (needs cffi)<commit_after># Copyright 2013 Christoph Reiter # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of t...
8d9eae677ef81ba3dcb000e528985276a920ef05
test/test_loader.py
test/test_loader.py
from .helper import BJOTest from bernard.actors import Locker, Notifier from bernard.loader import YAMLLoader from praw.models import Comment, Submission class TestValidation(BJOTest): def setUp(self): super().setUp() self.loader = YAMLLoader(self.db, self.cur, self.subreddit) def test_bad_pa...
Add some tests for the new validation logic
Add some tests for the new validation logic
Python
mit
leviroth/bernard
Add some tests for the new validation logic
from .helper import BJOTest from bernard.actors import Locker, Notifier from bernard.loader import YAMLLoader from praw.models import Comment, Submission class TestValidation(BJOTest): def setUp(self): super().setUp() self.loader = YAMLLoader(self.db, self.cur, self.subreddit) def test_bad_pa...
<commit_before><commit_msg>Add some tests for the new validation logic<commit_after>
from .helper import BJOTest from bernard.actors import Locker, Notifier from bernard.loader import YAMLLoader from praw.models import Comment, Submission class TestValidation(BJOTest): def setUp(self): super().setUp() self.loader = YAMLLoader(self.db, self.cur, self.subreddit) def test_bad_pa...
Add some tests for the new validation logicfrom .helper import BJOTest from bernard.actors import Locker, Notifier from bernard.loader import YAMLLoader from praw.models import Comment, Submission class TestValidation(BJOTest): def setUp(self): super().setUp() self.loader = YAMLLoader(self.db, sel...
<commit_before><commit_msg>Add some tests for the new validation logic<commit_after>from .helper import BJOTest from bernard.actors import Locker, Notifier from bernard.loader import YAMLLoader from praw.models import Comment, Submission class TestValidation(BJOTest): def setUp(self): super().setUp() ...
d727758e3db52327e7326b5f8546ecde06d409e7
test/test_logger.py
test/test_logger.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function from __future__ import unicode_literals from dataproperty import ( set_logger, set_log_level, ) import logbook import pytest class Test_set_logger(object): @pytest.mark.param...
Add test cases for the logger
Add test cases for the logger
Python
mit
thombashi/DataProperty
Add test cases for the logger
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function from __future__ import unicode_literals from dataproperty import ( set_logger, set_log_level, ) import logbook import pytest class Test_set_logger(object): @pytest.mark.param...
<commit_before><commit_msg>Add test cases for the logger<commit_after>
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function from __future__ import unicode_literals from dataproperty import ( set_logger, set_log_level, ) import logbook import pytest class Test_set_logger(object): @pytest.mark.param...
Add test cases for the logger# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function from __future__ import unicode_literals from dataproperty import ( set_logger, set_log_level, ) import logbook import pytest class Test_set_logger(obj...
<commit_before><commit_msg>Add test cases for the logger<commit_after># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function from __future__ import unicode_literals from dataproperty import ( set_logger, set_log_level, ) import logbook ...
0200c03f8f6232965f924a765c5ebb0f9c439f4d
sample_app/forms.py
sample_app/forms.py
from flask_wtf import Form from wtforms.fields import (TextField, SubmitField, BooleanField, DateField, DateTimeField) from wtforms.validators import Required class SignupForm(Form): name = TextField(u'Your name', validators=[Required()]) birthday = DateField(u'Your birthday') ...
from flask_wtf import Form from wtforms.fields import (TextField, SubmitField, BooleanField, DateField, DateTimeField) from wtforms.validators import Required, Email class SignupForm(Form): name = TextField(u'Your name', validators=[Required()]) email = TextField(u'Your email addre...
Add email field to sample app.
Add email field to sample app.
Python
apache-2.0
vishnugonela/flask-bootstrap,BeardedSteve/flask-bootstrap,livepy/flask-bootstrap,suvorom/flask-bootstrap,vishnugonela/flask-bootstrap,JingZhou0404/flask-bootstrap,vishnugonela/flask-bootstrap,BeardedSteve/flask-bootstrap,suvorom/flask-bootstrap,eshijia/flask-bootstrap,JingZhou0404/flask-bootstrap,moha24/flask-bootstrap...
from flask_wtf import Form from wtforms.fields import (TextField, SubmitField, BooleanField, DateField, DateTimeField) from wtforms.validators import Required class SignupForm(Form): name = TextField(u'Your name', validators=[Required()]) birthday = DateField(u'Your birthday') ...
from flask_wtf import Form from wtforms.fields import (TextField, SubmitField, BooleanField, DateField, DateTimeField) from wtforms.validators import Required, Email class SignupForm(Form): name = TextField(u'Your name', validators=[Required()]) email = TextField(u'Your email addre...
<commit_before>from flask_wtf import Form from wtforms.fields import (TextField, SubmitField, BooleanField, DateField, DateTimeField) from wtforms.validators import Required class SignupForm(Form): name = TextField(u'Your name', validators=[Required()]) birthday = DateField(u'Your ...
from flask_wtf import Form from wtforms.fields import (TextField, SubmitField, BooleanField, DateField, DateTimeField) from wtforms.validators import Required, Email class SignupForm(Form): name = TextField(u'Your name', validators=[Required()]) email = TextField(u'Your email addre...
from flask_wtf import Form from wtforms.fields import (TextField, SubmitField, BooleanField, DateField, DateTimeField) from wtforms.validators import Required class SignupForm(Form): name = TextField(u'Your name', validators=[Required()]) birthday = DateField(u'Your birthday') ...
<commit_before>from flask_wtf import Form from wtforms.fields import (TextField, SubmitField, BooleanField, DateField, DateTimeField) from wtforms.validators import Required class SignupForm(Form): name = TextField(u'Your name', validators=[Required()]) birthday = DateField(u'Your ...
e97649a29a10ecc06eaa33b0898b2c22368e7102
tests/tests_list.py
tests/tests_list.py
#List of input files and reference databases sim_files = [("./inputs/physor/1_Enrichment_2_Reactor.xml", "./benchmarks/physor_1_Enrichment_2_Reactor.h5"), ("./inputs/physor/2_Sources_3_Reactors.xml", "./benchmarks/physor_2_Sources_3_Reactors.h5")]
Add python file with a list of simulation files.
Add python file with a list of simulation files.
Python
bsd-3-clause
Baaaaam/cycamore,rwcarlsen/cycamore,Baaaaam/cyBaM,gonuke/cycamore,rwcarlsen/cycamore,gonuke/cycamore,cyclus/cycaless,Baaaaam/cyBaM,Baaaaam/cyCLASS,rwcarlsen/cycamore,Baaaaam/cyBaM,Baaaaam/cycamore,rwcarlsen/cycamore,gonuke/cycamore,Baaaaam/cyCLASS,jlittell/cycamore,Baaaaam/cyBaM,jlittell/cycamore,jlittell/cycamore,gonu...
Add python file with a list of simulation files.
#List of input files and reference databases sim_files = [("./inputs/physor/1_Enrichment_2_Reactor.xml", "./benchmarks/physor_1_Enrichment_2_Reactor.h5"), ("./inputs/physor/2_Sources_3_Reactors.xml", "./benchmarks/physor_2_Sources_3_Reactors.h5")]
<commit_before><commit_msg>Add python file with a list of simulation files.<commit_after>
#List of input files and reference databases sim_files = [("./inputs/physor/1_Enrichment_2_Reactor.xml", "./benchmarks/physor_1_Enrichment_2_Reactor.h5"), ("./inputs/physor/2_Sources_3_Reactors.xml", "./benchmarks/physor_2_Sources_3_Reactors.h5")]
Add python file with a list of simulation files. #List of input files and reference databases sim_files = [("./inputs/physor/1_Enrichment_2_Reactor.xml", "./benchmarks/physor_1_Enrichment_2_Reactor.h5"), ("./inputs/physor/2_Sources_3_Reactors.xml", "./benchmarks/physor_2_Sources_3_Reactors.h5")]
<commit_before><commit_msg>Add python file with a list of simulation files.<commit_after> #List of input files and reference databases sim_files = [("./inputs/physor/1_Enrichment_2_Reactor.xml", "./benchmarks/physor_1_Enrichment_2_Reactor.h5"), ("./inputs/physor/2_Sources_3_Reactors.xml", "./benchmarks/phys...
8ce21d0d060fcaaea192f002d12c79101f4bc1a2
corehq/apps/commtrack/management/commands/fix_default_program.py
corehq/apps/commtrack/management/commands/fix_default_program.py
from django.core.management.base import BaseCommand from corehq.apps.commtrack.models import Program from corehq.apps.domain.models import Domain from corehq.apps.commtrack.util import get_or_create_default_program class Command(BaseCommand): help = 'Populate default program flag for domains' def handle(self...
Add management command to migrate programs
Add management command to migrate programs
Python
bsd-3-clause
dimagi/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq
Add management command to migrate programs
from django.core.management.base import BaseCommand from corehq.apps.commtrack.models import Program from corehq.apps.domain.models import Domain from corehq.apps.commtrack.util import get_or_create_default_program class Command(BaseCommand): help = 'Populate default program flag for domains' def handle(self...
<commit_before><commit_msg>Add management command to migrate programs<commit_after>
from django.core.management.base import BaseCommand from corehq.apps.commtrack.models import Program from corehq.apps.domain.models import Domain from corehq.apps.commtrack.util import get_or_create_default_program class Command(BaseCommand): help = 'Populate default program flag for domains' def handle(self...
Add management command to migrate programsfrom django.core.management.base import BaseCommand from corehq.apps.commtrack.models import Program from corehq.apps.domain.models import Domain from corehq.apps.commtrack.util import get_or_create_default_program class Command(BaseCommand): help = 'Populate default prog...
<commit_before><commit_msg>Add management command to migrate programs<commit_after>from django.core.management.base import BaseCommand from corehq.apps.commtrack.models import Program from corehq.apps.domain.models import Domain from corehq.apps.commtrack.util import get_or_create_default_program class Command(BaseCo...
b4a7e92bb8f3876c12982ef5f63ed1ad56f30ac7
tests/parthole_test.py
tests/parthole_test.py
"""Tests on the particle-hole model.""" import pytest from drudge import PartHoleDrudge, CR, AN from drudge.wick import wick_expand @pytest.fixture(scope='module') def parthole(spark_ctx): """Initialize the environment for a free algebra.""" dr = PartHoleDrudge(spark_ctx) return dr def test_parthole_n...
Add minimal tests for PartHoleDrudge
Add minimal tests for PartHoleDrudge Here only the number of terms in the different forms of the Hamiltonian is checked. It should later be replaced with actual value inspection.
Python
mit
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
Add minimal tests for PartHoleDrudge Here only the number of terms in the different forms of the Hamiltonian is checked. It should later be replaced with actual value inspection.
"""Tests on the particle-hole model.""" import pytest from drudge import PartHoleDrudge, CR, AN from drudge.wick import wick_expand @pytest.fixture(scope='module') def parthole(spark_ctx): """Initialize the environment for a free algebra.""" dr = PartHoleDrudge(spark_ctx) return dr def test_parthole_n...
<commit_before><commit_msg>Add minimal tests for PartHoleDrudge Here only the number of terms in the different forms of the Hamiltonian is checked. It should later be replaced with actual value inspection.<commit_after>
"""Tests on the particle-hole model.""" import pytest from drudge import PartHoleDrudge, CR, AN from drudge.wick import wick_expand @pytest.fixture(scope='module') def parthole(spark_ctx): """Initialize the environment for a free algebra.""" dr = PartHoleDrudge(spark_ctx) return dr def test_parthole_n...
Add minimal tests for PartHoleDrudge Here only the number of terms in the different forms of the Hamiltonian is checked. It should later be replaced with actual value inspection."""Tests on the particle-hole model.""" import pytest from drudge import PartHoleDrudge, CR, AN from drudge.wick import wick_expand @pyt...
<commit_before><commit_msg>Add minimal tests for PartHoleDrudge Here only the number of terms in the different forms of the Hamiltonian is checked. It should later be replaced with actual value inspection.<commit_after>"""Tests on the particle-hole model.""" import pytest from drudge import PartHoleDrudge, CR, AN f...
2ff14d38266322d3e428c29a01a3de5015269166
package/src/get_rss_feeds.py
package/src/get_rss_feeds.py
# Chap07/blogs_rss_get_posts.py import json from argparse import ArgumentParser import feedparser def get_parser(): parser = ArgumentParser() parser.add_argument('--rss-url') parser.add_argument('--json') return parser if __name__ == '__main__': parser = get_parser() args = parser.parse_args...
Add minimal feed sourcing example
Add minimal feed sourcing example
Python
mit
MrKriss/full-fact-rss-miner
Add minimal feed sourcing example
# Chap07/blogs_rss_get_posts.py import json from argparse import ArgumentParser import feedparser def get_parser(): parser = ArgumentParser() parser.add_argument('--rss-url') parser.add_argument('--json') return parser if __name__ == '__main__': parser = get_parser() args = parser.parse_args...
<commit_before><commit_msg>Add minimal feed sourcing example<commit_after>
# Chap07/blogs_rss_get_posts.py import json from argparse import ArgumentParser import feedparser def get_parser(): parser = ArgumentParser() parser.add_argument('--rss-url') parser.add_argument('--json') return parser if __name__ == '__main__': parser = get_parser() args = parser.parse_args...
Add minimal feed sourcing example# Chap07/blogs_rss_get_posts.py import json from argparse import ArgumentParser import feedparser def get_parser(): parser = ArgumentParser() parser.add_argument('--rss-url') parser.add_argument('--json') return parser if __name__ == '__main__': parser = get_pars...
<commit_before><commit_msg>Add minimal feed sourcing example<commit_after># Chap07/blogs_rss_get_posts.py import json from argparse import ArgumentParser import feedparser def get_parser(): parser = ArgumentParser() parser.add_argument('--rss-url') parser.add_argument('--json') return parser if __na...
bf3a32714e43fdb4abc226c5c353ccfc10448854
spark/wordcount.py
spark/wordcount.py
from pyspark import SparkConf, SparkContext import sys if __name__ == "__main__": if len(sys.argv) != 3: print "Incorrect number of arguments, correct usage: wordcount.py [inputfile] [outputfile]" sys.exit(-1) # set input and dictionary from args input = sys.argv[1] output = sys.argv[...
Add Spark Python word count program
Add Spark Python word count program
Python
mit
bbengfort/hadoop-fundamentals,bbengfort/hadoop-fundamentals,bbengfort/hadoop-fundamentals,cycuq/hadoop-fundamentals-for-data-scientists,sssllliang/hadoop-fundamentals,nvoron23/hadoop-fundamentals
Add Spark Python word count program
from pyspark import SparkConf, SparkContext import sys if __name__ == "__main__": if len(sys.argv) != 3: print "Incorrect number of arguments, correct usage: wordcount.py [inputfile] [outputfile]" sys.exit(-1) # set input and dictionary from args input = sys.argv[1] output = sys.argv[...
<commit_before><commit_msg>Add Spark Python word count program<commit_after>
from pyspark import SparkConf, SparkContext import sys if __name__ == "__main__": if len(sys.argv) != 3: print "Incorrect number of arguments, correct usage: wordcount.py [inputfile] [outputfile]" sys.exit(-1) # set input and dictionary from args input = sys.argv[1] output = sys.argv[...
Add Spark Python word count programfrom pyspark import SparkConf, SparkContext import sys if __name__ == "__main__": if len(sys.argv) != 3: print "Incorrect number of arguments, correct usage: wordcount.py [inputfile] [outputfile]" sys.exit(-1) # set input and dictionary from args input =...
<commit_before><commit_msg>Add Spark Python word count program<commit_after>from pyspark import SparkConf, SparkContext import sys if __name__ == "__main__": if len(sys.argv) != 3: print "Incorrect number of arguments, correct usage: wordcount.py [inputfile] [outputfile]" sys.exit(-1) # set i...
244d95937c1fbae6a0f415cbdcbd4ed65cc6d8c4
CodeFights/prefSum.py
CodeFights/prefSum.py
#!/usr/local/bin/python # Code Fights Pref Sum Problem from itertools import accumulate def prefSum(a): return list(accumulate(a)) def main(): tests = [ [[1, 2, 3], [1, 3, 6]], [[1, 2, 3, -6], [1, 3, 6, 0]], [[0, 0, 0], [0, 0, 0]] ] for t in tests: res = prefSum(t[0...
Solve Code Fights pref sum problem
Solve Code Fights pref sum problem
Python
mit
HKuz/Test_Code
Solve Code Fights pref sum problem
#!/usr/local/bin/python # Code Fights Pref Sum Problem from itertools import accumulate def prefSum(a): return list(accumulate(a)) def main(): tests = [ [[1, 2, 3], [1, 3, 6]], [[1, 2, 3, -6], [1, 3, 6, 0]], [[0, 0, 0], [0, 0, 0]] ] for t in tests: res = prefSum(t[0...
<commit_before><commit_msg>Solve Code Fights pref sum problem<commit_after>
#!/usr/local/bin/python # Code Fights Pref Sum Problem from itertools import accumulate def prefSum(a): return list(accumulate(a)) def main(): tests = [ [[1, 2, 3], [1, 3, 6]], [[1, 2, 3, -6], [1, 3, 6, 0]], [[0, 0, 0], [0, 0, 0]] ] for t in tests: res = prefSum(t[0...
Solve Code Fights pref sum problem#!/usr/local/bin/python # Code Fights Pref Sum Problem from itertools import accumulate def prefSum(a): return list(accumulate(a)) def main(): tests = [ [[1, 2, 3], [1, 3, 6]], [[1, 2, 3, -6], [1, 3, 6, 0]], [[0, 0, 0], [0, 0, 0]] ] for t i...
<commit_before><commit_msg>Solve Code Fights pref sum problem<commit_after>#!/usr/local/bin/python # Code Fights Pref Sum Problem from itertools import accumulate def prefSum(a): return list(accumulate(a)) def main(): tests = [ [[1, 2, 3], [1, 3, 6]], [[1, 2, 3, -6], [1, 3, 6, 0]], ...
6c8cdc4460204cf4ffcb9b1a42da3ba7bb469031
py/g1/asyncs/kernels/tests/test_public.py
py/g1/asyncs/kernels/tests/test_public.py
import unittest from g1.asyncs import kernels class KernelsTest(unittest.TestCase): """Test ``g1.asyncs.kernels`` public interface.""" def test_contexts(self): self.assertIsNone(kernels.get_kernel()) self.assertEqual(kernels.get_all_tasks(), []) self.assertIsNone(kernels.get_current...
Add unit test of g1.asyncs.kernels public interface
Add unit test of g1.asyncs.kernels public interface
Python
mit
clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage
Add unit test of g1.asyncs.kernels public interface
import unittest from g1.asyncs import kernels class KernelsTest(unittest.TestCase): """Test ``g1.asyncs.kernels`` public interface.""" def test_contexts(self): self.assertIsNone(kernels.get_kernel()) self.assertEqual(kernels.get_all_tasks(), []) self.assertIsNone(kernels.get_current...
<commit_before><commit_msg>Add unit test of g1.asyncs.kernels public interface<commit_after>
import unittest from g1.asyncs import kernels class KernelsTest(unittest.TestCase): """Test ``g1.asyncs.kernels`` public interface.""" def test_contexts(self): self.assertIsNone(kernels.get_kernel()) self.assertEqual(kernels.get_all_tasks(), []) self.assertIsNone(kernels.get_current...
Add unit test of g1.asyncs.kernels public interfaceimport unittest from g1.asyncs import kernels class KernelsTest(unittest.TestCase): """Test ``g1.asyncs.kernels`` public interface.""" def test_contexts(self): self.assertIsNone(kernels.get_kernel()) self.assertEqual(kernels.get_all_tasks()...
<commit_before><commit_msg>Add unit test of g1.asyncs.kernels public interface<commit_after>import unittest from g1.asyncs import kernels class KernelsTest(unittest.TestCase): """Test ``g1.asyncs.kernels`` public interface.""" def test_contexts(self): self.assertIsNone(kernels.get_kernel()) ...
c0496d83049e02db718941b7cdd6fa0bacd28ce2
python-tools/mods/raven/transport/http.py
python-tools/mods/raven/transport/http.py
# See https://github.com/getsentry/raven-python/issues/1109 """ raven.transport.http ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import requests from raven.utils.compat import s...
Add raven SSL fix mod.
Add raven SSL fix mod. See https://github.com/getsentry/raven-python/issues/1109.
Python
mit
Mediamoose/python-tools
Add raven SSL fix mod. See https://github.com/getsentry/raven-python/issues/1109.
# See https://github.com/getsentry/raven-python/issues/1109 """ raven.transport.http ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import requests from raven.utils.compat import s...
<commit_before><commit_msg>Add raven SSL fix mod. See https://github.com/getsentry/raven-python/issues/1109.<commit_after>
# See https://github.com/getsentry/raven-python/issues/1109 """ raven.transport.http ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import requests from raven.utils.compat import s...
Add raven SSL fix mod. See https://github.com/getsentry/raven-python/issues/1109.# See https://github.com/getsentry/raven-python/issues/1109 """ raven.transport.http ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from _...
<commit_before><commit_msg>Add raven SSL fix mod. See https://github.com/getsentry/raven-python/issues/1109.<commit_after># See https://github.com/getsentry/raven-python/issues/1109 """ raven.transport.http ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD,...
0ac7a79dda372763c88b237e269aa9f955b88fdd
Titanic_Survival_Exploration/Titanic_Surv_Expl.py
Titanic_Survival_Exploration/Titanic_Surv_Expl.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jul 16 15:53:32 2017 @author: Anani Assoutovi """ import numpy as np import pandas as pd
Add A new Folder and file @AnaniSkywalker
Add A new Folder and file @AnaniSkywalker
Python
mit
AnaniSkywalker/UDACITY_Machine_Learning,AnaniSkywalker/UDACITY_Machine_Learning
Add A new Folder and file @AnaniSkywalker
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jul 16 15:53:32 2017 @author: Anani Assoutovi """ import numpy as np import pandas as pd
<commit_before><commit_msg>Add A new Folder and file @AnaniSkywalker<commit_after>
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jul 16 15:53:32 2017 @author: Anani Assoutovi """ import numpy as np import pandas as pd
Add A new Folder and file @AnaniSkywalker#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jul 16 15:53:32 2017 @author: Anani Assoutovi """ import numpy as np import pandas as pd
<commit_before><commit_msg>Add A new Folder and file @AnaniSkywalker<commit_after>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jul 16 15:53:32 2017 @author: Anani Assoutovi """ import numpy as np import pandas as pd
d73dfec24b2b77edcab5a1daf1acb35640320aa4
Lib/test/test_platform.py
Lib/test/test_platform.py
import unittest from test import test_support import platform class PlatformTest(unittest.TestCase): def test_architecture(self): res = platform.architecture() def test_machine(self): res = platform.machine() def test_node(self): res = platform.node() def test_platform(self):...
Add a rudimentary test for the platform module that at least calls each documented function once.
Add a rudimentary test for the platform module that at least calls each documented function once.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Add a rudimentary test for the platform module that at least calls each documented function once.
import unittest from test import test_support import platform class PlatformTest(unittest.TestCase): def test_architecture(self): res = platform.architecture() def test_machine(self): res = platform.machine() def test_node(self): res = platform.node() def test_platform(self):...
<commit_before><commit_msg>Add a rudimentary test for the platform module that at least calls each documented function once.<commit_after>
import unittest from test import test_support import platform class PlatformTest(unittest.TestCase): def test_architecture(self): res = platform.architecture() def test_machine(self): res = platform.machine() def test_node(self): res = platform.node() def test_platform(self):...
Add a rudimentary test for the platform module that at least calls each documented function once.import unittest from test import test_support import platform class PlatformTest(unittest.TestCase): def test_architecture(self): res = platform.architecture() def test_machine(self): res = platfor...
<commit_before><commit_msg>Add a rudimentary test for the platform module that at least calls each documented function once.<commit_after>import unittest from test import test_support import platform class PlatformTest(unittest.TestCase): def test_architecture(self): res = platform.architecture() def ...
3a06a24c5ce0e5357dfc87eccfc198fd05e881e4
corehq/apps/es/tests/test_user_es.py
corehq/apps/es/tests/test_user_es.py
import uuid from django.test import TestCase from pillowtop.es_utils import initialize_index_and_mapping from corehq.apps.domain.shortcuts import create_domain from corehq.apps.es import UserES from corehq.apps.es.tests.utils import es_test from corehq.apps.users.dbaccessors.all_commcare_users import delete_all_user...
Write a basic test for filtering by user data
Write a basic test for filtering by user data
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Write a basic test for filtering by user data
import uuid from django.test import TestCase from pillowtop.es_utils import initialize_index_and_mapping from corehq.apps.domain.shortcuts import create_domain from corehq.apps.es import UserES from corehq.apps.es.tests.utils import es_test from corehq.apps.users.dbaccessors.all_commcare_users import delete_all_user...
<commit_before><commit_msg>Write a basic test for filtering by user data<commit_after>
import uuid from django.test import TestCase from pillowtop.es_utils import initialize_index_and_mapping from corehq.apps.domain.shortcuts import create_domain from corehq.apps.es import UserES from corehq.apps.es.tests.utils import es_test from corehq.apps.users.dbaccessors.all_commcare_users import delete_all_user...
Write a basic test for filtering by user dataimport uuid from django.test import TestCase from pillowtop.es_utils import initialize_index_and_mapping from corehq.apps.domain.shortcuts import create_domain from corehq.apps.es import UserES from corehq.apps.es.tests.utils import es_test from corehq.apps.users.dbaccess...
<commit_before><commit_msg>Write a basic test for filtering by user data<commit_after>import uuid from django.test import TestCase from pillowtop.es_utils import initialize_index_and_mapping from corehq.apps.domain.shortcuts import create_domain from corehq.apps.es import UserES from corehq.apps.es.tests.utils impor...
5b333f9547908db05663afacc7487749dda168fc
dynd/tests/test_array_as_py.py
dynd/tests/test_array_as_py.py
import sys import unittest from dynd import nd, ndt class TestArrayAsPy(unittest.TestCase): def test_struct_or_tuple(self): a = nd.array((3, "testing", 1.5), type='{x:int, y:string, z:real}') self.assertEqual(nd.as_py(a), {'x': 3, 'y': "testing", 'z': 1.5}) self.assertEqual(nd.as_py(a, tupl...
Add tests for tuple option to nd.as_py
Add tests for tuple option to nd.as_py
Python
bsd-2-clause
pombredanne/dynd-python,pombredanne/dynd-python,ContinuumIO/dynd-python,insertinterestingnamehere/dynd-python,izaid/dynd-python,pombredanne/dynd-python,izaid/dynd-python,insertinterestingnamehere/dynd-python,insertinterestingnamehere/dynd-python,mwiebe/dynd-python,michaelpacer/dynd-python,aterrel/dynd-python,cpcloud/dy...
Add tests for tuple option to nd.as_py
import sys import unittest from dynd import nd, ndt class TestArrayAsPy(unittest.TestCase): def test_struct_or_tuple(self): a = nd.array((3, "testing", 1.5), type='{x:int, y:string, z:real}') self.assertEqual(nd.as_py(a), {'x': 3, 'y': "testing", 'z': 1.5}) self.assertEqual(nd.as_py(a, tupl...
<commit_before><commit_msg>Add tests for tuple option to nd.as_py<commit_after>
import sys import unittest from dynd import nd, ndt class TestArrayAsPy(unittest.TestCase): def test_struct_or_tuple(self): a = nd.array((3, "testing", 1.5), type='{x:int, y:string, z:real}') self.assertEqual(nd.as_py(a), {'x': 3, 'y': "testing", 'z': 1.5}) self.assertEqual(nd.as_py(a, tupl...
Add tests for tuple option to nd.as_pyimport sys import unittest from dynd import nd, ndt class TestArrayAsPy(unittest.TestCase): def test_struct_or_tuple(self): a = nd.array((3, "testing", 1.5), type='{x:int, y:string, z:real}') self.assertEqual(nd.as_py(a), {'x': 3, 'y': "testing", 'z': 1.5}) ...
<commit_before><commit_msg>Add tests for tuple option to nd.as_py<commit_after>import sys import unittest from dynd import nd, ndt class TestArrayAsPy(unittest.TestCase): def test_struct_or_tuple(self): a = nd.array((3, "testing", 1.5), type='{x:int, y:string, z:real}') self.assertEqual(nd.as_py(a)...
55017eadf948fb951e6303cd4c914c968d6f60b2
cmsplugin_contact/migrations_django/0003_auto_20161107_1614.py
cmsplugin_contact/migrations_django/0003_auto_20161107_1614.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-11-07 15:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('cmsplugin_contact', '0002_auto_20160810_1130'), ] o...
Add an auto-generated missing migration
Add an auto-generated missing migration
Python
bsd-2-clause
maccesch/cmsplugin-contact,maccesch/cmsplugin-contact
Add an auto-generated missing migration
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-11-07 15:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('cmsplugin_contact', '0002_auto_20160810_1130'), ] o...
<commit_before><commit_msg>Add an auto-generated missing migration<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-11-07 15:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('cmsplugin_contact', '0002_auto_20160810_1130'), ] o...
Add an auto-generated missing migration# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-11-07 15:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('cmsplugin_contact', '...
<commit_before><commit_msg>Add an auto-generated missing migration<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-11-07 15:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): depende...
dccd8403a93a0c86054d61142198643d30b8d9af
migrations/versions/0c98b865104f_add_score_user_id_column.py
migrations/versions/0c98b865104f_add_score_user_id_column.py
"""Add score.user_id column Revision ID: 0c98b865104f Revises: 7b6a65c708b9 Create Date: 2016-10-27 19:03:44.901639 """ # revision identifiers, used by Alembic. revision = '0c98b865104f' down_revision = '7b6a65c708b9' from alembic import op import sqlalchemy as sa import server def upgrade(): op.add_column('s...
Add migration that sets score.user_id appropriately
Add migration that sets score.user_id appropriately
Python
apache-2.0
Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok
Add migration that sets score.user_id appropriately
"""Add score.user_id column Revision ID: 0c98b865104f Revises: 7b6a65c708b9 Create Date: 2016-10-27 19:03:44.901639 """ # revision identifiers, used by Alembic. revision = '0c98b865104f' down_revision = '7b6a65c708b9' from alembic import op import sqlalchemy as sa import server def upgrade(): op.add_column('s...
<commit_before><commit_msg>Add migration that sets score.user_id appropriately<commit_after>
"""Add score.user_id column Revision ID: 0c98b865104f Revises: 7b6a65c708b9 Create Date: 2016-10-27 19:03:44.901639 """ # revision identifiers, used by Alembic. revision = '0c98b865104f' down_revision = '7b6a65c708b9' from alembic import op import sqlalchemy as sa import server def upgrade(): op.add_column('s...
Add migration that sets score.user_id appropriately"""Add score.user_id column Revision ID: 0c98b865104f Revises: 7b6a65c708b9 Create Date: 2016-10-27 19:03:44.901639 """ # revision identifiers, used by Alembic. revision = '0c98b865104f' down_revision = '7b6a65c708b9' from alembic import op import sqlalchemy as sa ...
<commit_before><commit_msg>Add migration that sets score.user_id appropriately<commit_after>"""Add score.user_id column Revision ID: 0c98b865104f Revises: 7b6a65c708b9 Create Date: 2016-10-27 19:03:44.901639 """ # revision identifiers, used by Alembic. revision = '0c98b865104f' down_revision = '7b6a65c708b9' from a...
b2bef05e0490d161ecec07b4403964c19875ee5d
numba/cuda/tests/nocuda/test_function_resolution.py
numba/cuda/tests/nocuda/test_function_resolution.py
from numba.cuda.testing import unittest, skip_on_cudasim import operator from numba.core import types, typing @skip_on_cudasim("Skip on simulator due to use of cuda_target") class TestFunctionResolutionNoCuda(unittest.TestCase): def test_fp16_binary_operators(self): from numba.cuda.descriptor import cuda_...
Add new case for function resolution of fp16 unary and binary operators
Add new case for function resolution of fp16 unary and binary operators
Python
bsd-2-clause
numba/numba,cpcloud/numba,cpcloud/numba,cpcloud/numba,numba/numba,numba/numba,numba/numba,cpcloud/numba,numba/numba,cpcloud/numba
Add new case for function resolution of fp16 unary and binary operators
from numba.cuda.testing import unittest, skip_on_cudasim import operator from numba.core import types, typing @skip_on_cudasim("Skip on simulator due to use of cuda_target") class TestFunctionResolutionNoCuda(unittest.TestCase): def test_fp16_binary_operators(self): from numba.cuda.descriptor import cuda_...
<commit_before><commit_msg>Add new case for function resolution of fp16 unary and binary operators<commit_after>
from numba.cuda.testing import unittest, skip_on_cudasim import operator from numba.core import types, typing @skip_on_cudasim("Skip on simulator due to use of cuda_target") class TestFunctionResolutionNoCuda(unittest.TestCase): def test_fp16_binary_operators(self): from numba.cuda.descriptor import cuda_...
Add new case for function resolution of fp16 unary and binary operatorsfrom numba.cuda.testing import unittest, skip_on_cudasim import operator from numba.core import types, typing @skip_on_cudasim("Skip on simulator due to use of cuda_target") class TestFunctionResolutionNoCuda(unittest.TestCase): def test_fp16_...
<commit_before><commit_msg>Add new case for function resolution of fp16 unary and binary operators<commit_after>from numba.cuda.testing import unittest, skip_on_cudasim import operator from numba.core import types, typing @skip_on_cudasim("Skip on simulator due to use of cuda_target") class TestFunctionResolutionNoCu...
c456ec0a5dd4c48b13d82930eab32c85bcc0e7be
migrations/versions/75f579d01f0d_.py
migrations/versions/75f579d01f0d_.py
"""empty message Revision ID: 75f579d01f0d Revises: 25f4f234760c Create Date: 2017-05-06 23:15:02.228272 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '75f579d01f0d' down_revision = '25f4f234760c' branch_labels = None depends_on = None def upgrade(): # ...
Add short_url column to Graph
Add short_url column to Graph Make username a nullable field in Graph, so people don't have to register to share graphs.
Python
mit
stardust66/math3d,ChristopherChudzicki/math3d,ChristopherChudzicki/math3d,stardust66/math3d,ChristopherChudzicki/math3d,ChristopherChudzicki/math3d,stardust66/math3d,stardust66/math3d
Add short_url column to Graph Make username a nullable field in Graph, so people don't have to register to share graphs.
"""empty message Revision ID: 75f579d01f0d Revises: 25f4f234760c Create Date: 2017-05-06 23:15:02.228272 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '75f579d01f0d' down_revision = '25f4f234760c' branch_labels = None depends_on = None def upgrade(): # ...
<commit_before><commit_msg>Add short_url column to Graph Make username a nullable field in Graph, so people don't have to register to share graphs.<commit_after>
"""empty message Revision ID: 75f579d01f0d Revises: 25f4f234760c Create Date: 2017-05-06 23:15:02.228272 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '75f579d01f0d' down_revision = '25f4f234760c' branch_labels = None depends_on = None def upgrade(): # ...
Add short_url column to Graph Make username a nullable field in Graph, so people don't have to register to share graphs."""empty message Revision ID: 75f579d01f0d Revises: 25f4f234760c Create Date: 2017-05-06 23:15:02.228272 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic...
<commit_before><commit_msg>Add short_url column to Graph Make username a nullable field in Graph, so people don't have to register to share graphs.<commit_after>"""empty message Revision ID: 75f579d01f0d Revises: 25f4f234760c Create Date: 2017-05-06 23:15:02.228272 """ from alembic import op import sqlalchemy as sa ...
189ec6dabc25eb91335568a7e6547483f9ec2960
modules/tools/extractor/extractor.py
modules/tools/extractor/extractor.py
#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo Authors. 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 ...
Add tool to extract routing from planning debug
Add tool to extract routing from planning debug
Python
apache-2.0
ApolloAuto/apollo,ycool/apollo,ApolloAuto/apollo,xiaoxq/apollo,xiaoxq/apollo,ycool/apollo,ycool/apollo,ycool/apollo,jinghaomiao/apollo,wanglei828/apollo,wanglei828/apollo,ycool/apollo,ApolloAuto/apollo,jinghaomiao/apollo,jinghaomiao/apollo,jinghaomiao/apollo,xiaoxq/apollo,wanglei828/apollo,wanglei828/apollo,xiaoxq/apol...
Add tool to extract routing from planning debug
#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo Authors. 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 ...
<commit_before><commit_msg>Add tool to extract routing from planning debug<commit_after>
#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo Authors. 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 ...
Add tool to extract routing from planning debug#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compli...
<commit_before><commit_msg>Add tool to extract routing from planning debug<commit_after>#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # y...
0e98d0fae4a81deec57ae162b8db5bcf950b3ea3
cnxarchive/sql/migrations/20160128110515_mimetype_on_files_table.py
cnxarchive/sql/migrations/20160128110515_mimetype_on_files_table.py
# -*- coding: utf-8 -*- """\ - Add a ``media_type`` column to the ``files`` table. - Move the mimetype value from ``module_files`` to ``files``. """ from __future__ import print_function import sys def up(cursor): # Add a ``media_type`` column to the ``files`` table. cursor.execute("ALTER TABLE files ADD COL...
Move mimetype column from module_files to files
Move mimetype column from module_files to files
Python
agpl-3.0
Connexions/cnx-archive,Connexions/cnx-archive
Move mimetype column from module_files to files
# -*- coding: utf-8 -*- """\ - Add a ``media_type`` column to the ``files`` table. - Move the mimetype value from ``module_files`` to ``files``. """ from __future__ import print_function import sys def up(cursor): # Add a ``media_type`` column to the ``files`` table. cursor.execute("ALTER TABLE files ADD COL...
<commit_before><commit_msg>Move mimetype column from module_files to files<commit_after>
# -*- coding: utf-8 -*- """\ - Add a ``media_type`` column to the ``files`` table. - Move the mimetype value from ``module_files`` to ``files``. """ from __future__ import print_function import sys def up(cursor): # Add a ``media_type`` column to the ``files`` table. cursor.execute("ALTER TABLE files ADD COL...
Move mimetype column from module_files to files# -*- coding: utf-8 -*- """\ - Add a ``media_type`` column to the ``files`` table. - Move the mimetype value from ``module_files`` to ``files``. """ from __future__ import print_function import sys def up(cursor): # Add a ``media_type`` column to the ``files`` table...
<commit_before><commit_msg>Move mimetype column from module_files to files<commit_after># -*- coding: utf-8 -*- """\ - Add a ``media_type`` column to the ``files`` table. - Move the mimetype value from ``module_files`` to ``files``. """ from __future__ import print_function import sys def up(cursor): # Add a ``m...
ce9657eec421eb626f22405ab744f1554d8c376f
src/utils/clean_categories.py
src/utils/clean_categories.py
import re def clean_categories(text): """Replace Wikipedia category links with the name of the category in the text of an article. Text like "[[Category:Foo]]" will be replaced with "Foo". Sorting hints are thrown away during this cleaning, so text like "[[Category:Bar|Sorting hint]]" will be repla...
Add script to clean Wikipedia categories
Add script to clean Wikipedia categories
Python
apache-2.0
tiffanyj41/hermes,tiffanyj41/hermes,tiffanyj41/hermes,tiffanyj41/hermes
Add script to clean Wikipedia categories
import re def clean_categories(text): """Replace Wikipedia category links with the name of the category in the text of an article. Text like "[[Category:Foo]]" will be replaced with "Foo". Sorting hints are thrown away during this cleaning, so text like "[[Category:Bar|Sorting hint]]" will be repla...
<commit_before><commit_msg>Add script to clean Wikipedia categories<commit_after>
import re def clean_categories(text): """Replace Wikipedia category links with the name of the category in the text of an article. Text like "[[Category:Foo]]" will be replaced with "Foo". Sorting hints are thrown away during this cleaning, so text like "[[Category:Bar|Sorting hint]]" will be repla...
Add script to clean Wikipedia categoriesimport re def clean_categories(text): """Replace Wikipedia category links with the name of the category in the text of an article. Text like "[[Category:Foo]]" will be replaced with "Foo". Sorting hints are thrown away during this cleaning, so text like "[[Catego...
<commit_before><commit_msg>Add script to clean Wikipedia categories<commit_after>import re def clean_categories(text): """Replace Wikipedia category links with the name of the category in the text of an article. Text like "[[Category:Foo]]" will be replaced with "Foo". Sorting hints are thrown away dur...
190153d06864b64275fbd515c2f1a2b8c8a5cdba
tests/test_specs.py
tests/test_specs.py
from imagekit.cachefiles import ImageCacheFile from nose.tools import assert_false from .imagegenerators import TestSpec def test_no_source(): """ Ensure sourceless specs are falsy. """ spec = TestSpec(source=None) file = ImageCacheFile(spec) assert_false(bool(file))
Add test to ensure sourceless specs are falsy
Add test to ensure sourceless specs are falsy Currently failing; related to #187
Python
bsd-3-clause
tawanda/django-imagekit,FundedByMe/django-imagekit,FundedByMe/django-imagekit,tawanda/django-imagekit
Add test to ensure sourceless specs are falsy Currently failing; related to #187
from imagekit.cachefiles import ImageCacheFile from nose.tools import assert_false from .imagegenerators import TestSpec def test_no_source(): """ Ensure sourceless specs are falsy. """ spec = TestSpec(source=None) file = ImageCacheFile(spec) assert_false(bool(file))
<commit_before><commit_msg>Add test to ensure sourceless specs are falsy Currently failing; related to #187<commit_after>
from imagekit.cachefiles import ImageCacheFile from nose.tools import assert_false from .imagegenerators import TestSpec def test_no_source(): """ Ensure sourceless specs are falsy. """ spec = TestSpec(source=None) file = ImageCacheFile(spec) assert_false(bool(file))
Add test to ensure sourceless specs are falsy Currently failing; related to #187from imagekit.cachefiles import ImageCacheFile from nose.tools import assert_false from .imagegenerators import TestSpec def test_no_source(): """ Ensure sourceless specs are falsy. """ spec = TestSpec(source=None) fi...
<commit_before><commit_msg>Add test to ensure sourceless specs are falsy Currently failing; related to #187<commit_after>from imagekit.cachefiles import ImageCacheFile from nose.tools import assert_false from .imagegenerators import TestSpec def test_no_source(): """ Ensure sourceless specs are falsy. ""...
c831bfb8e5e28fdcf0dff818dd08274fa2fdb5cd
scripts/consistency/fix_tag_guids.py
scripts/consistency/fix_tag_guids.py
"""Removes legacy Tag objects from the Guid namespace. Tags were once GuidStoredObjects, but are no longer. The Guid table was not cleaned of these references. This caused a specific issue where "project" was a Tag id, and therefore was resolveable to a Guid object, thereby breaking our routing system for URLs beginn...
Refactor of migration script for migrating invalid Guid objects
Refactor of migration script for migrating invalid Guid objects - Remove import side effects - Add tests
Python
apache-2.0
lyndsysimon/osf.io,binoculars/osf.io,doublebits/osf.io,rdhyee/osf.io,arpitar/osf.io,brandonPurvis/osf.io,abought/osf.io,erinspace/osf.io,chennan47/osf.io,felliott/osf.io,aaxelb/osf.io,Ghalko/osf.io,leb2dg/osf.io,cldershem/osf.io,mattclark/osf.io,SSJohns/osf.io,baylee-d/osf.io,cslzchen/osf.io,felliott/osf.io,zamattiac/o...
Refactor of migration script for migrating invalid Guid objects - Remove import side effects - Add tests
"""Removes legacy Tag objects from the Guid namespace. Tags were once GuidStoredObjects, but are no longer. The Guid table was not cleaned of these references. This caused a specific issue where "project" was a Tag id, and therefore was resolveable to a Guid object, thereby breaking our routing system for URLs beginn...
<commit_before><commit_msg>Refactor of migration script for migrating invalid Guid objects - Remove import side effects - Add tests<commit_after>
"""Removes legacy Tag objects from the Guid namespace. Tags were once GuidStoredObjects, but are no longer. The Guid table was not cleaned of these references. This caused a specific issue where "project" was a Tag id, and therefore was resolveable to a Guid object, thereby breaking our routing system for URLs beginn...
Refactor of migration script for migrating invalid Guid objects - Remove import side effects - Add tests"""Removes legacy Tag objects from the Guid namespace. Tags were once GuidStoredObjects, but are no longer. The Guid table was not cleaned of these references. This caused a specific issue where "project" was a Ta...
<commit_before><commit_msg>Refactor of migration script for migrating invalid Guid objects - Remove import side effects - Add tests<commit_after>"""Removes legacy Tag objects from the Guid namespace. Tags were once GuidStoredObjects, but are no longer. The Guid table was not cleaned of these references. This caused ...
efc21569590e90bddaf9d06ea3747f3dd3476253
aqt/utils/common.py
aqt/utils/common.py
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
Create a new util function that computes precision for floating-point quantization.
Create a new util function that computes precision for floating-point quantization. PiperOrigin-RevId: 395302655
Python
apache-2.0
google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,...
Create a new util function that computes precision for floating-point quantization. PiperOrigin-RevId: 395302655
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
<commit_before><commit_msg>Create a new util function that computes precision for floating-point quantization. PiperOrigin-RevId: 395302655<commit_after>
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
Create a new util function that computes precision for floating-point quantization. PiperOrigin-RevId: 395302655# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may o...
<commit_before><commit_msg>Create a new util function that computes precision for floating-point quantization. PiperOrigin-RevId: 395302655<commit_after># coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in...
3209a38b795cb5519f92bbfc2651df5b69ba0f76
moderation_queue/migrations/0008_add_ignore_to_decision_choices.py
moderation_queue/migrations/0008_add_ignore_to_decision_choices.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('moderation_queue', '0007_auto_20150303_1420'), ] operations = [ migrations.AlterField( model_name='queuedimage',...
Add a forgotten migration (to add 'ignore' as a decision choice)
Add a forgotten migration (to add 'ignore' as a decision choice) This should have gone into d5086f1d74d448
Python
agpl-3.0
mysociety/yournextmp-popit,datamade/yournextmp-popit,YoQuieroSaber/yournextrepresentative,neavouli/yournextrepresentative,DemocracyClub/yournextrepresentative,neavouli/yournextrepresentative,DemocracyClub/yournextrepresentative,mysociety/yournextrepresentative,YoQuieroSaber/yournextrepresentative,mysociety/yournextrepr...
Add a forgotten migration (to add 'ignore' as a decision choice) This should have gone into d5086f1d74d448
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('moderation_queue', '0007_auto_20150303_1420'), ] operations = [ migrations.AlterField( model_name='queuedimage',...
<commit_before><commit_msg>Add a forgotten migration (to add 'ignore' as a decision choice) This should have gone into d5086f1d74d448<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('moderation_queue', '0007_auto_20150303_1420'), ] operations = [ migrations.AlterField( model_name='queuedimage',...
Add a forgotten migration (to add 'ignore' as a decision choice) This should have gone into d5086f1d74d448# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('moderation_queue', '0007_auto_2015...
<commit_before><commit_msg>Add a forgotten migration (to add 'ignore' as a decision choice) This should have gone into d5086f1d74d448<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ...
883707309447fa4edd47459b4f2d8e7d449afd41
array/80.py
array/80.py
class Solution: def removeDuplicates(self, nums): """ :type nums: List[int] :rtype: int """ if not nums: return 0 length = len(nums) pre = 0 cur = 1 flag = False #False 1连续 True 2连续 while cur < length: i...
Remove Duplicates from Sorted Array II
Remove Duplicates from Sorted Array II
Python
apache-2.0
MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode
Remove Duplicates from Sorted Array II
class Solution: def removeDuplicates(self, nums): """ :type nums: List[int] :rtype: int """ if not nums: return 0 length = len(nums) pre = 0 cur = 1 flag = False #False 1连续 True 2连续 while cur < length: i...
<commit_before><commit_msg>Remove Duplicates from Sorted Array II<commit_after>
class Solution: def removeDuplicates(self, nums): """ :type nums: List[int] :rtype: int """ if not nums: return 0 length = len(nums) pre = 0 cur = 1 flag = False #False 1连续 True 2连续 while cur < length: i...
Remove Duplicates from Sorted Array IIclass Solution: def removeDuplicates(self, nums): """ :type nums: List[int] :rtype: int """ if not nums: return 0 length = len(nums) pre = 0 cur = 1 flag = False #False 1连续 True 2连续 ...
<commit_before><commit_msg>Remove Duplicates from Sorted Array II<commit_after>class Solution: def removeDuplicates(self, nums): """ :type nums: List[int] :rtype: int """ if not nums: return 0 length = len(nums) pre = 0 cur = 1 ...
087ba4c6bb7f268eb11584e4dbcf449e08fcaf0b
analysis/10-extract-jacobian-chunks.py
analysis/10-extract-jacobian-chunks.py
import climate import joblib import numpy as np def extract(trial, output, frames): dirname = os.path.join(output, trial.subject.key) pattern = '{}-{}-{{}}.npy'.format(trial.block.key, trial.key) if not os.path.isdir(dirname): os.makedirs(dirname) def save(key, arr): out = os.path.joi...
Add a script for saving paired posture/jacobian arrays.
Add a script for saving paired posture/jacobian arrays.
Python
mit
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
Add a script for saving paired posture/jacobian arrays.
import climate import joblib import numpy as np def extract(trial, output, frames): dirname = os.path.join(output, trial.subject.key) pattern = '{}-{}-{{}}.npy'.format(trial.block.key, trial.key) if not os.path.isdir(dirname): os.makedirs(dirname) def save(key, arr): out = os.path.joi...
<commit_before><commit_msg>Add a script for saving paired posture/jacobian arrays.<commit_after>
import climate import joblib import numpy as np def extract(trial, output, frames): dirname = os.path.join(output, trial.subject.key) pattern = '{}-{}-{{}}.npy'.format(trial.block.key, trial.key) if not os.path.isdir(dirname): os.makedirs(dirname) def save(key, arr): out = os.path.joi...
Add a script for saving paired posture/jacobian arrays.import climate import joblib import numpy as np def extract(trial, output, frames): dirname = os.path.join(output, trial.subject.key) pattern = '{}-{}-{{}}.npy'.format(trial.block.key, trial.key) if not os.path.isdir(dirname): os.makedirs(dirn...
<commit_before><commit_msg>Add a script for saving paired posture/jacobian arrays.<commit_after>import climate import joblib import numpy as np def extract(trial, output, frames): dirname = os.path.join(output, trial.subject.key) pattern = '{}-{}-{{}}.npy'.format(trial.block.key, trial.key) if not os.path...
7b33ea38283c9e9f00a2aacaa17634e50e55e42b
stationspinner/accounting/migrations/0005_auto_20150919_2207.py
stationspinner/accounting/migrations/0005_auto_20150919_2207.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators import django.contrib.auth.models class Migration(migrations.Migration): dependencies = [ ('accounting', '0004_apikey_brokeness'), ] operations = [ migr...
Migrate auth for django 1.8
Migrate auth for django 1.8
Python
agpl-3.0
kriberg/stationspinner,kriberg/stationspinner
Migrate auth for django 1.8
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators import django.contrib.auth.models class Migration(migrations.Migration): dependencies = [ ('accounting', '0004_apikey_brokeness'), ] operations = [ migr...
<commit_before><commit_msg>Migrate auth for django 1.8<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators import django.contrib.auth.models class Migration(migrations.Migration): dependencies = [ ('accounting', '0004_apikey_brokeness'), ] operations = [ migr...
Migrate auth for django 1.8# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators import django.contrib.auth.models class Migration(migrations.Migration): dependencies = [ ('accounting', '0004_apikey_brokeness'), ] ...
<commit_before><commit_msg>Migrate auth for django 1.8<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators import django.contrib.auth.models class Migration(migrations.Migration): dependencies = [ ('accountin...
23b4ad3b028e674307fdc6cc7a72953150fd0be3
zephyr/management/commands/check_redis.py
zephyr/management/commands/check_redis.py
from __future__ import absolute_import from zephyr.models import UserProfile, get_user_profile_by_id from zephyr.lib.rate_limiter import redis_key, client, max_api_calls, max_api_window from django.core.management.base import BaseCommand from django.conf import settings from optparse import make_option import os, ti...
Add a redis_check management command
Add a redis_check management command (imported from commit 04a272ca8d8288f7e3b1a54fd5d73629bde938a0)
Python
apache-2.0
bitemyapp/zulip,cosmicAsymmetry/zulip,mahim97/zulip,jessedhillon/zulip,esander91/zulip,Diptanshu8/zulip,JPJPJPOPOP/zulip,akuseru/zulip,RobotCaleb/zulip,m1ssou/zulip,ApsOps/zulip,AZtheAsian/zulip,themass/zulip,vabs22/zulip,zhaoweigg/zulip,wangdeshui/zulip,rishig/zulip,alliejones/zulip,ashwinirudrappa/zulip,Gabriel0402/z...
Add a redis_check management command (imported from commit 04a272ca8d8288f7e3b1a54fd5d73629bde938a0)
from __future__ import absolute_import from zephyr.models import UserProfile, get_user_profile_by_id from zephyr.lib.rate_limiter import redis_key, client, max_api_calls, max_api_window from django.core.management.base import BaseCommand from django.conf import settings from optparse import make_option import os, ti...
<commit_before><commit_msg>Add a redis_check management command (imported from commit 04a272ca8d8288f7e3b1a54fd5d73629bde938a0)<commit_after>
from __future__ import absolute_import from zephyr.models import UserProfile, get_user_profile_by_id from zephyr.lib.rate_limiter import redis_key, client, max_api_calls, max_api_window from django.core.management.base import BaseCommand from django.conf import settings from optparse import make_option import os, ti...
Add a redis_check management command (imported from commit 04a272ca8d8288f7e3b1a54fd5d73629bde938a0)from __future__ import absolute_import from zephyr.models import UserProfile, get_user_profile_by_id from zephyr.lib.rate_limiter import redis_key, client, max_api_calls, max_api_window from django.core.management.bas...
<commit_before><commit_msg>Add a redis_check management command (imported from commit 04a272ca8d8288f7e3b1a54fd5d73629bde938a0)<commit_after>from __future__ import absolute_import from zephyr.models import UserProfile, get_user_profile_by_id from zephyr.lib.rate_limiter import redis_key, client, max_api_calls, max_ap...
29ed484c77ab1c68c5e81f06a527da49713ee427
euler020.py
euler020.py
#!/usr/bin/python from math import factorial fact = str(factorial(100)) result = 0 for i in range(len(fact)): result += int(fact[i]) print(result)
Add solution for problem 20
Add solution for problem 20
Python
mit
cifvts/PyEuler
Add solution for problem 20
#!/usr/bin/python from math import factorial fact = str(factorial(100)) result = 0 for i in range(len(fact)): result += int(fact[i]) print(result)
<commit_before><commit_msg>Add solution for problem 20<commit_after>
#!/usr/bin/python from math import factorial fact = str(factorial(100)) result = 0 for i in range(len(fact)): result += int(fact[i]) print(result)
Add solution for problem 20#!/usr/bin/python from math import factorial fact = str(factorial(100)) result = 0 for i in range(len(fact)): result += int(fact[i]) print(result)
<commit_before><commit_msg>Add solution for problem 20<commit_after>#!/usr/bin/python from math import factorial fact = str(factorial(100)) result = 0 for i in range(len(fact)): result += int(fact[i]) print(result)
073bcb1f6f495305c9d02300646e269fcd2b920e
hc/api/migrations/0059_auto_20190314_1744.py
hc/api/migrations/0059_auto_20190314_1744.py
# Generated by Django 2.1.7 on 2019-03-14 17:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0058_auto_20190312_1716'), ] operations = [ migrations.AlterField( model_name='channel', name='kind', ...
Add migration (autogenerated via `manage.py makemigrations`)
Add migration (autogenerated via `manage.py makemigrations`)
Python
bsd-3-clause
healthchecks/healthchecks,iphoting/healthchecks,healthchecks/healthchecks,iphoting/healthchecks,healthchecks/healthchecks,iphoting/healthchecks,healthchecks/healthchecks,iphoting/healthchecks
Add migration (autogenerated via `manage.py makemigrations`)
# Generated by Django 2.1.7 on 2019-03-14 17:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0058_auto_20190312_1716'), ] operations = [ migrations.AlterField( model_name='channel', name='kind', ...
<commit_before><commit_msg>Add migration (autogenerated via `manage.py makemigrations`)<commit_after>
# Generated by Django 2.1.7 on 2019-03-14 17:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0058_auto_20190312_1716'), ] operations = [ migrations.AlterField( model_name='channel', name='kind', ...
Add migration (autogenerated via `manage.py makemigrations`)# Generated by Django 2.1.7 on 2019-03-14 17:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0058_auto_20190312_1716'), ] operations = [ migrations.AlterField( ...
<commit_before><commit_msg>Add migration (autogenerated via `manage.py makemigrations`)<commit_after># Generated by Django 2.1.7 on 2019-03-14 17:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0058_auto_20190312_1716'), ] operations ...
75f69d02100e4f804fd6e742841c0e5ecb1731d2
algorithms/graph-theory/prims-mst-special-subtree/prims-mst.py
algorithms/graph-theory/prims-mst-special-subtree/prims-mst.py
#!/usr/bin/env python import sys from queue import PriorityQueue class Graph(object): """ Represents a graph using an adjacency list. """ def __init__(self, N): self.nodes = [None] * N def add_undir_edge(self, x, y, r): self.add_dir_edge(x, y, r) self.add_dir_edge(y, x, r...
Implement Prim's MST in Python
Implement Prim's MST in Python
Python
mit
andreimaximov/algorithms,andreimaximov/algorithms,andreimaximov/algorithms,andreimaximov/algorithms
Implement Prim's MST in Python
#!/usr/bin/env python import sys from queue import PriorityQueue class Graph(object): """ Represents a graph using an adjacency list. """ def __init__(self, N): self.nodes = [None] * N def add_undir_edge(self, x, y, r): self.add_dir_edge(x, y, r) self.add_dir_edge(y, x, r...
<commit_before><commit_msg>Implement Prim's MST in Python<commit_after>
#!/usr/bin/env python import sys from queue import PriorityQueue class Graph(object): """ Represents a graph using an adjacency list. """ def __init__(self, N): self.nodes = [None] * N def add_undir_edge(self, x, y, r): self.add_dir_edge(x, y, r) self.add_dir_edge(y, x, r...
Implement Prim's MST in Python#!/usr/bin/env python import sys from queue import PriorityQueue class Graph(object): """ Represents a graph using an adjacency list. """ def __init__(self, N): self.nodes = [None] * N def add_undir_edge(self, x, y, r): self.add_dir_edge(x, y, r) ...
<commit_before><commit_msg>Implement Prim's MST in Python<commit_after>#!/usr/bin/env python import sys from queue import PriorityQueue class Graph(object): """ Represents a graph using an adjacency list. """ def __init__(self, N): self.nodes = [None] * N def add_undir_edge(self, x, y, r...
5b29eaacb363501c9596061a1bd197c49bb00db3
qa/manage_crypto_listings.py
qa/manage_crypto_listings.py
import requests import json import time from collections import OrderedDict from test_framework.test_framework import OpenBazaarTestFramework, TestFailure class ManageCryptoListingsTest(OpenBazaarTestFramework): def __init__(self): super().__init__() self.num_nodes = 1 def run_test(self): ...
Add crypto listing management qa test and test listings index.
TESTS: Add crypto listing management qa test and test listings index.
Python
mit
OpenBazaar/openbazaar-go,gubatron/openbazaar-go,hoffmabc/openbazaar-go,hoffmabc/openbazaar-go,OpenBazaar/openbazaar-go,hoffmabc/openbazaar-go,gubatron/openbazaar-go,OpenBazaar/openbazaar-go,gubatron/openbazaar-go
TESTS: Add crypto listing management qa test and test listings index.
import requests import json import time from collections import OrderedDict from test_framework.test_framework import OpenBazaarTestFramework, TestFailure class ManageCryptoListingsTest(OpenBazaarTestFramework): def __init__(self): super().__init__() self.num_nodes = 1 def run_test(self): ...
<commit_before><commit_msg>TESTS: Add crypto listing management qa test and test listings index.<commit_after>
import requests import json import time from collections import OrderedDict from test_framework.test_framework import OpenBazaarTestFramework, TestFailure class ManageCryptoListingsTest(OpenBazaarTestFramework): def __init__(self): super().__init__() self.num_nodes = 1 def run_test(self): ...
TESTS: Add crypto listing management qa test and test listings index.import requests import json import time from collections import OrderedDict from test_framework.test_framework import OpenBazaarTestFramework, TestFailure class ManageCryptoListingsTest(OpenBazaarTestFramework): def __init__(self): supe...
<commit_before><commit_msg>TESTS: Add crypto listing management qa test and test listings index.<commit_after>import requests import json import time from collections import OrderedDict from test_framework.test_framework import OpenBazaarTestFramework, TestFailure class ManageCryptoListingsTest(OpenBazaarTestFramewor...
a29540ea36ab4e73ba3d89fc8ed47022af28b482
readthedocs/rtd_tests/tests/test_build_storage.py
readthedocs/rtd_tests/tests/test_build_storage.py
import os import shutil import tempfile from django.test import TestCase from readthedocs.builds.storage import BuildMediaFileSystemStorage files_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'files') class TestBuildMediaStorage(TestCase): def setUp(self): self.test_media_dir = tempfi...
Add tests for the build media storage
Add tests for the build media storage
Python
mit
rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org
Add tests for the build media storage
import os import shutil import tempfile from django.test import TestCase from readthedocs.builds.storage import BuildMediaFileSystemStorage files_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'files') class TestBuildMediaStorage(TestCase): def setUp(self): self.test_media_dir = tempfi...
<commit_before><commit_msg>Add tests for the build media storage<commit_after>
import os import shutil import tempfile from django.test import TestCase from readthedocs.builds.storage import BuildMediaFileSystemStorage files_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'files') class TestBuildMediaStorage(TestCase): def setUp(self): self.test_media_dir = tempfi...
Add tests for the build media storageimport os import shutil import tempfile from django.test import TestCase from readthedocs.builds.storage import BuildMediaFileSystemStorage files_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'files') class TestBuildMediaStorage(TestCase): def setUp(self):...
<commit_before><commit_msg>Add tests for the build media storage<commit_after>import os import shutil import tempfile from django.test import TestCase from readthedocs.builds.storage import BuildMediaFileSystemStorage files_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'files') class TestBuildMed...
7ed7cab1cc41fea7665d9e9c05cbb2eb097486a3
appointment/migrations/0002_vaccineappointment_20181031_1852.py
appointment/migrations/0002_vaccineappointment_20181031_1852.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2018-10-31 23:52 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('appointment', '0001_initial'), ] ...
Add migration for vaccine appointment update.
Add migration for vaccine appointment update.
Python
mit
SaturdayNeighborhoodHealthClinic/clintools,SaturdayNeighborhoodHealthClinic/clintools,SaturdayNeighborhoodHealthClinic/clintools
Add migration for vaccine appointment update.
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2018-10-31 23:52 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('appointment', '0001_initial'), ] ...
<commit_before><commit_msg>Add migration for vaccine appointment update.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2018-10-31 23:52 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('appointment', '0001_initial'), ] ...
Add migration for vaccine appointment update.# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2018-10-31 23:52 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ...
<commit_before><commit_msg>Add migration for vaccine appointment update.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2018-10-31 23:52 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migratio...
c46731098c6a8f26e4de899d2d2e083734f6772f
numpy/typing/tests/test_typing_extensions.py
numpy/typing/tests/test_typing_extensions.py
"""Tests for the optional typing-extensions dependency.""" import sys import types import inspect import importlib import typing_extensions import numpy.typing as npt def _is_sub_module(obj: object) -> bool: """Check if `obj` is a `numpy.typing` submodule.""" return inspect.ismodule(obj) and obj.__name__.st...
Test that `numpy.typing` can be imported in the the absence of typing-extensions
TST: Test that `numpy.typing` can be imported in the the absence of typing-extensions
Python
bsd-3-clause
pdebuyl/numpy,rgommers/numpy,charris/numpy,anntzer/numpy,numpy/numpy,rgommers/numpy,mhvk/numpy,seberg/numpy,pdebuyl/numpy,endolith/numpy,jakirkham/numpy,mattip/numpy,mhvk/numpy,simongibbons/numpy,numpy/numpy,endolith/numpy,simongibbons/numpy,pdebuyl/numpy,simongibbons/numpy,endolith/numpy,anntzer/numpy,seberg/numpy,num...
TST: Test that `numpy.typing` can be imported in the the absence of typing-extensions
"""Tests for the optional typing-extensions dependency.""" import sys import types import inspect import importlib import typing_extensions import numpy.typing as npt def _is_sub_module(obj: object) -> bool: """Check if `obj` is a `numpy.typing` submodule.""" return inspect.ismodule(obj) and obj.__name__.st...
<commit_before><commit_msg>TST: Test that `numpy.typing` can be imported in the the absence of typing-extensions<commit_after>
"""Tests for the optional typing-extensions dependency.""" import sys import types import inspect import importlib import typing_extensions import numpy.typing as npt def _is_sub_module(obj: object) -> bool: """Check if `obj` is a `numpy.typing` submodule.""" return inspect.ismodule(obj) and obj.__name__.st...
TST: Test that `numpy.typing` can be imported in the the absence of typing-extensions"""Tests for the optional typing-extensions dependency.""" import sys import types import inspect import importlib import typing_extensions import numpy.typing as npt def _is_sub_module(obj: object) -> bool: """Check if `obj` i...
<commit_before><commit_msg>TST: Test that `numpy.typing` can be imported in the the absence of typing-extensions<commit_after>"""Tests for the optional typing-extensions dependency.""" import sys import types import inspect import importlib import typing_extensions import numpy.typing as npt def _is_sub_module(obj:...
0a6f6db77dd888b810089659100158ed4e8e3cee
test/test_object_factory.py
test/test_object_factory.py
import unittest import groundstation.objects.object_factory as object_factory from groundstation.objects.root_object import RootObject from groundstation.objects.update_object import UpdateObject class TestRootObject(unittest.TestCase): def test_hydrate_root_object(self): root = RootObject( ...
Add tests for the object factory with various permutations
Add tests for the object factory with various permutations
Python
mit
richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation
Add tests for the object factory with various permutations
import unittest import groundstation.objects.object_factory as object_factory from groundstation.objects.root_object import RootObject from groundstation.objects.update_object import UpdateObject class TestRootObject(unittest.TestCase): def test_hydrate_root_object(self): root = RootObject( ...
<commit_before><commit_msg>Add tests for the object factory with various permutations<commit_after>
import unittest import groundstation.objects.object_factory as object_factory from groundstation.objects.root_object import RootObject from groundstation.objects.update_object import UpdateObject class TestRootObject(unittest.TestCase): def test_hydrate_root_object(self): root = RootObject( ...
Add tests for the object factory with various permutationsimport unittest import groundstation.objects.object_factory as object_factory from groundstation.objects.root_object import RootObject from groundstation.objects.update_object import UpdateObject class TestRootObject(unittest.TestCase): def test_hydrate_ro...
<commit_before><commit_msg>Add tests for the object factory with various permutations<commit_after>import unittest import groundstation.objects.object_factory as object_factory from groundstation.objects.root_object import RootObject from groundstation.objects.update_object import UpdateObject class TestRootObject(un...
93bc13af093186b3a74570882135b81ddeeb6719
drudge/term.py
drudge/term.py
"""Tensor term definition and utility.""" from sympy import sympify class Range: """A symbolic range that can be summed over. This class is for symbolic ranges that is going to be summed over in tensors. Each range should have a label, and optionally lower and upper bounds, which should be both giv...
Add class for symbolic ranges
Add class for symbolic ranges Compared with PySLATA, this definition is a lot more simplified. All the ranges are assumed to be atomic and disjoint. No need to implement the range arithmetic.
Python
mit
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
Add class for symbolic ranges Compared with PySLATA, this definition is a lot more simplified. All the ranges are assumed to be atomic and disjoint. No need to implement the range arithmetic.
"""Tensor term definition and utility.""" from sympy import sympify class Range: """A symbolic range that can be summed over. This class is for symbolic ranges that is going to be summed over in tensors. Each range should have a label, and optionally lower and upper bounds, which should be both giv...
<commit_before><commit_msg>Add class for symbolic ranges Compared with PySLATA, this definition is a lot more simplified. All the ranges are assumed to be atomic and disjoint. No need to implement the range arithmetic.<commit_after>
"""Tensor term definition and utility.""" from sympy import sympify class Range: """A symbolic range that can be summed over. This class is for symbolic ranges that is going to be summed over in tensors. Each range should have a label, and optionally lower and upper bounds, which should be both giv...
Add class for symbolic ranges Compared with PySLATA, this definition is a lot more simplified. All the ranges are assumed to be atomic and disjoint. No need to implement the range arithmetic."""Tensor term definition and utility.""" from sympy import sympify class Range: """A symbolic range that can be summed...
<commit_before><commit_msg>Add class for symbolic ranges Compared with PySLATA, this definition is a lot more simplified. All the ranges are assumed to be atomic and disjoint. No need to implement the range arithmetic.<commit_after>"""Tensor term definition and utility.""" from sympy import sympify class Range: ...
0f72c4bf32986aae7a59b2380c5a314038c7ed61
aids/stack/queue_two_stacks.py
aids/stack/queue_two_stacks.py
''' Implement Queue data structure using two stacks ''' from stack import Stack class QueueUsingTwoStacks(object): def __init__(self): ''' Initialize Queue ''' self.stack1 = Stack() self.stack2 = Stack() def __len__(self): ''' Return number of items in Queue ''' return len(self.stack1) + len(s...
Add Queue implementation using two stacks
Add Queue implementation using two stacks
Python
mit
ueg1990/aids
Add Queue implementation using two stacks
''' Implement Queue data structure using two stacks ''' from stack import Stack class QueueUsingTwoStacks(object): def __init__(self): ''' Initialize Queue ''' self.stack1 = Stack() self.stack2 = Stack() def __len__(self): ''' Return number of items in Queue ''' return len(self.stack1) + len(s...
<commit_before><commit_msg>Add Queue implementation using two stacks<commit_after>
''' Implement Queue data structure using two stacks ''' from stack import Stack class QueueUsingTwoStacks(object): def __init__(self): ''' Initialize Queue ''' self.stack1 = Stack() self.stack2 = Stack() def __len__(self): ''' Return number of items in Queue ''' return len(self.stack1) + len(s...
Add Queue implementation using two stacks''' Implement Queue data structure using two stacks ''' from stack import Stack class QueueUsingTwoStacks(object): def __init__(self): ''' Initialize Queue ''' self.stack1 = Stack() self.stack2 = Stack() def __len__(self): ''' Return number of items in Queue...
<commit_before><commit_msg>Add Queue implementation using two stacks<commit_after>''' Implement Queue data structure using two stacks ''' from stack import Stack class QueueUsingTwoStacks(object): def __init__(self): ''' Initialize Queue ''' self.stack1 = Stack() self.stack2 = Stack() def __len__(self)...
1cc99c8e7c020457034d8ff1a4b85033bbe64353
tools/generator/raw-data-extractor/extract-sam.py
tools/generator/raw-data-extractor/extract-sam.py
import urllib.request import zipfile import re, io, os import shutil from pathlib import Path from multiprocessing import Pool from collections import defaultdict from distutils.version import StrictVersion packurl = "http://packs.download.atmel.com/" shutil.rmtree("../raw-device-data/sam-devices", ignore_errors=T...
Add SAM device data extractor
[dfg] Add SAM device data extractor
Python
mpl-2.0
modm-io/modm-devices
[dfg] Add SAM device data extractor
import urllib.request import zipfile import re, io, os import shutil from pathlib import Path from multiprocessing import Pool from collections import defaultdict from distutils.version import StrictVersion packurl = "http://packs.download.atmel.com/" shutil.rmtree("../raw-device-data/sam-devices", ignore_errors=T...
<commit_before><commit_msg>[dfg] Add SAM device data extractor<commit_after>
import urllib.request import zipfile import re, io, os import shutil from pathlib import Path from multiprocessing import Pool from collections import defaultdict from distutils.version import StrictVersion packurl = "http://packs.download.atmel.com/" shutil.rmtree("../raw-device-data/sam-devices", ignore_errors=T...
[dfg] Add SAM device data extractor import urllib.request import zipfile import re, io, os import shutil from pathlib import Path from multiprocessing import Pool from collections import defaultdict from distutils.version import StrictVersion packurl = "http://packs.download.atmel.com/" shutil.rmtree("../raw-device...
<commit_before><commit_msg>[dfg] Add SAM device data extractor<commit_after> import urllib.request import zipfile import re, io, os import shutil from pathlib import Path from multiprocessing import Pool from collections import defaultdict from distutils.version import StrictVersion packurl = "http://packs.download....
3b519b6ce6319797ef0544ea2567e918fa4df1b3
hangul_test.py
hangul_test.py
import hangul s = 'ㅎㅏㄴㅅㅓㅁㄱㅣ' print(hangul.conjoin(s)) s = '한섬기' print(hangul.conjoin(s)) print(ord('ㅎ')) print(ord(u'\u1112')) print(chr(12622)) print(chr(4370)) print(hex(12622)) print(hex(4370))
Add test module of hangul.
Add test module of hangul.
Python
mit
iandmyhand/python-utils
Add test module of hangul.
import hangul s = 'ㅎㅏㄴㅅㅓㅁㄱㅣ' print(hangul.conjoin(s)) s = '한섬기' print(hangul.conjoin(s)) print(ord('ㅎ')) print(ord(u'\u1112')) print(chr(12622)) print(chr(4370)) print(hex(12622)) print(hex(4370))
<commit_before><commit_msg>Add test module of hangul.<commit_after>
import hangul s = 'ㅎㅏㄴㅅㅓㅁㄱㅣ' print(hangul.conjoin(s)) s = '한섬기' print(hangul.conjoin(s)) print(ord('ㅎ')) print(ord(u'\u1112')) print(chr(12622)) print(chr(4370)) print(hex(12622)) print(hex(4370))
Add test module of hangul.import hangul s = 'ㅎㅏㄴㅅㅓㅁㄱㅣ' print(hangul.conjoin(s)) s = '한섬기' print(hangul.conjoin(s)) print(ord('ㅎ')) print(ord(u'\u1112')) print(chr(12622)) print(chr(4370)) print(hex(12622)) print(hex(4370))
<commit_before><commit_msg>Add test module of hangul.<commit_after>import hangul s = 'ㅎㅏㄴㅅㅓㅁㄱㅣ' print(hangul.conjoin(s)) s = '한섬기' print(hangul.conjoin(s)) print(ord('ㅎ')) print(ord(u'\u1112')) print(chr(12622)) print(chr(4370)) print(hex(12622)) print(hex(4370))
fe760be64eac3290a358e4a488af9946ea6f2a1d
corehq/form_processor/management/commands/run_sql.py
corehq/form_processor/management/commands/run_sql.py
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import sys import traceback import attr import gevent from django.core.management.base import BaseCommand from django.db import connections from six.moves import input from corehq.sql_db.util import ge...
Add management command to run SQL on form dbs
Add management command to run SQL on form dbs This is specifically to create an index concurrently, but could be useful in the future to run any SQL on multiple databases. [ci skip] tested locally
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Add management command to run SQL on form dbs This is specifically to create an index concurrently, but could be useful in the future to run any SQL on multiple databases. [ci skip] tested locally
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import sys import traceback import attr import gevent from django.core.management.base import BaseCommand from django.db import connections from six.moves import input from corehq.sql_db.util import ge...
<commit_before><commit_msg>Add management command to run SQL on form dbs This is specifically to create an index concurrently, but could be useful in the future to run any SQL on multiple databases. [ci skip] tested locally<commit_after>
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import sys import traceback import attr import gevent from django.core.management.base import BaseCommand from django.db import connections from six.moves import input from corehq.sql_db.util import ge...
Add management command to run SQL on form dbs This is specifically to create an index concurrently, but could be useful in the future to run any SQL on multiple databases. [ci skip] tested locallyfrom __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals impor...
<commit_before><commit_msg>Add management command to run SQL on form dbs This is specifically to create an index concurrently, but could be useful in the future to run any SQL on multiple databases. [ci skip] tested locally<commit_after>from __future__ import absolute_import from __future__ import print_function from...
1040e17e006fef93d990a6212e8be06e0a818c2f
middleware/python/test_middleware.py
middleware/python/test_middleware.py
from tyk.decorators import * @Pre def AddSomeHeader(request, session): # request['Body'] = 'tyk=python' request['SetHeaders']['SomeHeader'] = 'python2' return request, session def NotARealHandler(): pass
from tyk.decorators import * from tyk.gateway import TykGateway as tyk @Pre def AddSomeHeader(request, session): request['SetHeaders']['SomeHeader'] = 'python' tyk.store_data( "cool_key", "cool_value", 300 ) return request, session def NotARealHandler(): pass
Update middleware syntax with "TykGateway"
Update middleware syntax with "TykGateway"
Python
mpl-2.0
mvdan/tyk,nebolsin/tyk,nebolsin/tyk,lonelycode/tyk,mvdan/tyk,mvdan/tyk,lonelycode/tyk,mvdan/tyk,nebolsin/tyk,lonelycode/tyk,mvdan/tyk,mvdan/tyk,nebolsin/tyk,mvdan/tyk,nebolsin/tyk,nebolsin/tyk,mvdan/tyk,nebolsin/tyk,nebolsin/tyk
from tyk.decorators import * @Pre def AddSomeHeader(request, session): # request['Body'] = 'tyk=python' request['SetHeaders']['SomeHeader'] = 'python2' return request, session def NotARealHandler(): pass Update middleware syntax with "TykGateway"
from tyk.decorators import * from tyk.gateway import TykGateway as tyk @Pre def AddSomeHeader(request, session): request['SetHeaders']['SomeHeader'] = 'python' tyk.store_data( "cool_key", "cool_value", 300 ) return request, session def NotARealHandler(): pass
<commit_before>from tyk.decorators import * @Pre def AddSomeHeader(request, session): # request['Body'] = 'tyk=python' request['SetHeaders']['SomeHeader'] = 'python2' return request, session def NotARealHandler(): pass <commit_msg>Update middleware syntax with "TykGateway"<commit_after>
from tyk.decorators import * from tyk.gateway import TykGateway as tyk @Pre def AddSomeHeader(request, session): request['SetHeaders']['SomeHeader'] = 'python' tyk.store_data( "cool_key", "cool_value", 300 ) return request, session def NotARealHandler(): pass
from tyk.decorators import * @Pre def AddSomeHeader(request, session): # request['Body'] = 'tyk=python' request['SetHeaders']['SomeHeader'] = 'python2' return request, session def NotARealHandler(): pass Update middleware syntax with "TykGateway"from tyk.decorators import * from tyk.gateway import Tyk...
<commit_before>from tyk.decorators import * @Pre def AddSomeHeader(request, session): # request['Body'] = 'tyk=python' request['SetHeaders']['SomeHeader'] = 'python2' return request, session def NotARealHandler(): pass <commit_msg>Update middleware syntax with "TykGateway"<commit_after>from tyk.decora...
88d87f4051629c6a32e458077c543275eed0243e
setup.py
setup.py
from setuptools import setup, find_packages setup( name='jupyterhub-kubespawner', version='0.5.1', install_requires=[ 'jupyterhub', 'pyyaml', 'kubernetes==2.*', 'escapism', 'jupyter', ], setup_requires=['pytest-runner'], tests_require=['pytest'], desc...
from setuptools import setup, find_packages setup( name='jupyterhub-kubespawner', version='0.5.1', install_requires=[ 'jupyterhub', 'pyYAML', 'kubernetes==2.*', 'escapism', 'jupyter', ], setup_requires=['pytest-runner'], tests_require=['pytest'], desc...
Fix install of pyYAML on Travis
Fix install of pyYAML on Travis
Python
bsd-3-clause
yuvipanda/jupyterhub-kubernetes-spawner,jupyterhub/kubespawner,ktong/kubespawner
from setuptools import setup, find_packages setup( name='jupyterhub-kubespawner', version='0.5.1', install_requires=[ 'jupyterhub', 'pyyaml', 'kubernetes==2.*', 'escapism', 'jupyter', ], setup_requires=['pytest-runner'], tests_require=['pytest'], desc...
from setuptools import setup, find_packages setup( name='jupyterhub-kubespawner', version='0.5.1', install_requires=[ 'jupyterhub', 'pyYAML', 'kubernetes==2.*', 'escapism', 'jupyter', ], setup_requires=['pytest-runner'], tests_require=['pytest'], desc...
<commit_before>from setuptools import setup, find_packages setup( name='jupyterhub-kubespawner', version='0.5.1', install_requires=[ 'jupyterhub', 'pyyaml', 'kubernetes==2.*', 'escapism', 'jupyter', ], setup_requires=['pytest-runner'], tests_require=['pyt...
from setuptools import setup, find_packages setup( name='jupyterhub-kubespawner', version='0.5.1', install_requires=[ 'jupyterhub', 'pyYAML', 'kubernetes==2.*', 'escapism', 'jupyter', ], setup_requires=['pytest-runner'], tests_require=['pytest'], desc...
from setuptools import setup, find_packages setup( name='jupyterhub-kubespawner', version='0.5.1', install_requires=[ 'jupyterhub', 'pyyaml', 'kubernetes==2.*', 'escapism', 'jupyter', ], setup_requires=['pytest-runner'], tests_require=['pytest'], desc...
<commit_before>from setuptools import setup, find_packages setup( name='jupyterhub-kubespawner', version='0.5.1', install_requires=[ 'jupyterhub', 'pyyaml', 'kubernetes==2.*', 'escapism', 'jupyter', ], setup_requires=['pytest-runner'], tests_require=['pyt...
6534d06c450be73044d8130cfa6a534f7bff885f
iypm_domain.py
iypm_domain.py
import sys try: from troposphere import Join, Sub, Output, Export from troposphere import Parameter, Ref, Template from troposphere.route53 import HostedZone from troposphere.certificatemanager import Certificate except ImportError: sys.exit('Unable to import troposphere. ' 'Try "pip i...
Add troposphere cloudformation domain and ssl script
Add troposphere cloudformation domain and ssl script
Python
mpl-2.0
MinnSoe/ifyoupayme,MinnSoe/ifyoupayme,MinnSoe/ifyoupayme
Add troposphere cloudformation domain and ssl script
import sys try: from troposphere import Join, Sub, Output, Export from troposphere import Parameter, Ref, Template from troposphere.route53 import HostedZone from troposphere.certificatemanager import Certificate except ImportError: sys.exit('Unable to import troposphere. ' 'Try "pip i...
<commit_before><commit_msg>Add troposphere cloudformation domain and ssl script<commit_after>
import sys try: from troposphere import Join, Sub, Output, Export from troposphere import Parameter, Ref, Template from troposphere.route53 import HostedZone from troposphere.certificatemanager import Certificate except ImportError: sys.exit('Unable to import troposphere. ' 'Try "pip i...
Add troposphere cloudformation domain and ssl scriptimport sys try: from troposphere import Join, Sub, Output, Export from troposphere import Parameter, Ref, Template from troposphere.route53 import HostedZone from troposphere.certificatemanager import Certificate except ImportError: sys.exit('Unab...
<commit_before><commit_msg>Add troposphere cloudformation domain and ssl script<commit_after>import sys try: from troposphere import Join, Sub, Output, Export from troposphere import Parameter, Ref, Template from troposphere.route53 import HostedZone from troposphere.certificatemanager import Certifica...
9f48522c385c81200f04a027e0299ddf7c81ef84
runtime_stats/combine_graphs.py
runtime_stats/combine_graphs.py
#!/usr/bin/env python2.7 # # Copyright 2011-2013 Colin Scott # # 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 applica...
Add a script for combining graphs
Add a script for combining graphs
Python
apache-2.0
jmiserez/sts,ucb-sts/sts,ucb-sts/sts,jmiserez/sts
Add a script for combining graphs
#!/usr/bin/env python2.7 # # Copyright 2011-2013 Colin Scott # # 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 applica...
<commit_before><commit_msg>Add a script for combining graphs<commit_after>
#!/usr/bin/env python2.7 # # Copyright 2011-2013 Colin Scott # # 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 applica...
Add a script for combining graphs#!/usr/bin/env python2.7 # # Copyright 2011-2013 Colin Scott # # 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 a script for combining graphs<commit_after>#!/usr/bin/env python2.7 # # Copyright 2011-2013 Colin Scott # # 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: # # ...
c689a03dcc84315ff5c3796615a80146f8e74d1f
scripts/get_bank_registry_lv.py
scripts/get_bank_registry_lv.py
#!/usr/bin/env python import json import xlrd import requests URL = "https://www.bank.lv/images/stories/pielikumi/makssist/bic_saraksts_22.01.2020_eng.xls" def process(): registry = [] book = xlrd.open_workbook(file_contents=requests.get(URL).content) sheet = book.sheet_by_index(0) for row in list(...
Add generate Latvia bank registry script
Add generate Latvia bank registry script
Python
mit
figo-connect/schwifty
Add generate Latvia bank registry script
#!/usr/bin/env python import json import xlrd import requests URL = "https://www.bank.lv/images/stories/pielikumi/makssist/bic_saraksts_22.01.2020_eng.xls" def process(): registry = [] book = xlrd.open_workbook(file_contents=requests.get(URL).content) sheet = book.sheet_by_index(0) for row in list(...
<commit_before><commit_msg>Add generate Latvia bank registry script<commit_after>
#!/usr/bin/env python import json import xlrd import requests URL = "https://www.bank.lv/images/stories/pielikumi/makssist/bic_saraksts_22.01.2020_eng.xls" def process(): registry = [] book = xlrd.open_workbook(file_contents=requests.get(URL).content) sheet = book.sheet_by_index(0) for row in list(...
Add generate Latvia bank registry script#!/usr/bin/env python import json import xlrd import requests URL = "https://www.bank.lv/images/stories/pielikumi/makssist/bic_saraksts_22.01.2020_eng.xls" def process(): registry = [] book = xlrd.open_workbook(file_contents=requests.get(URL).content) sheet = book...
<commit_before><commit_msg>Add generate Latvia bank registry script<commit_after>#!/usr/bin/env python import json import xlrd import requests URL = "https://www.bank.lv/images/stories/pielikumi/makssist/bic_saraksts_22.01.2020_eng.xls" def process(): registry = [] book = xlrd.open_workbook(file_contents=re...
90fc1ce356ca1bc367f6a5234d2267600a0a789a
contrib/create_smimea.py
contrib/create_smimea.py
#!/usr/bin/env python import os import sys import base64 as b64 import argparse def smimea(usage, der): cert = [] c = 0 with open(der, "rb") as f: while True: l = f.read(1024) if l == "": break c += len(l) cert.append(l) data = b64.b16encode("...
Add little helper script to create DNS records
Add little helper script to create DNS records
Python
agpl-3.0
sys4/smilla
Add little helper script to create DNS records
#!/usr/bin/env python import os import sys import base64 as b64 import argparse def smimea(usage, der): cert = [] c = 0 with open(der, "rb") as f: while True: l = f.read(1024) if l == "": break c += len(l) cert.append(l) data = b64.b16encode("...
<commit_before><commit_msg>Add little helper script to create DNS records<commit_after>
#!/usr/bin/env python import os import sys import base64 as b64 import argparse def smimea(usage, der): cert = [] c = 0 with open(der, "rb") as f: while True: l = f.read(1024) if l == "": break c += len(l) cert.append(l) data = b64.b16encode("...
Add little helper script to create DNS records#!/usr/bin/env python import os import sys import base64 as b64 import argparse def smimea(usage, der): cert = [] c = 0 with open(der, "rb") as f: while True: l = f.read(1024) if l == "": break c += len(l) ...
<commit_before><commit_msg>Add little helper script to create DNS records<commit_after>#!/usr/bin/env python import os import sys import base64 as b64 import argparse def smimea(usage, der): cert = [] c = 0 with open(der, "rb") as f: while True: l = f.read(1024) if l == ""...
1f80b634596bfaa8c4b538a5e8011399bcad6253
test/selenium/src/lib/element/widget_info.py
test/selenium/src/lib/element/widget_info.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] from lib import base from lib.constants import locator from lib.page import ...
Add missing widget info element
Add missing widget info element
Python
apache-2.0
josthkko/ggrc-core,kr41/ggrc-core,NejcZupec/ggrc-core,VinnieJohns/ggrc-core,josthkko/ggrc-core,andrei-karalionak/ggrc-core,NejcZupec/ggrc-core,plamut/ggrc-core,NejcZupec/ggrc-core,VinnieJohns/ggrc-core,j0gurt/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,jmakov/ggrc-core,VinnieJohns/ggrc-core,NejcZupec/ggr...
Add missing widget info element
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] from lib import base from lib.constants import locator from lib.page import ...
<commit_before><commit_msg>Add missing widget info element<commit_after>
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] from lib import base from lib.constants import locator from lib.page import ...
Add missing widget info element# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] from lib import base from lib.constants impor...
<commit_before><commit_msg>Add missing widget info element<commit_after># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] from...