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
a27d3f76f194a9767022e37c83d5d18861552cfd
all-domains/tutorials/cracking-the-coding-interview/linked-lists-detect-a-cycle/solution.py
all-domains/tutorials/cracking-the-coding-interview/linked-lists-detect-a-cycle/solution.py
# https://www.hackerrank.com/challenges/ctci-linked-list-cycle # Python 3 """ Detect a cycle in a linked list. Note that the head pointer may be 'None' if the list is empty. A Node is defined as: class Node(object): def __init__(self, data = None, next_node = None): self.data = data ...
# https://www.hackerrank.com/challenges/ctci-linked-list-cycle # Python 3 """ Detect a cycle in a linked list. Note that the head pointer may be 'None' if the list is empty. A Node is defined as: class Node(object): def __init__(self, data = None, next_node = None): self.data = data ...
Solve problem to detect linked list cycle
Solve problem to detect linked list cycle https://www.hackerrank.com/challenges/ctci-linked-list-cycle
Python
mit
arvinsim/hackerrank-solutions
# https://www.hackerrank.com/challenges/ctci-linked-list-cycle # Python 3 """ Detect a cycle in a linked list. Note that the head pointer may be 'None' if the list is empty. A Node is defined as: class Node(object): def __init__(self, data = None, next_node = None): self.data = data ...
# https://www.hackerrank.com/challenges/ctci-linked-list-cycle # Python 3 """ Detect a cycle in a linked list. Note that the head pointer may be 'None' if the list is empty. A Node is defined as: class Node(object): def __init__(self, data = None, next_node = None): self.data = data ...
<commit_before># https://www.hackerrank.com/challenges/ctci-linked-list-cycle # Python 3 """ Detect a cycle in a linked list. Note that the head pointer may be 'None' if the list is empty. A Node is defined as: class Node(object): def __init__(self, data = None, next_node = None): self.data...
# https://www.hackerrank.com/challenges/ctci-linked-list-cycle # Python 3 """ Detect a cycle in a linked list. Note that the head pointer may be 'None' if the list is empty. A Node is defined as: class Node(object): def __init__(self, data = None, next_node = None): self.data = data ...
# https://www.hackerrank.com/challenges/ctci-linked-list-cycle # Python 3 """ Detect a cycle in a linked list. Note that the head pointer may be 'None' if the list is empty. A Node is defined as: class Node(object): def __init__(self, data = None, next_node = None): self.data = data ...
<commit_before># https://www.hackerrank.com/challenges/ctci-linked-list-cycle # Python 3 """ Detect a cycle in a linked list. Note that the head pointer may be 'None' if the list is empty. A Node is defined as: class Node(object): def __init__(self, data = None, next_node = None): self.data...
0be3b5bf33a3e0254297eda664c85fd249bce2fe
amostra/tests/test_jsonschema.py
amostra/tests/test_jsonschema.py
import hypothesis_jsonschema from hypothesis import HealthCheck, given, settings from hypothesis import strategies as st from amostra.utils import load_schema sample_dict = load_schema("sample.json") # Pop uuid and revision cause they are created automatically sample_dict['properties'].pop('uuid') sample_dict['proper...
from operator import itemgetter import hypothesis_jsonschema from hypothesis import HealthCheck, given, settings from hypothesis import strategies as st from amostra.utils import load_schema sample_dict = load_schema("sample.json") # Pop uuid and revision cause they are created automatically sample_dict['properties'...
Use itemgetter instead of lambda
TST: Use itemgetter instead of lambda
Python
bsd-3-clause
NSLS-II/amostra
import hypothesis_jsonschema from hypothesis import HealthCheck, given, settings from hypothesis import strategies as st from amostra.utils import load_schema sample_dict = load_schema("sample.json") # Pop uuid and revision cause they are created automatically sample_dict['properties'].pop('uuid') sample_dict['proper...
from operator import itemgetter import hypothesis_jsonschema from hypothesis import HealthCheck, given, settings from hypothesis import strategies as st from amostra.utils import load_schema sample_dict = load_schema("sample.json") # Pop uuid and revision cause they are created automatically sample_dict['properties'...
<commit_before>import hypothesis_jsonschema from hypothesis import HealthCheck, given, settings from hypothesis import strategies as st from amostra.utils import load_schema sample_dict = load_schema("sample.json") # Pop uuid and revision cause they are created automatically sample_dict['properties'].pop('uuid') samp...
from operator import itemgetter import hypothesis_jsonschema from hypothesis import HealthCheck, given, settings from hypothesis import strategies as st from amostra.utils import load_schema sample_dict = load_schema("sample.json") # Pop uuid and revision cause they are created automatically sample_dict['properties'...
import hypothesis_jsonschema from hypothesis import HealthCheck, given, settings from hypothesis import strategies as st from amostra.utils import load_schema sample_dict = load_schema("sample.json") # Pop uuid and revision cause they are created automatically sample_dict['properties'].pop('uuid') sample_dict['proper...
<commit_before>import hypothesis_jsonschema from hypothesis import HealthCheck, given, settings from hypothesis import strategies as st from amostra.utils import load_schema sample_dict = load_schema("sample.json") # Pop uuid and revision cause they are created automatically sample_dict['properties'].pop('uuid') samp...
d0ac312de9b48a78f92f9eb09e048131578483f5
giles/utils.py
giles/utils.py
# Giles: utils.py # Copyright 2012 Phil Bordelon # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progra...
# Giles: utils.py # Copyright 2012 Phil Bordelon # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progra...
Add my classic Struct "class."
Add my classic Struct "class." That's right, I embrace the lazy.
Python
agpl-3.0
sunfall/giles
# Giles: utils.py # Copyright 2012 Phil Bordelon # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progra...
# Giles: utils.py # Copyright 2012 Phil Bordelon # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progra...
<commit_before># Giles: utils.py # Copyright 2012 Phil Bordelon # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version....
# Giles: utils.py # Copyright 2012 Phil Bordelon # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progra...
# Giles: utils.py # Copyright 2012 Phil Bordelon # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progra...
<commit_before># Giles: utils.py # Copyright 2012 Phil Bordelon # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version....
b26ce5b5ff778208314bfd21014f88ee24917d7a
ideas/views.py
ideas/views.py
from .models import Idea from .serializers import IdeaSerializer from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response @api_view(['GET',]) def idea_list(request): if request.method == 'GET': ideas = Idea.objects.all() serialize...
from .models import Idea from .serializers import IdeaSerializer from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response @api_view(['GET',]) def idea_list(request): if request.method == 'GET': ideas = Idea.objects.all() serialize...
Add GET for idea and refactor vote
Add GET for idea and refactor vote
Python
mit
neosergio/vote_hackatrix_backend
from .models import Idea from .serializers import IdeaSerializer from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response @api_view(['GET',]) def idea_list(request): if request.method == 'GET': ideas = Idea.objects.all() serialize...
from .models import Idea from .serializers import IdeaSerializer from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response @api_view(['GET',]) def idea_list(request): if request.method == 'GET': ideas = Idea.objects.all() serialize...
<commit_before>from .models import Idea from .serializers import IdeaSerializer from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response @api_view(['GET',]) def idea_list(request): if request.method == 'GET': ideas = Idea.objects.all() ...
from .models import Idea from .serializers import IdeaSerializer from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response @api_view(['GET',]) def idea_list(request): if request.method == 'GET': ideas = Idea.objects.all() serialize...
from .models import Idea from .serializers import IdeaSerializer from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response @api_view(['GET',]) def idea_list(request): if request.method == 'GET': ideas = Idea.objects.all() serialize...
<commit_before>from .models import Idea from .serializers import IdeaSerializer from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response @api_view(['GET',]) def idea_list(request): if request.method == 'GET': ideas = Idea.objects.all() ...
6464c3ed7481e347dc6ca93ccfcad6964456e769
manage.py
manage.py
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "capomastro.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
#!/usr/bin/env python import os import sys # This bootstraps the virtualenv so that the system Python can use it app_root = os.path.dirname(os.path.realpath(__file__)) activate_this = os.path.join(app_root, 'bin', 'activate_this.py') execfile(activate_this, dict(__file__=activate_this)) if __name__ == "__main__": ...
Add temporary bootstrapping to get the service working with how the charm presently expects to run the app.
Add temporary bootstrapping to get the service working with how the charm presently expects to run the app.
Python
mit
timrchavez/capomastro,timrchavez/capomastro
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "capomastro.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) Add temporary bootstrapping to get the service working with how the...
#!/usr/bin/env python import os import sys # This bootstraps the virtualenv so that the system Python can use it app_root = os.path.dirname(os.path.realpath(__file__)) activate_this = os.path.join(app_root, 'bin', 'activate_this.py') execfile(activate_this, dict(__file__=activate_this)) if __name__ == "__main__": ...
<commit_before>#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "capomastro.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) <commit_msg>Add temporary bootstrapping to get the s...
#!/usr/bin/env python import os import sys # This bootstraps the virtualenv so that the system Python can use it app_root = os.path.dirname(os.path.realpath(__file__)) activate_this = os.path.join(app_root, 'bin', 'activate_this.py') execfile(activate_this, dict(__file__=activate_this)) if __name__ == "__main__": ...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "capomastro.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) Add temporary bootstrapping to get the service working with how the...
<commit_before>#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "capomastro.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) <commit_msg>Add temporary bootstrapping to get the s...
8318bae21bd5cb716a4cbf2cd2dfe46ea8cadbcf
manage.py
manage.py
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'base.settings') os.environ.setdefault('DJANGO_CONFIGURATION', 'Development') import dotenv dotenv.read_dotenv('.env') from configurations.management import execute_from_command_...
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'base.settings') os.environ.setdefault('DJANGO_CONFIGURATION', 'Development') if os.environ['DJANGO_CONFIGURATION'] == 'Development': import dotenv dotenv.read_dotenv('.en...
Hide .env behind a development environment.
Hide .env behind a development environment.
Python
apache-2.0
hello-base/web,hello-base/web,hello-base/web,hello-base/web
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'base.settings') os.environ.setdefault('DJANGO_CONFIGURATION', 'Development') import dotenv dotenv.read_dotenv('.env') from configurations.management import execute_from_command_...
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'base.settings') os.environ.setdefault('DJANGO_CONFIGURATION', 'Development') if os.environ['DJANGO_CONFIGURATION'] == 'Development': import dotenv dotenv.read_dotenv('.en...
<commit_before>#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'base.settings') os.environ.setdefault('DJANGO_CONFIGURATION', 'Development') import dotenv dotenv.read_dotenv('.env') from configurations.management import execut...
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'base.settings') os.environ.setdefault('DJANGO_CONFIGURATION', 'Development') if os.environ['DJANGO_CONFIGURATION'] == 'Development': import dotenv dotenv.read_dotenv('.en...
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'base.settings') os.environ.setdefault('DJANGO_CONFIGURATION', 'Development') import dotenv dotenv.read_dotenv('.env') from configurations.management import execute_from_command_...
<commit_before>#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'base.settings') os.environ.setdefault('DJANGO_CONFIGURATION', 'Development') import dotenv dotenv.read_dotenv('.env') from configurations.management import execut...
e9c7b17ccd9709eb90f38bec9d59c48dc6f793b2
calico_containers/tests/st/utils.py
calico_containers/tests/st/utils.py
import sh from sh import docker def get_ip(): """Return a string of the IP of the hosts eth0 interface.""" intf = sh.ifconfig.eth0() return sh.perl(intf, "-ne", 's/dr:(\S+)/print $1/e') def cleanup_inside(name): """ Clean the inside of a container by deleting the containers and images within it....
import sh from sh import docker import socket def get_ip(): """Return a string of the IP of the hosts eth0 interface.""" s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(("8.8.8.8", 80)) ip = s.getsockname()[0] s.close() return ip def cleanup_inside(name): """ Clean the...
Use socket connection to get own IP.
Use socket connection to get own IP. Former-commit-id: ebec31105582235c8aa74e9bbfd608b9bf103ad1
Python
apache-2.0
robbrockbank/libcalico,tomdee/libnetwork-plugin,TrimBiggs/libcalico,plwhite/libcalico,tomdee/libcalico,projectcalico/libnetwork-plugin,L-MA/libcalico,projectcalico/libcalico,djosborne/libcalico,Symmetric/libcalico,TrimBiggs/libnetwork-plugin,alexhersh/libcalico,insequent/libcalico,caseydavenport/libcalico,TrimBiggs/lib...
import sh from sh import docker def get_ip(): """Return a string of the IP of the hosts eth0 interface.""" intf = sh.ifconfig.eth0() return sh.perl(intf, "-ne", 's/dr:(\S+)/print $1/e') def cleanup_inside(name): """ Clean the inside of a container by deleting the containers and images within it....
import sh from sh import docker import socket def get_ip(): """Return a string of the IP of the hosts eth0 interface.""" s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(("8.8.8.8", 80)) ip = s.getsockname()[0] s.close() return ip def cleanup_inside(name): """ Clean the...
<commit_before>import sh from sh import docker def get_ip(): """Return a string of the IP of the hosts eth0 interface.""" intf = sh.ifconfig.eth0() return sh.perl(intf, "-ne", 's/dr:(\S+)/print $1/e') def cleanup_inside(name): """ Clean the inside of a container by deleting the containers and im...
import sh from sh import docker import socket def get_ip(): """Return a string of the IP of the hosts eth0 interface.""" s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(("8.8.8.8", 80)) ip = s.getsockname()[0] s.close() return ip def cleanup_inside(name): """ Clean the...
import sh from sh import docker def get_ip(): """Return a string of the IP of the hosts eth0 interface.""" intf = sh.ifconfig.eth0() return sh.perl(intf, "-ne", 's/dr:(\S+)/print $1/e') def cleanup_inside(name): """ Clean the inside of a container by deleting the containers and images within it....
<commit_before>import sh from sh import docker def get_ip(): """Return a string of the IP of the hosts eth0 interface.""" intf = sh.ifconfig.eth0() return sh.perl(intf, "-ne", 's/dr:(\S+)/print $1/e') def cleanup_inside(name): """ Clean the inside of a container by deleting the containers and im...
4a827bfff24758677e9c1d9d3b186fc14f23e0bb
lib/oeqa/runtime/cases/parselogs_rpi.py
lib/oeqa/runtime/cases/parselogs_rpi.py
from oeqa.runtime.cases.parselogs import * rpi_errors = [ 'bcmgenet fd580000.genet: failed to get enet-eee clock', 'bcmgenet fd580000.genet: failed to get enet-wol clock', 'bcmgenet fd580000.genet: failed to get enet clock', 'bcmgenet fd580000.ethernet: failed to get enet-eee clock', 'bcmgenet fd58...
from oeqa.runtime.cases.parselogs import * rpi_errors = [ ] ignore_errors['raspberrypi4'] = rpi_errors + common_errors ignore_errors['raspberrypi4-64'] = rpi_errors + common_errors ignore_errors['raspberrypi3'] = rpi_errors + common_errors ignore_errors['raspberrypi3-64'] = rpi_errors + common_errors class ParseLogs...
Update the error regexps to 5.10 kernel
parselogs: Update the error regexps to 5.10 kernel The old messages are no longer necessary Signed-off-by: Khem Raj <729d64b6f67515e258459a5f6d20ec88b2caf8df@gmail.com>
Python
mit
agherzan/meta-raspberrypi,agherzan/meta-raspberrypi,agherzan/meta-raspberrypi,agherzan/meta-raspberrypi,agherzan/meta-raspberrypi,agherzan/meta-raspberrypi
from oeqa.runtime.cases.parselogs import * rpi_errors = [ 'bcmgenet fd580000.genet: failed to get enet-eee clock', 'bcmgenet fd580000.genet: failed to get enet-wol clock', 'bcmgenet fd580000.genet: failed to get enet clock', 'bcmgenet fd580000.ethernet: failed to get enet-eee clock', 'bcmgenet fd58...
from oeqa.runtime.cases.parselogs import * rpi_errors = [ ] ignore_errors['raspberrypi4'] = rpi_errors + common_errors ignore_errors['raspberrypi4-64'] = rpi_errors + common_errors ignore_errors['raspberrypi3'] = rpi_errors + common_errors ignore_errors['raspberrypi3-64'] = rpi_errors + common_errors class ParseLogs...
<commit_before>from oeqa.runtime.cases.parselogs import * rpi_errors = [ 'bcmgenet fd580000.genet: failed to get enet-eee clock', 'bcmgenet fd580000.genet: failed to get enet-wol clock', 'bcmgenet fd580000.genet: failed to get enet clock', 'bcmgenet fd580000.ethernet: failed to get enet-eee clock', ...
from oeqa.runtime.cases.parselogs import * rpi_errors = [ ] ignore_errors['raspberrypi4'] = rpi_errors + common_errors ignore_errors['raspberrypi4-64'] = rpi_errors + common_errors ignore_errors['raspberrypi3'] = rpi_errors + common_errors ignore_errors['raspberrypi3-64'] = rpi_errors + common_errors class ParseLogs...
from oeqa.runtime.cases.parselogs import * rpi_errors = [ 'bcmgenet fd580000.genet: failed to get enet-eee clock', 'bcmgenet fd580000.genet: failed to get enet-wol clock', 'bcmgenet fd580000.genet: failed to get enet clock', 'bcmgenet fd580000.ethernet: failed to get enet-eee clock', 'bcmgenet fd58...
<commit_before>from oeqa.runtime.cases.parselogs import * rpi_errors = [ 'bcmgenet fd580000.genet: failed to get enet-eee clock', 'bcmgenet fd580000.genet: failed to get enet-wol clock', 'bcmgenet fd580000.genet: failed to get enet clock', 'bcmgenet fd580000.ethernet: failed to get enet-eee clock', ...
b1781b8c82979ee3765197084a9c8e372cb68cf8
jazzband/hooks.py
jazzband/hooks.py
import json import uuid from flask_hookserver import Hooks from .db import redis from .members.models import User from .projects.tasks import update_project_by_hook from .tasks import spinach hooks = Hooks() @hooks.hook("ping") def ping(data, guid): return "pong" @hooks.hook("membership") def membership(dat...
import json import uuid from flask_hookserver import Hooks from .db import redis from .members.models import User from .projects.tasks import update_project_by_hook from .tasks import spinach hooks = Hooks() @hooks.hook("ping") def ping(data, guid): return "pong" @hooks.hook("membership") def membership(dat...
Use new (?) repository transferred hook.
Use new (?) repository transferred hook.
Python
mit
jazzband/jazzband-site,jazzband/website,jazzband/website,jazzband/website,jazzband/website,jazzband/site,jazzband/jazzband-site,jazzband/site
import json import uuid from flask_hookserver import Hooks from .db import redis from .members.models import User from .projects.tasks import update_project_by_hook from .tasks import spinach hooks = Hooks() @hooks.hook("ping") def ping(data, guid): return "pong" @hooks.hook("membership") def membership(dat...
import json import uuid from flask_hookserver import Hooks from .db import redis from .members.models import User from .projects.tasks import update_project_by_hook from .tasks import spinach hooks = Hooks() @hooks.hook("ping") def ping(data, guid): return "pong" @hooks.hook("membership") def membership(dat...
<commit_before>import json import uuid from flask_hookserver import Hooks from .db import redis from .members.models import User from .projects.tasks import update_project_by_hook from .tasks import spinach hooks = Hooks() @hooks.hook("ping") def ping(data, guid): return "pong" @hooks.hook("membership") def...
import json import uuid from flask_hookserver import Hooks from .db import redis from .members.models import User from .projects.tasks import update_project_by_hook from .tasks import spinach hooks = Hooks() @hooks.hook("ping") def ping(data, guid): return "pong" @hooks.hook("membership") def membership(dat...
import json import uuid from flask_hookserver import Hooks from .db import redis from .members.models import User from .projects.tasks import update_project_by_hook from .tasks import spinach hooks = Hooks() @hooks.hook("ping") def ping(data, guid): return "pong" @hooks.hook("membership") def membership(dat...
<commit_before>import json import uuid from flask_hookserver import Hooks from .db import redis from .members.models import User from .projects.tasks import update_project_by_hook from .tasks import spinach hooks = Hooks() @hooks.hook("ping") def ping(data, guid): return "pong" @hooks.hook("membership") def...
6e6c60613180bb3d7e2d019129e57d1a2c33286d
backend/backend/models.py
backend/backend/models.py
from django.db import models class Animal(models.Model): MALE = 'male' FEMALE = 'female' GENDER_CHOICES = ((MALE, 'Male'), (FEMALE, 'Female')) father = models.ForeignKey("self", null = True, on_delete = models.SET_NULL, related_name = "child_father") mother = models.ForeignKey("self", null = True...
from django.db import models from django.core.validators import MaxValueValidator, MaxLengthValidator from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from datetime import datetime def current_year(): return datetime.now().year class Animal(models.Model): ...
Add length validator to name. Add dob validator can't be higher than current year.
Add length validator to name. Add dob validator can't be higher than current year.
Python
apache-2.0
mmlado/animal_pairing,mmlado/animal_pairing
from django.db import models class Animal(models.Model): MALE = 'male' FEMALE = 'female' GENDER_CHOICES = ((MALE, 'Male'), (FEMALE, 'Female')) father = models.ForeignKey("self", null = True, on_delete = models.SET_NULL, related_name = "child_father") mother = models.ForeignKey("self", null = True...
from django.db import models from django.core.validators import MaxValueValidator, MaxLengthValidator from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from datetime import datetime def current_year(): return datetime.now().year class Animal(models.Model): ...
<commit_before>from django.db import models class Animal(models.Model): MALE = 'male' FEMALE = 'female' GENDER_CHOICES = ((MALE, 'Male'), (FEMALE, 'Female')) father = models.ForeignKey("self", null = True, on_delete = models.SET_NULL, related_name = "child_father") mother = models.ForeignKey("sel...
from django.db import models from django.core.validators import MaxValueValidator, MaxLengthValidator from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from datetime import datetime def current_year(): return datetime.now().year class Animal(models.Model): ...
from django.db import models class Animal(models.Model): MALE = 'male' FEMALE = 'female' GENDER_CHOICES = ((MALE, 'Male'), (FEMALE, 'Female')) father = models.ForeignKey("self", null = True, on_delete = models.SET_NULL, related_name = "child_father") mother = models.ForeignKey("self", null = True...
<commit_before>from django.db import models class Animal(models.Model): MALE = 'male' FEMALE = 'female' GENDER_CHOICES = ((MALE, 'Male'), (FEMALE, 'Female')) father = models.ForeignKey("self", null = True, on_delete = models.SET_NULL, related_name = "child_father") mother = models.ForeignKey("sel...
a1897464b7974589723790f946fed0c1a5bdb475
chef/fabric.py
chef/fabric.py
from chef import Search from chef.api import ChefAPI, autoconfigure from chef.exceptions import ChefError class Roledef(object): def __init__(self, name, api, hostname_attr): self.name = name self.api = api self.hostname_attr = hostname_attr def __call__(self): for row in Searc...
from chef import Search from chef.api import ChefAPI, autoconfigure from chef.exceptions import ChefError class Roledef(object): def __init__(self, name, api, hostname_attr): self.name = name self.api = api self.hostname_attr = hostname_attr def __call__(self): for row in Searc...
Work around when fqdn is not defined for a node.
Work around when fqdn is not defined for a node.
Python
apache-2.0
Scalr/pychef,jarosser06/pychef,cread/pychef,coderanger/pychef,Scalr/pychef,jarosser06/pychef,dipakvwarade/pychef,dipakvwarade/pychef,coderanger/pychef,cread/pychef
from chef import Search from chef.api import ChefAPI, autoconfigure from chef.exceptions import ChefError class Roledef(object): def __init__(self, name, api, hostname_attr): self.name = name self.api = api self.hostname_attr = hostname_attr def __call__(self): for row in Searc...
from chef import Search from chef.api import ChefAPI, autoconfigure from chef.exceptions import ChefError class Roledef(object): def __init__(self, name, api, hostname_attr): self.name = name self.api = api self.hostname_attr = hostname_attr def __call__(self): for row in Searc...
<commit_before>from chef import Search from chef.api import ChefAPI, autoconfigure from chef.exceptions import ChefError class Roledef(object): def __init__(self, name, api, hostname_attr): self.name = name self.api = api self.hostname_attr = hostname_attr def __call__(self): f...
from chef import Search from chef.api import ChefAPI, autoconfigure from chef.exceptions import ChefError class Roledef(object): def __init__(self, name, api, hostname_attr): self.name = name self.api = api self.hostname_attr = hostname_attr def __call__(self): for row in Searc...
from chef import Search from chef.api import ChefAPI, autoconfigure from chef.exceptions import ChefError class Roledef(object): def __init__(self, name, api, hostname_attr): self.name = name self.api = api self.hostname_attr = hostname_attr def __call__(self): for row in Searc...
<commit_before>from chef import Search from chef.api import ChefAPI, autoconfigure from chef.exceptions import ChefError class Roledef(object): def __init__(self, name, api, hostname_attr): self.name = name self.api = api self.hostname_attr = hostname_attr def __call__(self): f...
1ce39741886cdce69e3801a1d0afb25c39a8b844
fitbit/models.py
fitbit/models.py
from django.contrib.auth.models import User from django.db import models class Token(models.Model): fitbit_id = models.CharField(max_length=50) refresh_token = models.CharField(max_length=120)
from django.contrib.auth.models import User from django.db import models class Token(models.Model): fitbit_id = models.CharField(max_length=50) refresh_token = models.CharField(max_length=120) def __repr__(self): return '<Token %s>' % self.fitbit_id def __str__(self): return self.fit...
Add repr and str to our token model
Add repr and str to our token model
Python
apache-2.0
Bachmann1234/fitbitSlackBot,Bachmann1234/fitbitSlackBot
from django.contrib.auth.models import User from django.db import models class Token(models.Model): fitbit_id = models.CharField(max_length=50) refresh_token = models.CharField(max_length=120) Add repr and str to our token model
from django.contrib.auth.models import User from django.db import models class Token(models.Model): fitbit_id = models.CharField(max_length=50) refresh_token = models.CharField(max_length=120) def __repr__(self): return '<Token %s>' % self.fitbit_id def __str__(self): return self.fit...
<commit_before>from django.contrib.auth.models import User from django.db import models class Token(models.Model): fitbit_id = models.CharField(max_length=50) refresh_token = models.CharField(max_length=120) <commit_msg>Add repr and str to our token model<commit_after>
from django.contrib.auth.models import User from django.db import models class Token(models.Model): fitbit_id = models.CharField(max_length=50) refresh_token = models.CharField(max_length=120) def __repr__(self): return '<Token %s>' % self.fitbit_id def __str__(self): return self.fit...
from django.contrib.auth.models import User from django.db import models class Token(models.Model): fitbit_id = models.CharField(max_length=50) refresh_token = models.CharField(max_length=120) Add repr and str to our token modelfrom django.contrib.auth.models import User from django.db import models class T...
<commit_before>from django.contrib.auth.models import User from django.db import models class Token(models.Model): fitbit_id = models.CharField(max_length=50) refresh_token = models.CharField(max_length=120) <commit_msg>Add repr and str to our token model<commit_after>from django.contrib.auth.models import Us...
9c3514c83404e12b51c6f78cd4472eb1b7bd9fd0
pysagec/client.py
pysagec/client.py
from urllib.request import Request, urlopen from .renderers import XMLRenderer class Client: def __init__(self, hostname, auth_info): self.base_url = 'http://{}/MRWEnvio.asmx'.format(hostname) self.auth_info = auth_info self.renderer = XMLRenderer() def make_http_request(self, pickup...
from urllib.request import Request, urlopen from .renderers import XMLRenderer class Client: def __init__(self, hostname, auth_info): self.base_url = 'http://{}/MRWEnvio.asmx'.format(hostname) self.auth_info = auth_info self.renderer = XMLRenderer() def make_http_request(self, pickup...
Use a list for main elements
Use a list for main elements
Python
mit
migonzalvar/pysagec
from urllib.request import Request, urlopen from .renderers import XMLRenderer class Client: def __init__(self, hostname, auth_info): self.base_url = 'http://{}/MRWEnvio.asmx'.format(hostname) self.auth_info = auth_info self.renderer = XMLRenderer() def make_http_request(self, pickup...
from urllib.request import Request, urlopen from .renderers import XMLRenderer class Client: def __init__(self, hostname, auth_info): self.base_url = 'http://{}/MRWEnvio.asmx'.format(hostname) self.auth_info = auth_info self.renderer = XMLRenderer() def make_http_request(self, pickup...
<commit_before>from urllib.request import Request, urlopen from .renderers import XMLRenderer class Client: def __init__(self, hostname, auth_info): self.base_url = 'http://{}/MRWEnvio.asmx'.format(hostname) self.auth_info = auth_info self.renderer = XMLRenderer() def make_http_reque...
from urllib.request import Request, urlopen from .renderers import XMLRenderer class Client: def __init__(self, hostname, auth_info): self.base_url = 'http://{}/MRWEnvio.asmx'.format(hostname) self.auth_info = auth_info self.renderer = XMLRenderer() def make_http_request(self, pickup...
from urllib.request import Request, urlopen from .renderers import XMLRenderer class Client: def __init__(self, hostname, auth_info): self.base_url = 'http://{}/MRWEnvio.asmx'.format(hostname) self.auth_info = auth_info self.renderer = XMLRenderer() def make_http_request(self, pickup...
<commit_before>from urllib.request import Request, urlopen from .renderers import XMLRenderer class Client: def __init__(self, hostname, auth_info): self.base_url = 'http://{}/MRWEnvio.asmx'.format(hostname) self.auth_info = auth_info self.renderer = XMLRenderer() def make_http_reque...
0420ed666f8a2cd5cd6c2055b13a5d26cc5d3792
output.py
output.py
def summarizeECG(instHR, avgHR, brady, tachy): """Create txt file summarizing ECG analysis :param instHR: (int) :param avgHR: (int) :param brady: (int) :param tachy: (int) """ #Calls hrdetector() to get instantaneous heart rate #instHR = findInstHR() #Calls findAvgHR() to get averag...
def summarizeECG(instHR, avgHR, brady, tachy): """Create txt file summarizing ECG analysis :param instHR: (int) :param avgHR: (int) :param brady: (int) :param tachy: (int) """ #Calls hrdetector() to get instantaneous heart rate #instHR = findInstHR() #Calls findAvgHR() to get averag...
Add units to brady and tachy strings.
Add units to brady and tachy strings.
Python
mit
raspearsy/bme590hrm
def summarizeECG(instHR, avgHR, brady, tachy): """Create txt file summarizing ECG analysis :param instHR: (int) :param avgHR: (int) :param brady: (int) :param tachy: (int) """ #Calls hrdetector() to get instantaneous heart rate #instHR = findInstHR() #Calls findAvgHR() to get averag...
def summarizeECG(instHR, avgHR, brady, tachy): """Create txt file summarizing ECG analysis :param instHR: (int) :param avgHR: (int) :param brady: (int) :param tachy: (int) """ #Calls hrdetector() to get instantaneous heart rate #instHR = findInstHR() #Calls findAvgHR() to get averag...
<commit_before>def summarizeECG(instHR, avgHR, brady, tachy): """Create txt file summarizing ECG analysis :param instHR: (int) :param avgHR: (int) :param brady: (int) :param tachy: (int) """ #Calls hrdetector() to get instantaneous heart rate #instHR = findInstHR() #Calls findAvgHR(...
def summarizeECG(instHR, avgHR, brady, tachy): """Create txt file summarizing ECG analysis :param instHR: (int) :param avgHR: (int) :param brady: (int) :param tachy: (int) """ #Calls hrdetector() to get instantaneous heart rate #instHR = findInstHR() #Calls findAvgHR() to get averag...
def summarizeECG(instHR, avgHR, brady, tachy): """Create txt file summarizing ECG analysis :param instHR: (int) :param avgHR: (int) :param brady: (int) :param tachy: (int) """ #Calls hrdetector() to get instantaneous heart rate #instHR = findInstHR() #Calls findAvgHR() to get averag...
<commit_before>def summarizeECG(instHR, avgHR, brady, tachy): """Create txt file summarizing ECG analysis :param instHR: (int) :param avgHR: (int) :param brady: (int) :param tachy: (int) """ #Calls hrdetector() to get instantaneous heart rate #instHR = findInstHR() #Calls findAvgHR(...
93f9bb4115c4259dd38962229947b87e952a25a7
completion/levenshtein.py
completion/levenshtein.py
def levenshtein(s1, s2): if len(s1) < len(s2): return levenshtein(s2, s1) # len(s1) >= len(s2) if len(s2) == 0: return len(s1) previous_row = range(len(s2) + 1) for i, c1 in enumerate(s1): current_row = [i + 1] for j, c2 in enumerate(s2): insertions = pr...
def levenshtein(top_string, bot_string): if len(top_string) < len(bot_string): return levenshtein(bot_string, top_string) # len(s1) >= len(s2) if len(bot_string) == 0: return len(top_string) previous_row = range(len(bot_string) + 1) for i, top_char in enumerate(top_string): ...
Use better variable names for algorithmic determination
Use better variable names for algorithmic determination
Python
mit
thatsIch/sublime-rainmeter
def levenshtein(s1, s2): if len(s1) < len(s2): return levenshtein(s2, s1) # len(s1) >= len(s2) if len(s2) == 0: return len(s1) previous_row = range(len(s2) + 1) for i, c1 in enumerate(s1): current_row = [i + 1] for j, c2 in enumerate(s2): insertions = pr...
def levenshtein(top_string, bot_string): if len(top_string) < len(bot_string): return levenshtein(bot_string, top_string) # len(s1) >= len(s2) if len(bot_string) == 0: return len(top_string) previous_row = range(len(bot_string) + 1) for i, top_char in enumerate(top_string): ...
<commit_before>def levenshtein(s1, s2): if len(s1) < len(s2): return levenshtein(s2, s1) # len(s1) >= len(s2) if len(s2) == 0: return len(s1) previous_row = range(len(s2) + 1) for i, c1 in enumerate(s1): current_row = [i + 1] for j, c2 in enumerate(s2): ...
def levenshtein(top_string, bot_string): if len(top_string) < len(bot_string): return levenshtein(bot_string, top_string) # len(s1) >= len(s2) if len(bot_string) == 0: return len(top_string) previous_row = range(len(bot_string) + 1) for i, top_char in enumerate(top_string): ...
def levenshtein(s1, s2): if len(s1) < len(s2): return levenshtein(s2, s1) # len(s1) >= len(s2) if len(s2) == 0: return len(s1) previous_row = range(len(s2) + 1) for i, c1 in enumerate(s1): current_row = [i + 1] for j, c2 in enumerate(s2): insertions = pr...
<commit_before>def levenshtein(s1, s2): if len(s1) < len(s2): return levenshtein(s2, s1) # len(s1) >= len(s2) if len(s2) == 0: return len(s1) previous_row = range(len(s2) + 1) for i, c1 in enumerate(s1): current_row = [i + 1] for j, c2 in enumerate(s2): ...
d6461896dec112caad81490e1a6d055a3d4c9a95
db.py
db.py
"""Handles database connection, and all that fun stuff. @package ppbot """ from pymongo import MongoClient from settings import * client = MongoClient(MONGO_HOST, MONGO_PORT) db = client[MONGO_DB]
"""Handles database connection, and all that fun stuff. Adds a wrapper to pymongo. @package ppbot """ from pymongo import mongo_client from pymongo import database from pymongo import collection from settings import * class ModuleMongoClient(mongo_client.MongoClient): def __getattr__(self, name): attr =...
Add custom wrapper code to pymongo for Modules
Add custom wrapper code to pymongo for Modules
Python
mit
billyvg/piebot
"""Handles database connection, and all that fun stuff. @package ppbot """ from pymongo import MongoClient from settings import * client = MongoClient(MONGO_HOST, MONGO_PORT) db = client[MONGO_DB] Add custom wrapper code to pymongo for Modules
"""Handles database connection, and all that fun stuff. Adds a wrapper to pymongo. @package ppbot """ from pymongo import mongo_client from pymongo import database from pymongo import collection from settings import * class ModuleMongoClient(mongo_client.MongoClient): def __getattr__(self, name): attr =...
<commit_before>"""Handles database connection, and all that fun stuff. @package ppbot """ from pymongo import MongoClient from settings import * client = MongoClient(MONGO_HOST, MONGO_PORT) db = client[MONGO_DB] <commit_msg>Add custom wrapper code to pymongo for Modules<commit_after>
"""Handles database connection, and all that fun stuff. Adds a wrapper to pymongo. @package ppbot """ from pymongo import mongo_client from pymongo import database from pymongo import collection from settings import * class ModuleMongoClient(mongo_client.MongoClient): def __getattr__(self, name): attr =...
"""Handles database connection, and all that fun stuff. @package ppbot """ from pymongo import MongoClient from settings import * client = MongoClient(MONGO_HOST, MONGO_PORT) db = client[MONGO_DB] Add custom wrapper code to pymongo for Modules"""Handles database connection, and all that fun stuff. Adds a wrapper to ...
<commit_before>"""Handles database connection, and all that fun stuff. @package ppbot """ from pymongo import MongoClient from settings import * client = MongoClient(MONGO_HOST, MONGO_PORT) db = client[MONGO_DB] <commit_msg>Add custom wrapper code to pymongo for Modules<commit_after>"""Handles database connection, a...
e87ac65b42b6390cee835deb180fc6cd2a814082
invocations/checks.py
invocations/checks.py
""" Tasks for common project sanity-checking such as linting or type checking. """ from __future__ import unicode_literals from invoke import task @task(name="blacken", iterable=["folder"]) def blacken(c, line_length=79, folder=None, check=False): """ Run black on the current source tree (all ``.py`` files)...
""" Tasks for common project sanity-checking such as linting or type checking. """ from __future__ import unicode_literals from invoke import task @task(name="blacken", iterable=["folder"]) def blacken(c, line_length=79, folder=None, check=False, diff=False): """ Run black on the current source tree (all ``...
Add diff option to blacken and document params
Add diff option to blacken and document params
Python
bsd-2-clause
pyinvoke/invocations
""" Tasks for common project sanity-checking such as linting or type checking. """ from __future__ import unicode_literals from invoke import task @task(name="blacken", iterable=["folder"]) def blacken(c, line_length=79, folder=None, check=False): """ Run black on the current source tree (all ``.py`` files)...
""" Tasks for common project sanity-checking such as linting or type checking. """ from __future__ import unicode_literals from invoke import task @task(name="blacken", iterable=["folder"]) def blacken(c, line_length=79, folder=None, check=False, diff=False): """ Run black on the current source tree (all ``...
<commit_before>""" Tasks for common project sanity-checking such as linting or type checking. """ from __future__ import unicode_literals from invoke import task @task(name="blacken", iterable=["folder"]) def blacken(c, line_length=79, folder=None, check=False): """ Run black on the current source tree (all...
""" Tasks for common project sanity-checking such as linting or type checking. """ from __future__ import unicode_literals from invoke import task @task(name="blacken", iterable=["folder"]) def blacken(c, line_length=79, folder=None, check=False, diff=False): """ Run black on the current source tree (all ``...
""" Tasks for common project sanity-checking such as linting or type checking. """ from __future__ import unicode_literals from invoke import task @task(name="blacken", iterable=["folder"]) def blacken(c, line_length=79, folder=None, check=False): """ Run black on the current source tree (all ``.py`` files)...
<commit_before>""" Tasks for common project sanity-checking such as linting or type checking. """ from __future__ import unicode_literals from invoke import task @task(name="blacken", iterable=["folder"]) def blacken(c, line_length=79, folder=None, check=False): """ Run black on the current source tree (all...
2e6445bfda12e470fdc5c0b6aa725fd344c863f1
drake/bindings/python/pydrake/test/testRBTCoM.py
drake/bindings/python/pydrake/test/testRBTCoM.py
from __future__ import print_function import unittest import numpy as np import pydrake import os.path class TestRBTCoM(unittest.TestCase): def testCoM0(self): r = pydrake.rbtree.RigidBodyTree(os.path.join(pydrake.getDrakePath(), "examples/Pendulum/Pendulum.urdf"))...
from __future__ import print_function import unittest import numpy as np import pydrake import os.path class TestRBTCoM(unittest.TestCase): def testCoM0(self): r = pydrake.rbtree.RigidBodyTree(os.path.join(pydrake.getDrakePath(), "examples/Pendulum/Pendulum.urdf"))...
Test CoM Jacobian with random configuration for shape, and then with 0 configuration for values
Test CoM Jacobian with random configuration for shape, and then with 0 configuration for values
Python
bsd-3-clause
billhoffman/drake,billhoffman/drake,sheim/drake,sheim/drake,sheim/drake,sheim/drake,billhoffman/drake,billhoffman/drake,billhoffman/drake,sheim/drake,sheim/drake,sheim/drake,billhoffman/drake,billhoffman/drake,sheim/drake,billhoffman/drake
from __future__ import print_function import unittest import numpy as np import pydrake import os.path class TestRBTCoM(unittest.TestCase): def testCoM0(self): r = pydrake.rbtree.RigidBodyTree(os.path.join(pydrake.getDrakePath(), "examples/Pendulum/Pendulum.urdf"))...
from __future__ import print_function import unittest import numpy as np import pydrake import os.path class TestRBTCoM(unittest.TestCase): def testCoM0(self): r = pydrake.rbtree.RigidBodyTree(os.path.join(pydrake.getDrakePath(), "examples/Pendulum/Pendulum.urdf"))...
<commit_before>from __future__ import print_function import unittest import numpy as np import pydrake import os.path class TestRBTCoM(unittest.TestCase): def testCoM0(self): r = pydrake.rbtree.RigidBodyTree(os.path.join(pydrake.getDrakePath(), "examples/Pendulum/P...
from __future__ import print_function import unittest import numpy as np import pydrake import os.path class TestRBTCoM(unittest.TestCase): def testCoM0(self): r = pydrake.rbtree.RigidBodyTree(os.path.join(pydrake.getDrakePath(), "examples/Pendulum/Pendulum.urdf"))...
from __future__ import print_function import unittest import numpy as np import pydrake import os.path class TestRBTCoM(unittest.TestCase): def testCoM0(self): r = pydrake.rbtree.RigidBodyTree(os.path.join(pydrake.getDrakePath(), "examples/Pendulum/Pendulum.urdf"))...
<commit_before>from __future__ import print_function import unittest import numpy as np import pydrake import os.path class TestRBTCoM(unittest.TestCase): def testCoM0(self): r = pydrake.rbtree.RigidBodyTree(os.path.join(pydrake.getDrakePath(), "examples/Pendulum/P...
e30629cba2bf09cf83e8e424a203793a5baf9b43
remote.py
remote.py
import sublime, sublime_plugin
import sublime, sublime_plugin class DiffListener(sublime_plugin.EventListener): """Listens for modifications to the view and gets the diffs using Operational Transformation""" def __init___(self): self.buffer = None self.last_buffer = None def on_modified_async(self, view): """Li...
Add a bunch of mostly-empty method stubs.
Add a bunch of mostly-empty method stubs.
Python
mit
TeamRemote/remote-sublime,TeamRemote/remote-sublime
import sublime, sublime_pluginAdd a bunch of mostly-empty method stubs.
import sublime, sublime_plugin class DiffListener(sublime_plugin.EventListener): """Listens for modifications to the view and gets the diffs using Operational Transformation""" def __init___(self): self.buffer = None self.last_buffer = None def on_modified_async(self, view): """Li...
<commit_before>import sublime, sublime_plugin<commit_msg>Add a bunch of mostly-empty method stubs.<commit_after>
import sublime, sublime_plugin class DiffListener(sublime_plugin.EventListener): """Listens for modifications to the view and gets the diffs using Operational Transformation""" def __init___(self): self.buffer = None self.last_buffer = None def on_modified_async(self, view): """Li...
import sublime, sublime_pluginAdd a bunch of mostly-empty method stubs.import sublime, sublime_plugin class DiffListener(sublime_plugin.EventListener): """Listens for modifications to the view and gets the diffs using Operational Transformation""" def __init___(self): self.buffer = None self.l...
<commit_before>import sublime, sublime_plugin<commit_msg>Add a bunch of mostly-empty method stubs.<commit_after>import sublime, sublime_plugin class DiffListener(sublime_plugin.EventListener): """Listens for modifications to the view and gets the diffs using Operational Transformation""" def __init___(self): ...
6bbbc74ea4acda000c115d08801d2f6c677401da
lmod/__init__.py
lmod/__init__.py
import os from subprocess import Popen, PIPE LMOD_CMD = os.environ['LMOD_CMD'] LMOD_SYSTEM_NAME = os.environ.get('LMOD_SYSTEM_NAME', '') def module(command, arguments=()): cmd = [LMOD_CMD, 'python', '--terse', command] cmd.extend(arguments) result = Popen(cmd, stdout=PIPE, stderr=PIPE) if command in ...
from os import environ from subprocess import Popen, PIPE LMOD_SYSTEM_NAME = environ.get('LMOD_SYSTEM_NAME', '') def module(command, arguments=()): cmd = [environ['LMOD_CMD'], 'python', '--terse', command] cmd.extend(arguments) result = Popen(cmd, stdout=PIPE, stderr=PIPE) if command in ('load', 'unl...
Remove LMOD_CMD global from module scope
Remove LMOD_CMD global from module scope Declaring the variable at the module level could cause problem when installing and enabling the extension when Lmod was not activated.
Python
mit
cmd-ntrf/jupyter-lmod,cmd-ntrf/jupyter-lmod,cmd-ntrf/jupyter-lmod
import os from subprocess import Popen, PIPE LMOD_CMD = os.environ['LMOD_CMD'] LMOD_SYSTEM_NAME = os.environ.get('LMOD_SYSTEM_NAME', '') def module(command, arguments=()): cmd = [LMOD_CMD, 'python', '--terse', command] cmd.extend(arguments) result = Popen(cmd, stdout=PIPE, stderr=PIPE) if command in ...
from os import environ from subprocess import Popen, PIPE LMOD_SYSTEM_NAME = environ.get('LMOD_SYSTEM_NAME', '') def module(command, arguments=()): cmd = [environ['LMOD_CMD'], 'python', '--terse', command] cmd.extend(arguments) result = Popen(cmd, stdout=PIPE, stderr=PIPE) if command in ('load', 'unl...
<commit_before>import os from subprocess import Popen, PIPE LMOD_CMD = os.environ['LMOD_CMD'] LMOD_SYSTEM_NAME = os.environ.get('LMOD_SYSTEM_NAME', '') def module(command, arguments=()): cmd = [LMOD_CMD, 'python', '--terse', command] cmd.extend(arguments) result = Popen(cmd, stdout=PIPE, stderr=PIPE) ...
from os import environ from subprocess import Popen, PIPE LMOD_SYSTEM_NAME = environ.get('LMOD_SYSTEM_NAME', '') def module(command, arguments=()): cmd = [environ['LMOD_CMD'], 'python', '--terse', command] cmd.extend(arguments) result = Popen(cmd, stdout=PIPE, stderr=PIPE) if command in ('load', 'unl...
import os from subprocess import Popen, PIPE LMOD_CMD = os.environ['LMOD_CMD'] LMOD_SYSTEM_NAME = os.environ.get('LMOD_SYSTEM_NAME', '') def module(command, arguments=()): cmd = [LMOD_CMD, 'python', '--terse', command] cmd.extend(arguments) result = Popen(cmd, stdout=PIPE, stderr=PIPE) if command in ...
<commit_before>import os from subprocess import Popen, PIPE LMOD_CMD = os.environ['LMOD_CMD'] LMOD_SYSTEM_NAME = os.environ.get('LMOD_SYSTEM_NAME', '') def module(command, arguments=()): cmd = [LMOD_CMD, 'python', '--terse', command] cmd.extend(arguments) result = Popen(cmd, stdout=PIPE, stderr=PIPE) ...
bb42fe14165806caf8a2386c49cb602dbf9ad391
connectionless_service.py
connectionless_service.py
""" A Simple example for testing the SimpleServer Class. A simple connectionless server. It is for studying purposes only. """ from simple.server import SimpleServer __author__ = "Facundo Victor" __license__ = "MIT" __email__ = "facundovt@gmail.com" def handle_message(sockets=None): """ Handle a simple UDP...
""" A Simple example for testing the SimpleServer Class. A simple connectionless server. It is for studying purposes only. """ from simple.server import SimpleServer __author__ = "Facundo Victor" __license__ = "MIT" __email__ = "facundovt@gmail.com" def handle_message(sockets=None): """ Handle a simple UDP...
Fix python 2.4 connectionless service
Fix python 2.4 connectionless service
Python
mit
facundovictor/non-blocking-socket-samples
""" A Simple example for testing the SimpleServer Class. A simple connectionless server. It is for studying purposes only. """ from simple.server import SimpleServer __author__ = "Facundo Victor" __license__ = "MIT" __email__ = "facundovt@gmail.com" def handle_message(sockets=None): """ Handle a simple UDP...
""" A Simple example for testing the SimpleServer Class. A simple connectionless server. It is for studying purposes only. """ from simple.server import SimpleServer __author__ = "Facundo Victor" __license__ = "MIT" __email__ = "facundovt@gmail.com" def handle_message(sockets=None): """ Handle a simple UDP...
<commit_before>""" A Simple example for testing the SimpleServer Class. A simple connectionless server. It is for studying purposes only. """ from simple.server import SimpleServer __author__ = "Facundo Victor" __license__ = "MIT" __email__ = "facundovt@gmail.com" def handle_message(sockets=None): """ Hand...
""" A Simple example for testing the SimpleServer Class. A simple connectionless server. It is for studying purposes only. """ from simple.server import SimpleServer __author__ = "Facundo Victor" __license__ = "MIT" __email__ = "facundovt@gmail.com" def handle_message(sockets=None): """ Handle a simple UDP...
""" A Simple example for testing the SimpleServer Class. A simple connectionless server. It is for studying purposes only. """ from simple.server import SimpleServer __author__ = "Facundo Victor" __license__ = "MIT" __email__ = "facundovt@gmail.com" def handle_message(sockets=None): """ Handle a simple UDP...
<commit_before>""" A Simple example for testing the SimpleServer Class. A simple connectionless server. It is for studying purposes only. """ from simple.server import SimpleServer __author__ = "Facundo Victor" __license__ = "MIT" __email__ = "facundovt@gmail.com" def handle_message(sockets=None): """ Hand...
8fba76340daef349c45946183757ef463004492b
tests/unit/test_spec_set.py
tests/unit/test_spec_set.py
import unittest class TestSpecSet(unittest.TestCase): pass
import unittest from piptools.datastructures import SpecSet, Spec class TestSpecSet(unittest.TestCase): def test_adding_specs(self): """Adding specs to a set.""" specset = SpecSet() specset.add_spec(Spec.from_line('Django>=1.3')) assert 'Django>=1.3' in map(str, specset) ...
Add test cases for testing SpecSet.
Add test cases for testing SpecSet.
Python
bsd-2-clause
suutari-ai/prequ,suutari/prequ,suutari/prequ
import unittest class TestSpecSet(unittest.TestCase): pass Add test cases for testing SpecSet.
import unittest from piptools.datastructures import SpecSet, Spec class TestSpecSet(unittest.TestCase): def test_adding_specs(self): """Adding specs to a set.""" specset = SpecSet() specset.add_spec(Spec.from_line('Django>=1.3')) assert 'Django>=1.3' in map(str, specset) ...
<commit_before>import unittest class TestSpecSet(unittest.TestCase): pass <commit_msg>Add test cases for testing SpecSet.<commit_after>
import unittest from piptools.datastructures import SpecSet, Spec class TestSpecSet(unittest.TestCase): def test_adding_specs(self): """Adding specs to a set.""" specset = SpecSet() specset.add_spec(Spec.from_line('Django>=1.3')) assert 'Django>=1.3' in map(str, specset) ...
import unittest class TestSpecSet(unittest.TestCase): pass Add test cases for testing SpecSet.import unittest from piptools.datastructures import SpecSet, Spec class TestSpecSet(unittest.TestCase): def test_adding_specs(self): """Adding specs to a set.""" specset = SpecSet() specset...
<commit_before>import unittest class TestSpecSet(unittest.TestCase): pass <commit_msg>Add test cases for testing SpecSet.<commit_after>import unittest from piptools.datastructures import SpecSet, Spec class TestSpecSet(unittest.TestCase): def test_adding_specs(self): """Adding specs to a set.""" ...
fd99ef86dfca50dbd36b2c1a022cf30a0720dbea
scrapy/squeues.py
scrapy/squeues.py
""" Scheduler queues """ import marshal from six.moves import cPickle as pickle from queuelib import queue def _serializable_queue(queue_class, serialize, deserialize): class SerializableQueue(queue_class): def push(self, obj): s = serialize(obj) super(SerializableQueue, self).p...
""" Scheduler queues """ import marshal from six.moves import cPickle as pickle from queuelib import queue def _serializable_queue(queue_class, serialize, deserialize): class SerializableQueue(queue_class): def push(self, obj): s = serialize(obj) super(SerializableQueue, self).p...
Test for AttributeError when pickling objects (Python>=3.5)
Test for AttributeError when pickling objects (Python>=3.5) Same "fix" as in e.g. https://github.com/joblib/joblib/pull/246
Python
bsd-3-clause
YeelerG/scrapy,wenyu1001/scrapy,GregoryVigoTorres/scrapy,crasker/scrapy,jdemaeyer/scrapy,Parlin-Galanodel/scrapy,arush0311/scrapy,Digenis/scrapy,pablohoffman/scrapy,ArturGaspar/scrapy,kmike/scrapy,crasker/scrapy,eLRuLL/scrapy,wujuguang/scrapy,carlosp420/scrapy,darkrho/scrapy-scrapy,redapple/scrapy,carlosp420/scrapy,bar...
""" Scheduler queues """ import marshal from six.moves import cPickle as pickle from queuelib import queue def _serializable_queue(queue_class, serialize, deserialize): class SerializableQueue(queue_class): def push(self, obj): s = serialize(obj) super(SerializableQueue, self).p...
""" Scheduler queues """ import marshal from six.moves import cPickle as pickle from queuelib import queue def _serializable_queue(queue_class, serialize, deserialize): class SerializableQueue(queue_class): def push(self, obj): s = serialize(obj) super(SerializableQueue, self).p...
<commit_before>""" Scheduler queues """ import marshal from six.moves import cPickle as pickle from queuelib import queue def _serializable_queue(queue_class, serialize, deserialize): class SerializableQueue(queue_class): def push(self, obj): s = serialize(obj) super(Serializabl...
""" Scheduler queues """ import marshal from six.moves import cPickle as pickle from queuelib import queue def _serializable_queue(queue_class, serialize, deserialize): class SerializableQueue(queue_class): def push(self, obj): s = serialize(obj) super(SerializableQueue, self).p...
""" Scheduler queues """ import marshal from six.moves import cPickle as pickle from queuelib import queue def _serializable_queue(queue_class, serialize, deserialize): class SerializableQueue(queue_class): def push(self, obj): s = serialize(obj) super(SerializableQueue, self).p...
<commit_before>""" Scheduler queues """ import marshal from six.moves import cPickle as pickle from queuelib import queue def _serializable_queue(queue_class, serialize, deserialize): class SerializableQueue(queue_class): def push(self, obj): s = serialize(obj) super(Serializabl...
b639c9f1c615ca73fd49c171344effb3718b2b77
script.py
script.py
import ast import click from graphing.graph import FunctionGrapher from parsing.parser import FileVisitor @click.command() @click.argument('code', type=click.File('rb')) @click.option('--printed', default=False, is_flag=True, help='Pretty prints the call tree for each class in the file') @click.option('--remove-bui...
import ast import click from graphing.graph import FunctionGrapher from parsing.parser import FileVisitor @click.command() @click.argument('code', type=click.File('rb')) @click.option('--printed', default=False, is_flag=True, help='Pretty prints the call tree for each class in the file') @click.option('--remove-bui...
Add output file type option
Add output file type option
Python
mit
LaurEars/codegrapher
import ast import click from graphing.graph import FunctionGrapher from parsing.parser import FileVisitor @click.command() @click.argument('code', type=click.File('rb')) @click.option('--printed', default=False, is_flag=True, help='Pretty prints the call tree for each class in the file') @click.option('--remove-bui...
import ast import click from graphing.graph import FunctionGrapher from parsing.parser import FileVisitor @click.command() @click.argument('code', type=click.File('rb')) @click.option('--printed', default=False, is_flag=True, help='Pretty prints the call tree for each class in the file') @click.option('--remove-bui...
<commit_before>import ast import click from graphing.graph import FunctionGrapher from parsing.parser import FileVisitor @click.command() @click.argument('code', type=click.File('rb')) @click.option('--printed', default=False, is_flag=True, help='Pretty prints the call tree for each class in the file') @click.optio...
import ast import click from graphing.graph import FunctionGrapher from parsing.parser import FileVisitor @click.command() @click.argument('code', type=click.File('rb')) @click.option('--printed', default=False, is_flag=True, help='Pretty prints the call tree for each class in the file') @click.option('--remove-bui...
import ast import click from graphing.graph import FunctionGrapher from parsing.parser import FileVisitor @click.command() @click.argument('code', type=click.File('rb')) @click.option('--printed', default=False, is_flag=True, help='Pretty prints the call tree for each class in the file') @click.option('--remove-bui...
<commit_before>import ast import click from graphing.graph import FunctionGrapher from parsing.parser import FileVisitor @click.command() @click.argument('code', type=click.File('rb')) @click.option('--printed', default=False, is_flag=True, help='Pretty prints the call tree for each class in the file') @click.optio...
5cb10ce2f8e3b80fc54b5bfd3e60b4240dfed0fd
server.py
server.py
import bottle import waitress import controller import breathe from pytz import timezone from apscheduler.schedulers.background import BackgroundScheduler bottle_app = bottle.app() scheduler = BackgroundScheduler() scheduler.configure(timezone=timezone('US/Pacific')) breather = breathe.Breathe() my_controller = contro...
import bottle import waitress import controller import breathe from pytz import timezone from apscheduler.schedulers.background import BackgroundScheduler bottle_app = bottle.app() scheduler = BackgroundScheduler() scheduler.configure(timezone=timezone('US/Pacific')) breather = breathe.Breathe() my_controller = contro...
Set light timer 1 hr back, 10pm-12am
Set light timer 1 hr back, 10pm-12am
Python
mit
tipsqueal/duwamish-lighthouse,tipsqueal/duwamish-lighthouse,illumenati/duwamish-lighthouse,illumenati/duwamish-lighthouse,YonasBerhe/duwamish-lighthouse
import bottle import waitress import controller import breathe from pytz import timezone from apscheduler.schedulers.background import BackgroundScheduler bottle_app = bottle.app() scheduler = BackgroundScheduler() scheduler.configure(timezone=timezone('US/Pacific')) breather = breathe.Breathe() my_controller = contro...
import bottle import waitress import controller import breathe from pytz import timezone from apscheduler.schedulers.background import BackgroundScheduler bottle_app = bottle.app() scheduler = BackgroundScheduler() scheduler.configure(timezone=timezone('US/Pacific')) breather = breathe.Breathe() my_controller = contro...
<commit_before>import bottle import waitress import controller import breathe from pytz import timezone from apscheduler.schedulers.background import BackgroundScheduler bottle_app = bottle.app() scheduler = BackgroundScheduler() scheduler.configure(timezone=timezone('US/Pacific')) breather = breathe.Breathe() my_cont...
import bottle import waitress import controller import breathe from pytz import timezone from apscheduler.schedulers.background import BackgroundScheduler bottle_app = bottle.app() scheduler = BackgroundScheduler() scheduler.configure(timezone=timezone('US/Pacific')) breather = breathe.Breathe() my_controller = contro...
import bottle import waitress import controller import breathe from pytz import timezone from apscheduler.schedulers.background import BackgroundScheduler bottle_app = bottle.app() scheduler = BackgroundScheduler() scheduler.configure(timezone=timezone('US/Pacific')) breather = breathe.Breathe() my_controller = contro...
<commit_before>import bottle import waitress import controller import breathe from pytz import timezone from apscheduler.schedulers.background import BackgroundScheduler bottle_app = bottle.app() scheduler = BackgroundScheduler() scheduler.configure(timezone=timezone('US/Pacific')) breather = breathe.Breathe() my_cont...
14756f5de831832a192a8a453e7e108be7ebcacd
components/includes/utilities.py
components/includes/utilities.py
import random import json import time import SocketExtend as SockExt import config as conf import parser as p def ping(sock): try: rand = random.randint(1, 99999) data = {'request':'ping', 'contents': {'value':rand}} SockExt.send_msg(sock, json.dumps(data)) result = json.loads(SockExt.recv_msg(sock)) if ...
import random import json import time import SocketExtend as SockExt import config as conf import parser as p def ping(sock): try: rand = random.randint(1, 99999) data = {'request':'ping', 'contents': {'value':rand}} SockExt.send_msg(sock, json.dumps(data)) result = json.loads(SockExt.recv_msg(sock)) if ...
Clean up, comments, liveness checking, robust data transfer
Clean up, comments, liveness checking, robust data transfer
Python
bsd-2-clause
mavroudisv/Crux
import random import json import time import SocketExtend as SockExt import config as conf import parser as p def ping(sock): try: rand = random.randint(1, 99999) data = {'request':'ping', 'contents': {'value':rand}} SockExt.send_msg(sock, json.dumps(data)) result = json.loads(SockExt.recv_msg(sock)) if ...
import random import json import time import SocketExtend as SockExt import config as conf import parser as p def ping(sock): try: rand = random.randint(1, 99999) data = {'request':'ping', 'contents': {'value':rand}} SockExt.send_msg(sock, json.dumps(data)) result = json.loads(SockExt.recv_msg(sock)) if ...
<commit_before>import random import json import time import SocketExtend as SockExt import config as conf import parser as p def ping(sock): try: rand = random.randint(1, 99999) data = {'request':'ping', 'contents': {'value':rand}} SockExt.send_msg(sock, json.dumps(data)) result = json.loads(SockExt.recv_msg...
import random import json import time import SocketExtend as SockExt import config as conf import parser as p def ping(sock): try: rand = random.randint(1, 99999) data = {'request':'ping', 'contents': {'value':rand}} SockExt.send_msg(sock, json.dumps(data)) result = json.loads(SockExt.recv_msg(sock)) if ...
import random import json import time import SocketExtend as SockExt import config as conf import parser as p def ping(sock): try: rand = random.randint(1, 99999) data = {'request':'ping', 'contents': {'value':rand}} SockExt.send_msg(sock, json.dumps(data)) result = json.loads(SockExt.recv_msg(sock)) if ...
<commit_before>import random import json import time import SocketExtend as SockExt import config as conf import parser as p def ping(sock): try: rand = random.randint(1, 99999) data = {'request':'ping', 'contents': {'value':rand}} SockExt.send_msg(sock, json.dumps(data)) result = json.loads(SockExt.recv_msg...
6b4e5c731d4545561bcc1bd5f819e88d5a3eea60
djangae/settings_base.py
djangae/settings_base.py
DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.backends.appengin...
DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.backends.appengin...
Set up logging for live environment.
Set up logging for live environment.
Python
bsd-3-clause
martinogden/djangae,wangjun/djangae,martinogden/djangae,stucox/djangae,SiPiggles/djangae,potatolondon/djangae,trik/djangae,martinogden/djangae,kirberich/djangae,grzes/djangae,kirberich/djangae,armirusco/djangae,pablorecio/djangae,b-cannon/my_djae,armirusco/djangae,leekchan/djangae,trik/djangae,stucox/djangae,jscissr/dj...
DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.backends.appengin...
DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.backends.appengin...
<commit_before> DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.ba...
DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.backends.appengin...
DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.backends.appengin...
<commit_before> DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.ba...
6aa7c86828e230699365b88368070f426a7e2a8c
son-gtklic/app.py
son-gtklic/app.py
import sys import os import json import unittest import xmlrunner from flask import Flask, Response from flask_sqlalchemy import SQLAlchemy from flask_restful import Api from flask_script import Manager, Server, prompt_bool from flask_migrate import Migrate, MigrateCommand app = Flask(__name__) app.config.from_pyfi...
import sys import os import json import unittest import xmlrunner from flask import Flask, Response from flask_sqlalchemy import SQLAlchemy from flask_restful import Api from flask_script import Manager, Server, prompt_bool from flask_migrate import Migrate, MigrateCommand app = Flask(__name__) app.config.from_pyfi...
Fix extra colon in status_code key
Fix extra colon in status_code key
Python
apache-2.0
dang03/son-gkeeper,alfonsoegio/son-gkeeper,felipevicens/son-gkeeper,jbonnet/son-gkeeper,alfonsoegio/son-gkeeper,sonata-nfv/son-gkeeper,jbonnet/son-gkeeper,alfonsoegio/son-gkeeper,jbonnet/son-gkeeper,felipevicens/son-gkeeper,sonata-nfv/son-gkeeper,jbonnet/son-gkeeper,dang03/son-gkeeper,alfonsoegio/son-gkeeper,felipevice...
import sys import os import json import unittest import xmlrunner from flask import Flask, Response from flask_sqlalchemy import SQLAlchemy from flask_restful import Api from flask_script import Manager, Server, prompt_bool from flask_migrate import Migrate, MigrateCommand app = Flask(__name__) app.config.from_pyfi...
import sys import os import json import unittest import xmlrunner from flask import Flask, Response from flask_sqlalchemy import SQLAlchemy from flask_restful import Api from flask_script import Manager, Server, prompt_bool from flask_migrate import Migrate, MigrateCommand app = Flask(__name__) app.config.from_pyfi...
<commit_before> import sys import os import json import unittest import xmlrunner from flask import Flask, Response from flask_sqlalchemy import SQLAlchemy from flask_restful import Api from flask_script import Manager, Server, prompt_bool from flask_migrate import Migrate, MigrateCommand app = Flask(__name__) app.c...
import sys import os import json import unittest import xmlrunner from flask import Flask, Response from flask_sqlalchemy import SQLAlchemy from flask_restful import Api from flask_script import Manager, Server, prompt_bool from flask_migrate import Migrate, MigrateCommand app = Flask(__name__) app.config.from_pyfi...
import sys import os import json import unittest import xmlrunner from flask import Flask, Response from flask_sqlalchemy import SQLAlchemy from flask_restful import Api from flask_script import Manager, Server, prompt_bool from flask_migrate import Migrate, MigrateCommand app = Flask(__name__) app.config.from_pyfi...
<commit_before> import sys import os import json import unittest import xmlrunner from flask import Flask, Response from flask_sqlalchemy import SQLAlchemy from flask_restful import Api from flask_script import Manager, Server, prompt_bool from flask_migrate import Migrate, MigrateCommand app = Flask(__name__) app.c...
f118d1c3cb4752a20329a32d0d49fd9e46280bc3
user/admin.py
user/admin.py
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'profile__joined') ordering ...
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'get_date_joined', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'prof...
Add join date to UserAdmin list.
Ch23: Add join date to UserAdmin list.
Python
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'profile__joined') ordering ...
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'get_date_joined', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'prof...
<commit_before>from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'profile__joined'...
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'get_date_joined', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'prof...
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'profile__joined') ordering ...
<commit_before>from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'profile__joined'...
ab191322b245d51df92bed11467512fc92665b1c
nisl/__init__.py
nisl/__init__.py
""" Machine Learning module for NeuroImaging in python ================================================== See http://nisl.github.com for complete documentation. """ """ try: import numpy except ImportError: print 'Numpy could not be found, please install it properly to use nisl.' try: import scipy except...
""" Machine Learning module for NeuroImaging in python ================================================== See http://nisl.github.com for complete documentation. """ """ try: import numpy except ImportError: print 'Numpy could not be found, please install it properly to use nisl.' try: import scipy except...
Change "Sklearn" to "Scikit-learn" in error message
Change "Sklearn" to "Scikit-learn" in error message
Python
bsd-3-clause
abenicho/isvr
""" Machine Learning module for NeuroImaging in python ================================================== See http://nisl.github.com for complete documentation. """ """ try: import numpy except ImportError: print 'Numpy could not be found, please install it properly to use nisl.' try: import scipy except...
""" Machine Learning module for NeuroImaging in python ================================================== See http://nisl.github.com for complete documentation. """ """ try: import numpy except ImportError: print 'Numpy could not be found, please install it properly to use nisl.' try: import scipy except...
<commit_before>""" Machine Learning module for NeuroImaging in python ================================================== See http://nisl.github.com for complete documentation. """ """ try: import numpy except ImportError: print 'Numpy could not be found, please install it properly to use nisl.' try: impo...
""" Machine Learning module for NeuroImaging in python ================================================== See http://nisl.github.com for complete documentation. """ """ try: import numpy except ImportError: print 'Numpy could not be found, please install it properly to use nisl.' try: import scipy except...
""" Machine Learning module for NeuroImaging in python ================================================== See http://nisl.github.com for complete documentation. """ """ try: import numpy except ImportError: print 'Numpy could not be found, please install it properly to use nisl.' try: import scipy except...
<commit_before>""" Machine Learning module for NeuroImaging in python ================================================== See http://nisl.github.com for complete documentation. """ """ try: import numpy except ImportError: print 'Numpy could not be found, please install it properly to use nisl.' try: impo...
0bb7a3d468a70e57bb867678a7649e7ad736d39f
cms/utils/setup.py
cms/utils/setup.py
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from cms.utils.compat.dj import is_installed as app_is_installed def validate_dependencies(): """ Check for installed apps, their versions and configuration options """ if not app_is_installed('mptt'): ra...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from cms.utils.compat.dj import is_installed as app_is_installed def validate_dependencies(): """ Check for installed apps, their versions and configuration options """ if not app_is_installed('mptt'): ra...
Patch get_models to ensure plugins are properly patched
Patch get_models to ensure plugins are properly patched
Python
bsd-3-clause
robmagee/django-cms,chmberl/django-cms,astagi/django-cms,sephii/django-cms,philippze/django-cms,dhorelik/django-cms,cyberintruder/django-cms,evildmp/django-cms,cyberintruder/django-cms,takeshineshiro/django-cms,netzkolchose/django-cms,saintbird/django-cms,memnonila/django-cms,wuzhihui1123/django-cms,AlexProfi/django-cm...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from cms.utils.compat.dj import is_installed as app_is_installed def validate_dependencies(): """ Check for installed apps, their versions and configuration options """ if not app_is_installed('mptt'): ra...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from cms.utils.compat.dj import is_installed as app_is_installed def validate_dependencies(): """ Check for installed apps, their versions and configuration options """ if not app_is_installed('mptt'): ra...
<commit_before>from django.conf import settings from django.core.exceptions import ImproperlyConfigured from cms.utils.compat.dj import is_installed as app_is_installed def validate_dependencies(): """ Check for installed apps, their versions and configuration options """ if not app_is_installed('mpt...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from cms.utils.compat.dj import is_installed as app_is_installed def validate_dependencies(): """ Check for installed apps, their versions and configuration options """ if not app_is_installed('mptt'): ra...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from cms.utils.compat.dj import is_installed as app_is_installed def validate_dependencies(): """ Check for installed apps, their versions and configuration options """ if not app_is_installed('mptt'): ra...
<commit_before>from django.conf import settings from django.core.exceptions import ImproperlyConfigured from cms.utils.compat.dj import is_installed as app_is_installed def validate_dependencies(): """ Check for installed apps, their versions and configuration options """ if not app_is_installed('mpt...
7456080d3f8d598728fe7a9ee96884db9e28a869
tests/services/shop/conftest.py
tests/services/shop/conftest.py
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.email import service as email_service from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop...
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.email import service as email_service from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop...
Introduce factory for email config fixture
Introduce factory for email config fixture This allows to create local fixtures that use email config with a broader scope than 'function'.
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.email import service as email_service from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop...
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.email import service as email_service from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop...
<commit_before>""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.email import service as email_service from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from bycep...
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.email import service as email_service from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop...
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.email import service as email_service from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from byceps.services.shop...
<commit_before>""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest from byceps.services.email import service as email_service from byceps.services.shop.cart.models import Cart from byceps.services.shop.sequence import service as sequence_service from bycep...
be779b6b7f47750b70afa6f0aeb67b99873e1c98
indico/modules/events/tracks/forms.py
indico/modules/events/tracks/forms.py
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
Remove useless field descs, increase rows
Tracks: Remove useless field descs, increase rows
Python
mit
DirkHoffmann/indico,pferreir/indico,OmeGak/indico,indico/indico,mvidalgarcia/indico,mvidalgarcia/indico,indico/indico,OmeGak/indico,DirkHoffmann/indico,mic4ael/indico,mvidalgarcia/indico,OmeGak/indico,indico/indico,OmeGak/indico,indico/indico,ThiefMaster/indico,pferreir/indico,ThiefMaster/indico,ThiefMaster/indico,pfer...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the #...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the #...
e47ede85f2001cc5c514951355ded1253b4c45f7
notaro/apps.py
notaro/apps.py
from django.apps import AppConfig from watson import search as watson class NotaroConfig(AppConfig): name = "notaro" verbose_name = "Notizen" def ready(self): NoteModel = self.get_model("Note") watson.register(NoteModel.objects.filter(published=True)) SourceModel = self.get_model...
from django.apps import AppConfig from watson import search as watson class NotaroConfig(AppConfig): name = "notaro" verbose_name = "Notizen" def ready(self): NoteModel = self.get_model("Note") watson.register(NoteModel.objects.filter(published=True)) SourceModel = self.get_model...
Fix watson settings; add search for picture
Fix watson settings; add search for picture
Python
bsd-3-clause
ugoertz/django-familio,ugoertz/django-familio,ugoertz/django-familio,ugoertz/django-familio
from django.apps import AppConfig from watson import search as watson class NotaroConfig(AppConfig): name = "notaro" verbose_name = "Notizen" def ready(self): NoteModel = self.get_model("Note") watson.register(NoteModel.objects.filter(published=True)) SourceModel = self.get_model...
from django.apps import AppConfig from watson import search as watson class NotaroConfig(AppConfig): name = "notaro" verbose_name = "Notizen" def ready(self): NoteModel = self.get_model("Note") watson.register(NoteModel.objects.filter(published=True)) SourceModel = self.get_model...
<commit_before>from django.apps import AppConfig from watson import search as watson class NotaroConfig(AppConfig): name = "notaro" verbose_name = "Notizen" def ready(self): NoteModel = self.get_model("Note") watson.register(NoteModel.objects.filter(published=True)) SourceModel =...
from django.apps import AppConfig from watson import search as watson class NotaroConfig(AppConfig): name = "notaro" verbose_name = "Notizen" def ready(self): NoteModel = self.get_model("Note") watson.register(NoteModel.objects.filter(published=True)) SourceModel = self.get_model...
from django.apps import AppConfig from watson import search as watson class NotaroConfig(AppConfig): name = "notaro" verbose_name = "Notizen" def ready(self): NoteModel = self.get_model("Note") watson.register(NoteModel.objects.filter(published=True)) SourceModel = self.get_model...
<commit_before>from django.apps import AppConfig from watson import search as watson class NotaroConfig(AppConfig): name = "notaro" verbose_name = "Notizen" def ready(self): NoteModel = self.get_model("Note") watson.register(NoteModel.objects.filter(published=True)) SourceModel =...
c7efd5976f511200162610612fcd5b6f9b013a54
dciclient/v1/utils.py
dciclient/v1/utils.py
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Red Hat, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Red Hat, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
Fix TypeError exception when parsing json
Fix TypeError exception when parsing json This change fixes the TypeError exception that is raised when it should not while parsing json File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode obj, en...
Python
apache-2.0
redhat-cip/python-dciclient,redhat-cip/python-dciclient
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Red Hat, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Red Hat, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
<commit_before># -*- coding: utf-8 -*- # # Copyright (C) 2015 Red Hat, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Red Hat, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Red Hat, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
<commit_before># -*- coding: utf-8 -*- # # Copyright (C) 2015 Red Hat, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
d17f72112625d66169098d8cb8fb856e7fd93272
knights/k_tags.py
knights/k_tags.py
import ast from .klass import build_method from .library import Library register = Library() def parse_args(bits): ''' Parse tag bits as if they're function args ''' code = ast.parse('x(%s)' % bits, mode='eval') return code.body.args, code.body.keywords @register.tag(name='block') def block(s...
import ast from .library import Library register = Library() @register.tag(name='block') def block(parser, token): token = token.strip() parser.build_method(token, endnodes=['endblock']) return ast.YieldFrom( value=ast.Call( func=ast.Attribute( value=ast.Name(id='sel...
Update for parser class Add if/else tags
Update for parser class Add if/else tags
Python
mit
funkybob/knights-templater,funkybob/knights-templater
import ast from .klass import build_method from .library import Library register = Library() def parse_args(bits): ''' Parse tag bits as if they're function args ''' code = ast.parse('x(%s)' % bits, mode='eval') return code.body.args, code.body.keywords @register.tag(name='block') def block(s...
import ast from .library import Library register = Library() @register.tag(name='block') def block(parser, token): token = token.strip() parser.build_method(token, endnodes=['endblock']) return ast.YieldFrom( value=ast.Call( func=ast.Attribute( value=ast.Name(id='sel...
<commit_before> import ast from .klass import build_method from .library import Library register = Library() def parse_args(bits): ''' Parse tag bits as if they're function args ''' code = ast.parse('x(%s)' % bits, mode='eval') return code.body.args, code.body.keywords @register.tag(name='bloc...
import ast from .library import Library register = Library() @register.tag(name='block') def block(parser, token): token = token.strip() parser.build_method(token, endnodes=['endblock']) return ast.YieldFrom( value=ast.Call( func=ast.Attribute( value=ast.Name(id='sel...
import ast from .klass import build_method from .library import Library register = Library() def parse_args(bits): ''' Parse tag bits as if they're function args ''' code = ast.parse('x(%s)' % bits, mode='eval') return code.body.args, code.body.keywords @register.tag(name='block') def block(s...
<commit_before> import ast from .klass import build_method from .library import Library register = Library() def parse_args(bits): ''' Parse tag bits as if they're function args ''' code = ast.parse('x(%s)' % bits, mode='eval') return code.body.args, code.body.keywords @register.tag(name='bloc...
ed24b2771d80b7043c052e076ae7384f976d92b7
sum-of-multiples/sum_of_multiples.py
sum-of-multiples/sum_of_multiples.py
def sum_of_multiples(limit, factors): return sum(filter(lambda n: n < limit, {f*i for i in range(1, limit) for f in factors}))
def sum_of_multiples(limit, factors): return sum({n for f in factors for n in range(f, limit, f)})
Use more optimal method of getting multiples
Use more optimal method of getting multiples
Python
agpl-3.0
CubicComet/exercism-python-solutions
def sum_of_multiples(limit, factors): return sum(filter(lambda n: n < limit, {f*i for i in range(1, limit) for f in factors})) Use more optimal method of getting multiples
def sum_of_multiples(limit, factors): return sum({n for f in factors for n in range(f, limit, f)})
<commit_before>def sum_of_multiples(limit, factors): return sum(filter(lambda n: n < limit, {f*i for i in range(1, limit) for f in factors})) <commit_msg>Use more optimal method of getting multiples<commit_after>
def sum_of_multiples(limit, factors): return sum({n for f in factors for n in range(f, limit, f)})
def sum_of_multiples(limit, factors): return sum(filter(lambda n: n < limit, {f*i for i in range(1, limit) for f in factors})) Use more optimal method of getting multiplesdef sum_of_multiples(limit, factors): return sum({n for f in factors for n in range(f, limit, f)})
<commit_before>def sum_of_multiples(limit, factors): return sum(filter(lambda n: n < limit, {f*i for i in range(1, limit) for f in factors})) <commit_msg>Use more optimal method of getting multiples<commit_after>def sum_of_multiples(limit, factors): return sum({n for f in factors for n in ...
c468b85ff0278a8f398823adcd2893b28f2e8afe
fair/constants/general.py
fair/constants/general.py
import molwt M_ATMOS = 5.1352e18 # mass of atmosphere, kg # Conversion between ppm CO2 and GtC emissions ppm_gtc = M_ATMOS/1e18*molwt.C/molwt.AIR
from . import molwt M_ATMOS = 5.1352e18 # mass of atmosphere, kg # Conversion between ppm CO2 and GtC emissions ppm_gtc = M_ATMOS/1e18*molwt.C/molwt.AIR
Fix import of molwt in constants
Fix import of molwt in constants
Python
apache-2.0
OMS-NetZero/FAIR
import molwt M_ATMOS = 5.1352e18 # mass of atmosphere, kg # Conversion between ppm CO2 and GtC emissions ppm_gtc = M_ATMOS/1e18*molwt.C/molwt.AIR Fix import of molwt in constants
from . import molwt M_ATMOS = 5.1352e18 # mass of atmosphere, kg # Conversion between ppm CO2 and GtC emissions ppm_gtc = M_ATMOS/1e18*molwt.C/molwt.AIR
<commit_before>import molwt M_ATMOS = 5.1352e18 # mass of atmosphere, kg # Conversion between ppm CO2 and GtC emissions ppm_gtc = M_ATMOS/1e18*molwt.C/molwt.AIR <commit_msg>Fix import of molwt in constants<commit_after>
from . import molwt M_ATMOS = 5.1352e18 # mass of atmosphere, kg # Conversion between ppm CO2 and GtC emissions ppm_gtc = M_ATMOS/1e18*molwt.C/molwt.AIR
import molwt M_ATMOS = 5.1352e18 # mass of atmosphere, kg # Conversion between ppm CO2 and GtC emissions ppm_gtc = M_ATMOS/1e18*molwt.C/molwt.AIR Fix import of molwt in constantsfrom . import molwt M_ATMOS = 5.1352e18 # mass of atmosphere, kg # Conversion between ppm CO2 and GtC emissions ppm_gtc = M_ATMOS/...
<commit_before>import molwt M_ATMOS = 5.1352e18 # mass of atmosphere, kg # Conversion between ppm CO2 and GtC emissions ppm_gtc = M_ATMOS/1e18*molwt.C/molwt.AIR <commit_msg>Fix import of molwt in constants<commit_after>from . import molwt M_ATMOS = 5.1352e18 # mass of atmosphere, kg # Conversion between ppm C...
7fb7a4f68be4ce23da23914cffc1c5b76fe5fd06
incuna_test_utils/testcases/request.py
incuna_test_utils/testcases/request.py
from django.contrib.auth.models import AnonymousUser from django.test import TestCase, RequestFactory class DummyStorage: def __init__(self): self.store = set() def add(self, level, message, extra_tags=''): self.store.add(message) def __iter__(self): for item in self.store: ...
from django.contrib.auth.models import AnonymousUser from django.test import TestCase, RequestFactory class DummyStorage: def __init__(self): self.store = list() def add(self, level, message, extra_tags=''): self.store.add(message) def __iter__(self): for item in self.store: ...
Use a list for DummyStorage() for ordering.
Use a list for DummyStorage() for ordering.
Python
bsd-2-clause
incuna/incuna-test-utils,incuna/incuna-test-utils
from django.contrib.auth.models import AnonymousUser from django.test import TestCase, RequestFactory class DummyStorage: def __init__(self): self.store = set() def add(self, level, message, extra_tags=''): self.store.add(message) def __iter__(self): for item in self.store: ...
from django.contrib.auth.models import AnonymousUser from django.test import TestCase, RequestFactory class DummyStorage: def __init__(self): self.store = list() def add(self, level, message, extra_tags=''): self.store.add(message) def __iter__(self): for item in self.store: ...
<commit_before>from django.contrib.auth.models import AnonymousUser from django.test import TestCase, RequestFactory class DummyStorage: def __init__(self): self.store = set() def add(self, level, message, extra_tags=''): self.store.add(message) def __iter__(self): for item in se...
from django.contrib.auth.models import AnonymousUser from django.test import TestCase, RequestFactory class DummyStorage: def __init__(self): self.store = list() def add(self, level, message, extra_tags=''): self.store.add(message) def __iter__(self): for item in self.store: ...
from django.contrib.auth.models import AnonymousUser from django.test import TestCase, RequestFactory class DummyStorage: def __init__(self): self.store = set() def add(self, level, message, extra_tags=''): self.store.add(message) def __iter__(self): for item in self.store: ...
<commit_before>from django.contrib.auth.models import AnonymousUser from django.test import TestCase, RequestFactory class DummyStorage: def __init__(self): self.store = set() def add(self, level, message, extra_tags=''): self.store.add(message) def __iter__(self): for item in se...
09a96a308c7666defdc1377e207f9632b9bc9c7a
app.py
app.py
#!flask/bin/python """ Author: Swagger.pro File: app.py Purpose: runs the app! """ from swagip import app app.config.from_object('config') if __name__ == "__main__": app.run(debug=True, host='0.0.0.0')
#!flask/bin/python """ Author: Swagger.pro File: app.py Purpose: runs the app! """ from swagip import app app.config.from_object('config') if __name__ == "__main__": app.run()
Remove debug and all host listener
Remove debug and all host listener
Python
mit
thatarchguy/SwagIP,thatarchguy/SwagIP,thatarchguy/SwagIP
#!flask/bin/python """ Author: Swagger.pro File: app.py Purpose: runs the app! """ from swagip import app app.config.from_object('config') if __name__ == "__main__": app.run(debug=True, host='0.0.0.0') Remove debug and all host listener
#!flask/bin/python """ Author: Swagger.pro File: app.py Purpose: runs the app! """ from swagip import app app.config.from_object('config') if __name__ == "__main__": app.run()
<commit_before>#!flask/bin/python """ Author: Swagger.pro File: app.py Purpose: runs the app! """ from swagip import app app.config.from_object('config') if __name__ == "__main__": app.run(debug=True, host='0.0.0.0') <commit_msg>Remove debug and all host listener<commit_after>
#!flask/bin/python """ Author: Swagger.pro File: app.py Purpose: runs the app! """ from swagip import app app.config.from_object('config') if __name__ == "__main__": app.run()
#!flask/bin/python """ Author: Swagger.pro File: app.py Purpose: runs the app! """ from swagip import app app.config.from_object('config') if __name__ == "__main__": app.run(debug=True, host='0.0.0.0') Remove debug and all host listener#!flask/bin/python """ Author: Swagger.pro File: app.py Purpose: runs the ...
<commit_before>#!flask/bin/python """ Author: Swagger.pro File: app.py Purpose: runs the app! """ from swagip import app app.config.from_object('config') if __name__ == "__main__": app.run(debug=True, host='0.0.0.0') <commit_msg>Remove debug and all host listener<commit_after>#!flask/bin/python """ Author: Sw...
23747dd111d72995942e9d218fc99ce4ec810266
fingerprint/fingerprint_agent.py
fingerprint/fingerprint_agent.py
class FingerprintAgent(object): def __init__(self, request): self.request = request def detect_server_whorls(self): vars = {} # get cookie enabled if self.request.cookies: vars['cookie_enabled'] = 'Yes' else: vars['cookie_enabled'] = 'No' ...
class FingerprintAgent(object): def __init__(self, request): self.request = request def detect_server_whorls(self): vars = {} # get cookie enabled if self.request.cookies: vars['cookie_enabled'] = 'Yes' else: vars['cookie_enabled'] = 'No' ...
Use unicode strings for 'no javascript' just so it's consistent with browser-retrieved values
Use unicode strings for 'no javascript' just so it's consistent with browser-retrieved values
Python
agpl-3.0
EFForg/panopticlick-python,EFForg/panopticlick-python,EFForg/panopticlick-python,EFForg/panopticlick-python
class FingerprintAgent(object): def __init__(self, request): self.request = request def detect_server_whorls(self): vars = {} # get cookie enabled if self.request.cookies: vars['cookie_enabled'] = 'Yes' else: vars['cookie_enabled'] = 'No' ...
class FingerprintAgent(object): def __init__(self, request): self.request = request def detect_server_whorls(self): vars = {} # get cookie enabled if self.request.cookies: vars['cookie_enabled'] = 'Yes' else: vars['cookie_enabled'] = 'No' ...
<commit_before>class FingerprintAgent(object): def __init__(self, request): self.request = request def detect_server_whorls(self): vars = {} # get cookie enabled if self.request.cookies: vars['cookie_enabled'] = 'Yes' else: vars['cookie_enabled']...
class FingerprintAgent(object): def __init__(self, request): self.request = request def detect_server_whorls(self): vars = {} # get cookie enabled if self.request.cookies: vars['cookie_enabled'] = 'Yes' else: vars['cookie_enabled'] = 'No' ...
class FingerprintAgent(object): def __init__(self, request): self.request = request def detect_server_whorls(self): vars = {} # get cookie enabled if self.request.cookies: vars['cookie_enabled'] = 'Yes' else: vars['cookie_enabled'] = 'No' ...
<commit_before>class FingerprintAgent(object): def __init__(self, request): self.request = request def detect_server_whorls(self): vars = {} # get cookie enabled if self.request.cookies: vars['cookie_enabled'] = 'Yes' else: vars['cookie_enabled']...
ea8a78cb7d7cda7b597826a478cce3ab4b0a4b62
django_nose_plugin.py
django_nose_plugin.py
from nose.plugins import Plugin class DjangoNosePlugin(Plugin): ''' Adaptor that allows usage of django_nose package plugin from the nosetests command line. Imports and instantiates django_nose plugin after initialization so that the django environment does not have to be configured when running n...
from nose.plugins import Plugin class DjangoNosePlugin(Plugin): ''' Adaptor that allows usage of django_nose package plugin from the nosetests command line. Imports and instantiates django_nose plugin after initialization so that the django environment does not have to be configured when running n...
Fix issue when running nosetests and django_nose is not required
Fix issue when running nosetests and django_nose is not required
Python
mit
jenniferlianne/django_nose_adapter
from nose.plugins import Plugin class DjangoNosePlugin(Plugin): ''' Adaptor that allows usage of django_nose package plugin from the nosetests command line. Imports and instantiates django_nose plugin after initialization so that the django environment does not have to be configured when running n...
from nose.plugins import Plugin class DjangoNosePlugin(Plugin): ''' Adaptor that allows usage of django_nose package plugin from the nosetests command line. Imports and instantiates django_nose plugin after initialization so that the django environment does not have to be configured when running n...
<commit_before>from nose.plugins import Plugin class DjangoNosePlugin(Plugin): ''' Adaptor that allows usage of django_nose package plugin from the nosetests command line. Imports and instantiates django_nose plugin after initialization so that the django environment does not have to be configured ...
from nose.plugins import Plugin class DjangoNosePlugin(Plugin): ''' Adaptor that allows usage of django_nose package plugin from the nosetests command line. Imports and instantiates django_nose plugin after initialization so that the django environment does not have to be configured when running n...
from nose.plugins import Plugin class DjangoNosePlugin(Plugin): ''' Adaptor that allows usage of django_nose package plugin from the nosetests command line. Imports and instantiates django_nose plugin after initialization so that the django environment does not have to be configured when running n...
<commit_before>from nose.plugins import Plugin class DjangoNosePlugin(Plugin): ''' Adaptor that allows usage of django_nose package plugin from the nosetests command line. Imports and instantiates django_nose plugin after initialization so that the django environment does not have to be configured ...
7a66b9fb3482778cd0efab692cbc535260bcad25
publishconf.py
publishconf.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'http://dicasdejava.com.br' RELATIVE_URLS = Fa...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'http://dicasdejava.com.br' RELATIVE_URLS = Fa...
Remove minify plugin to test search.
Remove minify plugin to test search.
Python
mit
gustavofoa/dicasdejava.com.br,gustavofoa/dicasdejava.com.br,gustavofoa/dicasdejava.com.br,gustavofoa/dicasdejava.com.br,gustavofoa/dicasdejava.com.br
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'http://dicasdejava.com.br' RELATIVE_URLS = Fa...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'http://dicasdejava.com.br' RELATIVE_URLS = Fa...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'http://dicasdejava.com.br' REL...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'http://dicasdejava.com.br' RELATIVE_URLS = Fa...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'http://dicasdejava.com.br' RELATIVE_URLS = Fa...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'http://dicasdejava.com.br' REL...
7303afd415cd6867908c6a5108d3604fafb0c8a0
blockbuster/example_config_files/example_config.py
blockbuster/example_config_files/example_config.py
# General Settings timerestriction = False debug_mode = True # Email Settings # emailtype = "Gmail" emailtype = "Console" # SMS Settings # outboundsmstype = "WebService" outboundsmstype = "Console" # Twilio Auth Keys account_sid = "twilio sid here" auth_token = "auth token here" # SMS Services Auth basic_auth = 'ba...
# General Settings timerestriction = False debug_mode = True log_directory = './logs' # Email Settings # emailtype = "Gmail" emailtype = "Console" # SMS Settings # outboundsmstype = "WebService" outboundsmstype = "Console" # Twilio Auth Keys account_sid = "twilio sid here" auth_token = "auth token here" # SMS Servi...
Add new configuration setting for log_directory
Add new configuration setting for log_directory
Python
mit
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
# General Settings timerestriction = False debug_mode = True # Email Settings # emailtype = "Gmail" emailtype = "Console" # SMS Settings # outboundsmstype = "WebService" outboundsmstype = "Console" # Twilio Auth Keys account_sid = "twilio sid here" auth_token = "auth token here" # SMS Services Auth basic_auth = 'ba...
# General Settings timerestriction = False debug_mode = True log_directory = './logs' # Email Settings # emailtype = "Gmail" emailtype = "Console" # SMS Settings # outboundsmstype = "WebService" outboundsmstype = "Console" # Twilio Auth Keys account_sid = "twilio sid here" auth_token = "auth token here" # SMS Servi...
<commit_before># General Settings timerestriction = False debug_mode = True # Email Settings # emailtype = "Gmail" emailtype = "Console" # SMS Settings # outboundsmstype = "WebService" outboundsmstype = "Console" # Twilio Auth Keys account_sid = "twilio sid here" auth_token = "auth token here" # SMS Services Auth b...
# General Settings timerestriction = False debug_mode = True log_directory = './logs' # Email Settings # emailtype = "Gmail" emailtype = "Console" # SMS Settings # outboundsmstype = "WebService" outboundsmstype = "Console" # Twilio Auth Keys account_sid = "twilio sid here" auth_token = "auth token here" # SMS Servi...
# General Settings timerestriction = False debug_mode = True # Email Settings # emailtype = "Gmail" emailtype = "Console" # SMS Settings # outboundsmstype = "WebService" outboundsmstype = "Console" # Twilio Auth Keys account_sid = "twilio sid here" auth_token = "auth token here" # SMS Services Auth basic_auth = 'ba...
<commit_before># General Settings timerestriction = False debug_mode = True # Email Settings # emailtype = "Gmail" emailtype = "Console" # SMS Settings # outboundsmstype = "WebService" outboundsmstype = "Console" # Twilio Auth Keys account_sid = "twilio sid here" auth_token = "auth token here" # SMS Services Auth b...
c6ffb39cc730809781e8dabff4458fd167e60123
app.py
app.py
from flask import Flask app = Flask(__name__) @app.route('/') def index(): return '<H1>Measure Anything</H1>' if __name__ == '__main__': app.run(debug=True)
from flask import Flask from flask.ext.script import Manager app = Flask(__name__) manager = Manager(app) @app.route('/') def index(): return '<H1>Measure Anything</H1>' if __name__ == '__main__': manager.run()
Use flask-script so command line parameters can be used.
Use flask-script so command line parameters can be used.
Python
mit
rahimnathwani/measure-anything
from flask import Flask app = Flask(__name__) @app.route('/') def index(): return '<H1>Measure Anything</H1>' if __name__ == '__main__': app.run(debug=True)Use flask-script so command line parameters can be used.
from flask import Flask from flask.ext.script import Manager app = Flask(__name__) manager = Manager(app) @app.route('/') def index(): return '<H1>Measure Anything</H1>' if __name__ == '__main__': manager.run()
<commit_before>from flask import Flask app = Flask(__name__) @app.route('/') def index(): return '<H1>Measure Anything</H1>' if __name__ == '__main__': app.run(debug=True)<commit_msg>Use flask-script so command line parameters can be used.<commit_after>
from flask import Flask from flask.ext.script import Manager app = Flask(__name__) manager = Manager(app) @app.route('/') def index(): return '<H1>Measure Anything</H1>' if __name__ == '__main__': manager.run()
from flask import Flask app = Flask(__name__) @app.route('/') def index(): return '<H1>Measure Anything</H1>' if __name__ == '__main__': app.run(debug=True)Use flask-script so command line parameters can be used.from flask import Flask from flask.ext.script import Manager app = Flask(__name__) manager = Manager(ap...
<commit_before>from flask import Flask app = Flask(__name__) @app.route('/') def index(): return '<H1>Measure Anything</H1>' if __name__ == '__main__': app.run(debug=True)<commit_msg>Use flask-script so command line parameters can be used.<commit_after>from flask import Flask from flask.ext.script import Manager a...
8bc9d9dd548cb2e19a51fb33336695ca3925ba64
tests/python/unittest/test_random.py
tests/python/unittest/test_random.py
import os import mxnet as mx import numpy as np def same(a, b): return np.sum(a != b) == 0 def check_with_device(device): with mx.Context(device): a, b = -10, 10 mu, sigma = 10, 2 for i in range(5): shape = (100 + i, 100 + i) mx.random.seed(128) ret1...
import os import mxnet as mx import numpy as np def same(a, b): return np.sum(a != b) == 0 def check_with_device(device): with mx.Context(device): a, b = -10, 10 mu, sigma = 10, 2 shape = (100, 100) mx.random.seed(128) ret1 = mx.random.normal(mu, sigma, shape) u...
Revert "Update random number generator test"
Revert "Update random number generator test" This reverts commit b63bda37aa2e9b5251cf6c54d59785d2856659ca.
Python
apache-2.0
sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet
import os import mxnet as mx import numpy as np def same(a, b): return np.sum(a != b) == 0 def check_with_device(device): with mx.Context(device): a, b = -10, 10 mu, sigma = 10, 2 for i in range(5): shape = (100 + i, 100 + i) mx.random.seed(128) ret1...
import os import mxnet as mx import numpy as np def same(a, b): return np.sum(a != b) == 0 def check_with_device(device): with mx.Context(device): a, b = -10, 10 mu, sigma = 10, 2 shape = (100, 100) mx.random.seed(128) ret1 = mx.random.normal(mu, sigma, shape) u...
<commit_before>import os import mxnet as mx import numpy as np def same(a, b): return np.sum(a != b) == 0 def check_with_device(device): with mx.Context(device): a, b = -10, 10 mu, sigma = 10, 2 for i in range(5): shape = (100 + i, 100 + i) mx.random.seed(128) ...
import os import mxnet as mx import numpy as np def same(a, b): return np.sum(a != b) == 0 def check_with_device(device): with mx.Context(device): a, b = -10, 10 mu, sigma = 10, 2 shape = (100, 100) mx.random.seed(128) ret1 = mx.random.normal(mu, sigma, shape) u...
import os import mxnet as mx import numpy as np def same(a, b): return np.sum(a != b) == 0 def check_with_device(device): with mx.Context(device): a, b = -10, 10 mu, sigma = 10, 2 for i in range(5): shape = (100 + i, 100 + i) mx.random.seed(128) ret1...
<commit_before>import os import mxnet as mx import numpy as np def same(a, b): return np.sum(a != b) == 0 def check_with_device(device): with mx.Context(device): a, b = -10, 10 mu, sigma = 10, 2 for i in range(5): shape = (100 + i, 100 + i) mx.random.seed(128) ...
0e66044b3949255be2653c0cffee53b003ea3929
solum/api/controllers/v1/pub/trigger.py
solum/api/controllers/v1/pub/trigger.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Fix pecan error message not available in body for Trigger.post
Fix pecan error message not available in body for Trigger.post When a trigger_id resource is not found, the API returns a 202 status code, the error message could not be added in the body of the request because pecan.response.text was used instead of pecan.response.body. Change-Id: I8b03210b5a2f2b5c0ea24bfc8149cca122...
Python
apache-2.0
ed-/solum,stackforge/solum,ed-/solum,devdattakulkarni/test-solum,gilbertpilz/solum,ed-/solum,openstack/solum,gilbertpilz/solum,ed-/solum,devdattakulkarni/test-solum,openstack/solum,gilbertpilz/solum,stackforge/solum,gilbertpilz/solum
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # dist...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # dist...
2add55f78d6b5efb097f8a4d089b2eced80d0882
chrome/common/extensions/docs/server2/fake_host_file_system_provider.py
chrome/common/extensions/docs/server2/fake_host_file_system_provider.py
#!/usr/bin/env python # 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 mock_file_system import MockFileSystem from test_file_system import TestFileSystem from third_party.json_schema_compiler.memoize i...
# 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 mock_file_system import MockFileSystem from test_file_system import TestFileSystem from third_party.json_schema_compiler.memoize import memoize class F...
Remove shebang line from non-executable .py file.
Remove shebang line from non-executable .py file. Fixes checkperms failure on the main waterfall: http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Full/builds/30316/steps/check_perms/logs/stdio /b/build/slave/Linux_ChromiumOS/build/src/chrome/common/extensions/docs/server2/fake_host_file_...
Python
bsd-3-clause
dednal/chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,ondra-novak/chromium.src,dushu1203/chromium.src,TheTyp...
#!/usr/bin/env python # 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 mock_file_system import MockFileSystem from test_file_system import TestFileSystem from third_party.json_schema_compiler.memoize i...
# 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 mock_file_system import MockFileSystem from test_file_system import TestFileSystem from third_party.json_schema_compiler.memoize import memoize class F...
<commit_before>#!/usr/bin/env python # 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 mock_file_system import MockFileSystem from test_file_system import TestFileSystem from third_party.json_schema_com...
# 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 mock_file_system import MockFileSystem from test_file_system import TestFileSystem from third_party.json_schema_compiler.memoize import memoize class F...
#!/usr/bin/env python # 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 mock_file_system import MockFileSystem from test_file_system import TestFileSystem from third_party.json_schema_compiler.memoize i...
<commit_before>#!/usr/bin/env python # 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 mock_file_system import MockFileSystem from test_file_system import TestFileSystem from third_party.json_schema_com...
96c14567ee54033a11bf1f8bc3b3eb0058c092f7
manoseimas/compatibility_test/admin.py
manoseimas/compatibility_test/admin.py
from django.contrib import admin from manoseimas.compatibility_test.models import CompatTest from manoseimas.compatibility_test.models import Topic from manoseimas.compatibility_test.models import TopicVoting from manoseimas.compatibility_test.models import Argument from manoseimas.compatibility_test.models import Tes...
from django.contrib import admin from manoseimas.compatibility_test import models class VotingInline(admin.TabularInline): model = models.TopicVoting raw_id_fields = [ 'voting', ] class ArgumentInline(admin.TabularInline): model = models.Argument class TopicAdmin(admin.ModelAdmin): li...
Fix really strange bug about conflicting models
Fix really strange bug about conflicting models The bug: Failure: RuntimeError (Conflicting 'c' models in application 'nose': <class 'manoseimas.compatibility_test.admin.TestGroup'> and <class 'nose.util.C'>.) ... ERROR ====================================================================== ERROR: Failure...
Python
agpl-3.0
ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt
from django.contrib import admin from manoseimas.compatibility_test.models import CompatTest from manoseimas.compatibility_test.models import Topic from manoseimas.compatibility_test.models import TopicVoting from manoseimas.compatibility_test.models import Argument from manoseimas.compatibility_test.models import Tes...
from django.contrib import admin from manoseimas.compatibility_test import models class VotingInline(admin.TabularInline): model = models.TopicVoting raw_id_fields = [ 'voting', ] class ArgumentInline(admin.TabularInline): model = models.Argument class TopicAdmin(admin.ModelAdmin): li...
<commit_before>from django.contrib import admin from manoseimas.compatibility_test.models import CompatTest from manoseimas.compatibility_test.models import Topic from manoseimas.compatibility_test.models import TopicVoting from manoseimas.compatibility_test.models import Argument from manoseimas.compatibility_test.mo...
from django.contrib import admin from manoseimas.compatibility_test import models class VotingInline(admin.TabularInline): model = models.TopicVoting raw_id_fields = [ 'voting', ] class ArgumentInline(admin.TabularInline): model = models.Argument class TopicAdmin(admin.ModelAdmin): li...
from django.contrib import admin from manoseimas.compatibility_test.models import CompatTest from manoseimas.compatibility_test.models import Topic from manoseimas.compatibility_test.models import TopicVoting from manoseimas.compatibility_test.models import Argument from manoseimas.compatibility_test.models import Tes...
<commit_before>from django.contrib import admin from manoseimas.compatibility_test.models import CompatTest from manoseimas.compatibility_test.models import Topic from manoseimas.compatibility_test.models import TopicVoting from manoseimas.compatibility_test.models import Argument from manoseimas.compatibility_test.mo...
48b6bb91537d9daecca2bc112f5e06dc9b530f09
scripts/c2s-info.py
scripts/c2s-info.py
#!/usr/bin/env python """ Summarize dataset. Examples: c2s info data.pck """ import sys from argparse import ArgumentParser from pickle import dump from scipy.io import savemat from numpy import corrcoef, mean from c2s import load_data def main(argv): parser = ArgumentParser(argv[0], description=__doc__) parse...
#!/usr/bin/env python """ Summarize dataset. Examples: c2s info data.pck """ import sys from argparse import ArgumentParser from pickle import dump from scipy.io import savemat from numpy import corrcoef, mean, unique from c2s import load_data def main(argv): parser = ArgumentParser(argv[0], description=__doc__...
Print a little bit more info.
Print a little bit more info.
Python
mit
lucastheis/c2s,jonasrauber/c2s
#!/usr/bin/env python """ Summarize dataset. Examples: c2s info data.pck """ import sys from argparse import ArgumentParser from pickle import dump from scipy.io import savemat from numpy import corrcoef, mean from c2s import load_data def main(argv): parser = ArgumentParser(argv[0], description=__doc__) parse...
#!/usr/bin/env python """ Summarize dataset. Examples: c2s info data.pck """ import sys from argparse import ArgumentParser from pickle import dump from scipy.io import savemat from numpy import corrcoef, mean, unique from c2s import load_data def main(argv): parser = ArgumentParser(argv[0], description=__doc__...
<commit_before>#!/usr/bin/env python """ Summarize dataset. Examples: c2s info data.pck """ import sys from argparse import ArgumentParser from pickle import dump from scipy.io import savemat from numpy import corrcoef, mean from c2s import load_data def main(argv): parser = ArgumentParser(argv[0], description=...
#!/usr/bin/env python """ Summarize dataset. Examples: c2s info data.pck """ import sys from argparse import ArgumentParser from pickle import dump from scipy.io import savemat from numpy import corrcoef, mean, unique from c2s import load_data def main(argv): parser = ArgumentParser(argv[0], description=__doc__...
#!/usr/bin/env python """ Summarize dataset. Examples: c2s info data.pck """ import sys from argparse import ArgumentParser from pickle import dump from scipy.io import savemat from numpy import corrcoef, mean from c2s import load_data def main(argv): parser = ArgumentParser(argv[0], description=__doc__) parse...
<commit_before>#!/usr/bin/env python """ Summarize dataset. Examples: c2s info data.pck """ import sys from argparse import ArgumentParser from pickle import dump from scipy.io import savemat from numpy import corrcoef, mean from c2s import load_data def main(argv): parser = ArgumentParser(argv[0], description=...
2e95e3b9badf9c860b98bca6a4edb1d4fac358a9
setup.py
setup.py
from roku import __version__ from setuptools import setup, find_packages import os f = open(os.path.join(os.path.dirname(__file__), 'README.rst')) readme = f.read() f.close() setup( name='python-roku', version=__version__, description='Client for the Roku media player', long_description=readme, au...
from roku import __version__ from setuptools import setup, find_packages import os f = open(os.path.join(os.path.dirname(__file__), 'README.rst')) readme = f.read() f.close() setup( name='roku', version=__version__, description='Client for the Roku media player', long_description=readme, author='J...
Change name of package to roku
Change name of package to roku
Python
bsd-3-clause
jcarbaugh/python-roku
from roku import __version__ from setuptools import setup, find_packages import os f = open(os.path.join(os.path.dirname(__file__), 'README.rst')) readme = f.read() f.close() setup( name='python-roku', version=__version__, description='Client for the Roku media player', long_description=readme, au...
from roku import __version__ from setuptools import setup, find_packages import os f = open(os.path.join(os.path.dirname(__file__), 'README.rst')) readme = f.read() f.close() setup( name='roku', version=__version__, description='Client for the Roku media player', long_description=readme, author='J...
<commit_before>from roku import __version__ from setuptools import setup, find_packages import os f = open(os.path.join(os.path.dirname(__file__), 'README.rst')) readme = f.read() f.close() setup( name='python-roku', version=__version__, description='Client for the Roku media player', long_description...
from roku import __version__ from setuptools import setup, find_packages import os f = open(os.path.join(os.path.dirname(__file__), 'README.rst')) readme = f.read() f.close() setup( name='roku', version=__version__, description='Client for the Roku media player', long_description=readme, author='J...
from roku import __version__ from setuptools import setup, find_packages import os f = open(os.path.join(os.path.dirname(__file__), 'README.rst')) readme = f.read() f.close() setup( name='python-roku', version=__version__, description='Client for the Roku media player', long_description=readme, au...
<commit_before>from roku import __version__ from setuptools import setup, find_packages import os f = open(os.path.join(os.path.dirname(__file__), 'README.rst')) readme = f.read() f.close() setup( name='python-roku', version=__version__, description='Client for the Roku media player', long_description...
d08d78460d0f7143b90a5157c4f5450bb062ec75
im2sim.py
im2sim.py
import argparse import PIL from PIL import Image import subprocess import os import glob def get_image(filename): p = Image.open(filename) docker_image = p.info['im2sim_image'] return subprocess.call('docker pull {}'.format(docker_image), shell=True) print('Pulled docker image {}'.format(docker_image)...
import argparse import PIL from PIL import Image import subprocess import os import glob def get_image(filename): p = Image.open(filename) docker_image = p.info['im2sim_image'] return subprocess.call('docker pull {}'.format(docker_image), shell=True) print('Pulled docker image {}'.format(docker_image)...
Make script consistent with instructions.
Make script consistent with instructions.
Python
mit
IanHawke/im2sim
import argparse import PIL from PIL import Image import subprocess import os import glob def get_image(filename): p = Image.open(filename) docker_image = p.info['im2sim_image'] return subprocess.call('docker pull {}'.format(docker_image), shell=True) print('Pulled docker image {}'.format(docker_image)...
import argparse import PIL from PIL import Image import subprocess import os import glob def get_image(filename): p = Image.open(filename) docker_image = p.info['im2sim_image'] return subprocess.call('docker pull {}'.format(docker_image), shell=True) print('Pulled docker image {}'.format(docker_image)...
<commit_before>import argparse import PIL from PIL import Image import subprocess import os import glob def get_image(filename): p = Image.open(filename) docker_image = p.info['im2sim_image'] return subprocess.call('docker pull {}'.format(docker_image), shell=True) print('Pulled docker image {}'.forma...
import argparse import PIL from PIL import Image import subprocess import os import glob def get_image(filename): p = Image.open(filename) docker_image = p.info['im2sim_image'] return subprocess.call('docker pull {}'.format(docker_image), shell=True) print('Pulled docker image {}'.format(docker_image)...
import argparse import PIL from PIL import Image import subprocess import os import glob def get_image(filename): p = Image.open(filename) docker_image = p.info['im2sim_image'] return subprocess.call('docker pull {}'.format(docker_image), shell=True) print('Pulled docker image {}'.format(docker_image)...
<commit_before>import argparse import PIL from PIL import Image import subprocess import os import glob def get_image(filename): p = Image.open(filename) docker_image = p.info['im2sim_image'] return subprocess.call('docker pull {}'.format(docker_image), shell=True) print('Pulled docker image {}'.forma...
7cc2a54dff4dc801306f5f41633ea7edbcc061c5
setup.py
setup.py
import os from os.path import relpath, join from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def find_package_data(data_root, package_root): files = [] for root, dirnames, filenames in os.walk(data_root): for fn in filenames: ...
import os from os.path import relpath, join from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def find_package_data(data_root, package_root): files = [] for root, dirnames, filenames in os.walk(data_root): for fn in filenames: ...
Increment version number for release
Increment version number for release
Python
mit
openforcefield/openff-toolkit,open-forcefield-group/openforcefield,open-forcefield-group/openforcefield,open-forcefield-group/openforcefield,openforcefield/openff-toolkit
import os from os.path import relpath, join from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def find_package_data(data_root, package_root): files = [] for root, dirnames, filenames in os.walk(data_root): for fn in filenames: ...
import os from os.path import relpath, join from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def find_package_data(data_root, package_root): files = [] for root, dirnames, filenames in os.walk(data_root): for fn in filenames: ...
<commit_before>import os from os.path import relpath, join from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def find_package_data(data_root, package_root): files = [] for root, dirnames, filenames in os.walk(data_root): for fn in file...
import os from os.path import relpath, join from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def find_package_data(data_root, package_root): files = [] for root, dirnames, filenames in os.walk(data_root): for fn in filenames: ...
import os from os.path import relpath, join from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def find_package_data(data_root, package_root): files = [] for root, dirnames, filenames in os.walk(data_root): for fn in filenames: ...
<commit_before>import os from os.path import relpath, join from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def find_package_data(data_root, package_root): files = [] for root, dirnames, filenames in os.walk(data_root): for fn in file...
706c0b16600e69f911bcd5632be95ec528d688dd
setup.py
setup.py
from setuptools import setup def readme(): with open('README.rst') as readme_file: return readme_file.read() configuration = { 'name' : 'hypergraph', 'version' : '0.1', 'description' : 'Hypergraph tools and algorithms', 'long_description' : readme(), 'classifiers' : [ 'Developm...
from setuptools import setup def readme(): with open('README.rst') as readme_file: return readme_file.read() configuration = { 'name' : 'hypergraph', 'version' : '0.1', 'description' : 'Hypergraph tools and algorithms', 'long_description' : readme(), 'classifiers' : [ 'Developm...
Update requirements to include networkx
Update requirements to include networkx
Python
lgpl-2.1
lmcinnes/hypergraph
from setuptools import setup def readme(): with open('README.rst') as readme_file: return readme_file.read() configuration = { 'name' : 'hypergraph', 'version' : '0.1', 'description' : 'Hypergraph tools and algorithms', 'long_description' : readme(), 'classifiers' : [ 'Developm...
from setuptools import setup def readme(): with open('README.rst') as readme_file: return readme_file.read() configuration = { 'name' : 'hypergraph', 'version' : '0.1', 'description' : 'Hypergraph tools and algorithms', 'long_description' : readme(), 'classifiers' : [ 'Developm...
<commit_before>from setuptools import setup def readme(): with open('README.rst') as readme_file: return readme_file.read() configuration = { 'name' : 'hypergraph', 'version' : '0.1', 'description' : 'Hypergraph tools and algorithms', 'long_description' : readme(), 'classifiers' : [ ...
from setuptools import setup def readme(): with open('README.rst') as readme_file: return readme_file.read() configuration = { 'name' : 'hypergraph', 'version' : '0.1', 'description' : 'Hypergraph tools and algorithms', 'long_description' : readme(), 'classifiers' : [ 'Developm...
from setuptools import setup def readme(): with open('README.rst') as readme_file: return readme_file.read() configuration = { 'name' : 'hypergraph', 'version' : '0.1', 'description' : 'Hypergraph tools and algorithms', 'long_description' : readme(), 'classifiers' : [ 'Developm...
<commit_before>from setuptools import setup def readme(): with open('README.rst') as readme_file: return readme_file.read() configuration = { 'name' : 'hypergraph', 'version' : '0.1', 'description' : 'Hypergraph tools and algorithms', 'long_description' : readme(), 'classifiers' : [ ...
7fd7ce41e388a2014cd30a641f1fb3b35661af40
setup.py
setup.py
from setuptools import setup,find_packages setup ( name = 'pymatgen', version = '1.0.2', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires = ['numpy','scipy','matplotlib','PyCIFRW'], author = 'Shyue Ping Ong, Anubhav Jain, Michael Kocher, Dan Gunter', aut...
from setuptools import setup,find_packages setup ( name = 'pymatgen', version = '1.0.3', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires = ['numpy','scipy','matplotlib','PyCIFRW'], author = 'Shyue Ping Ong, Anubhav Jain, Michael Kocher, Dan Gunter', aut...
Update to v1.0.3 given all the bug fixes.
Update to v1.0.3 given all the bug fixes. Former-commit-id: 0aebb52391a2dea2aabf08879335df01775d02ab [formerly 65ccbe5c10f2c1b54e1736caf7d8d88c7345610f] Former-commit-id: 1e823ba824b20ed7641ff7360c6b50184562b3bd
Python
mit
mbkumar/pymatgen,davidwaroquiers/pymatgen,Bismarrck/pymatgen,Bismarrck/pymatgen,richardtran415/pymatgen,gpetretto/pymatgen,gVallverdu/pymatgen,johnson1228/pymatgen,czhengsci/pymatgen,xhqu1981/pymatgen,johnson1228/pymatgen,vorwerkc/pymatgen,montoyjh/pymatgen,setten/pymatgen,setten/pymatgen,blondegeek/pymatgen,richardtra...
from setuptools import setup,find_packages setup ( name = 'pymatgen', version = '1.0.2', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires = ['numpy','scipy','matplotlib','PyCIFRW'], author = 'Shyue Ping Ong, Anubhav Jain, Michael Kocher, Dan Gunter', aut...
from setuptools import setup,find_packages setup ( name = 'pymatgen', version = '1.0.3', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires = ['numpy','scipy','matplotlib','PyCIFRW'], author = 'Shyue Ping Ong, Anubhav Jain, Michael Kocher, Dan Gunter', aut...
<commit_before>from setuptools import setup,find_packages setup ( name = 'pymatgen', version = '1.0.2', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires = ['numpy','scipy','matplotlib','PyCIFRW'], author = 'Shyue Ping Ong, Anubhav Jain, Michael Kocher, Dan...
from setuptools import setup,find_packages setup ( name = 'pymatgen', version = '1.0.3', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires = ['numpy','scipy','matplotlib','PyCIFRW'], author = 'Shyue Ping Ong, Anubhav Jain, Michael Kocher, Dan Gunter', aut...
from setuptools import setup,find_packages setup ( name = 'pymatgen', version = '1.0.2', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires = ['numpy','scipy','matplotlib','PyCIFRW'], author = 'Shyue Ping Ong, Anubhav Jain, Michael Kocher, Dan Gunter', aut...
<commit_before>from setuptools import setup,find_packages setup ( name = 'pymatgen', version = '1.0.2', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires = ['numpy','scipy','matplotlib','PyCIFRW'], author = 'Shyue Ping Ong, Anubhav Jain, Michael Kocher, Dan...
03a5c3ce6c3c5c3238068f7e52d7f482eeebf7fb
setup.py
setup.py
#!/usr/bin/env python # coding: utf-8 """ setup.py ~~~~~~~~ Installs marvin as a package. """ from setuptools import setup, find_packages setup( name='marvin', version='0.1.0', author='Tarjei Husøy', author_email='tarjei@roms.no', url='https://github.com/streamr/marvin', descript...
#!/usr/bin/env python # coding: utf-8 """ setup.py ~~~~~~~~ Installs marvin as a package. """ from setuptools import setup, find_packages setup( name='marvin', version='0.1.0', author='Tarjei Husøy', author_email='tarjei@roms.no', url='https://github.com/streamr/marvin', descript...
Add templates to the build.
Add templates to the build.
Python
mit
streamr/marvin,streamr/marvin,streamr/marvin
#!/usr/bin/env python # coding: utf-8 """ setup.py ~~~~~~~~ Installs marvin as a package. """ from setuptools import setup, find_packages setup( name='marvin', version='0.1.0', author='Tarjei Husøy', author_email='tarjei@roms.no', url='https://github.com/streamr/marvin', descript...
#!/usr/bin/env python # coding: utf-8 """ setup.py ~~~~~~~~ Installs marvin as a package. """ from setuptools import setup, find_packages setup( name='marvin', version='0.1.0', author='Tarjei Husøy', author_email='tarjei@roms.no', url='https://github.com/streamr/marvin', descript...
<commit_before>#!/usr/bin/env python # coding: utf-8 """ setup.py ~~~~~~~~ Installs marvin as a package. """ from setuptools import setup, find_packages setup( name='marvin', version='0.1.0', author='Tarjei Husøy', author_email='tarjei@roms.no', url='https://github.com/streamr/marvin...
#!/usr/bin/env python # coding: utf-8 """ setup.py ~~~~~~~~ Installs marvin as a package. """ from setuptools import setup, find_packages setup( name='marvin', version='0.1.0', author='Tarjei Husøy', author_email='tarjei@roms.no', url='https://github.com/streamr/marvin', descript...
#!/usr/bin/env python # coding: utf-8 """ setup.py ~~~~~~~~ Installs marvin as a package. """ from setuptools import setup, find_packages setup( name='marvin', version='0.1.0', author='Tarjei Husøy', author_email='tarjei@roms.no', url='https://github.com/streamr/marvin', descript...
<commit_before>#!/usr/bin/env python # coding: utf-8 """ setup.py ~~~~~~~~ Installs marvin as a package. """ from setuptools import setup, find_packages setup( name='marvin', version='0.1.0', author='Tarjei Husøy', author_email='tarjei@roms.no', url='https://github.com/streamr/marvin...
082d53c48dc37b5c8edd3781bd1f40234c922db2
APITaxi/test_settings.py
APITaxi/test_settings.py
DEBUG = True SECRET_KEY = 'super-secret' SQLALCHEMY_DATABASE_URI = 'postgresql://vincent:vincent@localhost/odtaxi_test' REDIS_URL = "redis://:@localhost:6379/0" REDIS_GEOINDEX = 'geoindex' SQLALCHEMY_POOL_SIZE = 2 SECURITY_PASSWORD_HASH = 'plaintext' NOW = 'time_test'
DEBUG = True SECRET_KEY = 'super-secret' SQLALCHEMY_DATABASE_URI = 'postgresql://vincent:vincent@localhost/odtaxi_test' REDIS_URL = "redis://:@localhost:6379/0" REDIS_GEOINDEX = 'geoindex' SQLALCHEMY_POOL_SIZE = 2 SECURITY_PASSWORD_HASH = 'plaintext' NOW = 'time_test' DOGPILE_CACHE_BACKEND = 'dogpile.cache.null'
Use null cache in tests
Use null cache in tests
Python
agpl-3.0
openmaraude/APITaxi,l-vincent-l/APITaxi,openmaraude/APITaxi,l-vincent-l/APITaxi
DEBUG = True SECRET_KEY = 'super-secret' SQLALCHEMY_DATABASE_URI = 'postgresql://vincent:vincent@localhost/odtaxi_test' REDIS_URL = "redis://:@localhost:6379/0" REDIS_GEOINDEX = 'geoindex' SQLALCHEMY_POOL_SIZE = 2 SECURITY_PASSWORD_HASH = 'plaintext' NOW = 'time_test' Use null cache in tests
DEBUG = True SECRET_KEY = 'super-secret' SQLALCHEMY_DATABASE_URI = 'postgresql://vincent:vincent@localhost/odtaxi_test' REDIS_URL = "redis://:@localhost:6379/0" REDIS_GEOINDEX = 'geoindex' SQLALCHEMY_POOL_SIZE = 2 SECURITY_PASSWORD_HASH = 'plaintext' NOW = 'time_test' DOGPILE_CACHE_BACKEND = 'dogpile.cache.null'
<commit_before>DEBUG = True SECRET_KEY = 'super-secret' SQLALCHEMY_DATABASE_URI = 'postgresql://vincent:vincent@localhost/odtaxi_test' REDIS_URL = "redis://:@localhost:6379/0" REDIS_GEOINDEX = 'geoindex' SQLALCHEMY_POOL_SIZE = 2 SECURITY_PASSWORD_HASH = 'plaintext' NOW = 'time_test' <commit_msg>Use null cache in test...
DEBUG = True SECRET_KEY = 'super-secret' SQLALCHEMY_DATABASE_URI = 'postgresql://vincent:vincent@localhost/odtaxi_test' REDIS_URL = "redis://:@localhost:6379/0" REDIS_GEOINDEX = 'geoindex' SQLALCHEMY_POOL_SIZE = 2 SECURITY_PASSWORD_HASH = 'plaintext' NOW = 'time_test' DOGPILE_CACHE_BACKEND = 'dogpile.cache.null'
DEBUG = True SECRET_KEY = 'super-secret' SQLALCHEMY_DATABASE_URI = 'postgresql://vincent:vincent@localhost/odtaxi_test' REDIS_URL = "redis://:@localhost:6379/0" REDIS_GEOINDEX = 'geoindex' SQLALCHEMY_POOL_SIZE = 2 SECURITY_PASSWORD_HASH = 'plaintext' NOW = 'time_test' Use null cache in testsDEBUG = True SECRET_KEY = ...
<commit_before>DEBUG = True SECRET_KEY = 'super-secret' SQLALCHEMY_DATABASE_URI = 'postgresql://vincent:vincent@localhost/odtaxi_test' REDIS_URL = "redis://:@localhost:6379/0" REDIS_GEOINDEX = 'geoindex' SQLALCHEMY_POOL_SIZE = 2 SECURITY_PASSWORD_HASH = 'plaintext' NOW = 'time_test' <commit_msg>Use null cache in test...
cd9a5d62a7d13b8526a68394508c48cbfc443bba
setup.py
setup.py
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from config import get_version from distutils.command.install import INSTALL_SCHEMES setup(name='datadog-agent', ...
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from config import get_version from distutils.command.install import INSTALL_SCHEMES setup(name='datadog-agent', ...
Add compat/ files in packaging
Add compat/ files in packaging
Python
bsd-3-clause
AniruddhaSAtre/dd-agent,oneandoneis2/dd-agent,a20012251/dd-agent,joelvanvelden/dd-agent,packetloop/dd-agent,huhongbo/dd-agent,AniruddhaSAtre/dd-agent,manolama/dd-agent,joelvanvelden/dd-agent,jamesandariese/dd-agent,eeroniemi/dd-agent,manolama/dd-agent,eeroniemi/dd-agent,AntoCard/powerdns-recursor_check,AntoCard/powerdn...
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from config import get_version from distutils.command.install import INSTALL_SCHEMES setup(name='datadog-agent', ...
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from config import get_version from distutils.command.install import INSTALL_SCHEMES setup(name='datadog-agent', ...
<commit_before>#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from config import get_version from distutils.command.install import INSTALL_SCHEMES setup(name='d...
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from config import get_version from distutils.command.install import INSTALL_SCHEMES setup(name='datadog-agent', ...
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from config import get_version from distutils.command.install import INSTALL_SCHEMES setup(name='datadog-agent', ...
<commit_before>#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from config import get_version from distutils.command.install import INSTALL_SCHEMES setup(name='d...
9bb48f43c5b7b026d74710860e5427c4e0ec71dd
valohai_yaml/objs/input.py
valohai_yaml/objs/input.py
from enum import Enum from .base import Item class KeepDirectories(Enum): NONE = 'none' SUFFIX = 'suffix' FULL = 'full' @classmethod def cast(cls, value): if not value: return KeepDirectories.NONE if value is True: return KeepDirectories.FULL retur...
from enum import Enum from .base import Item class KeepDirectories(Enum): NONE = 'none' SUFFIX = 'suffix' FULL = 'full' @classmethod def cast(cls, value): if not value: return KeepDirectories.NONE if value is True: return KeepDirectories.FULL retur...
Remove trailing comma not compatible with Python 3.5
Remove trailing comma not compatible with Python 3.5
Python
mit
valohai/valohai-yaml
from enum import Enum from .base import Item class KeepDirectories(Enum): NONE = 'none' SUFFIX = 'suffix' FULL = 'full' @classmethod def cast(cls, value): if not value: return KeepDirectories.NONE if value is True: return KeepDirectories.FULL retur...
from enum import Enum from .base import Item class KeepDirectories(Enum): NONE = 'none' SUFFIX = 'suffix' FULL = 'full' @classmethod def cast(cls, value): if not value: return KeepDirectories.NONE if value is True: return KeepDirectories.FULL retur...
<commit_before>from enum import Enum from .base import Item class KeepDirectories(Enum): NONE = 'none' SUFFIX = 'suffix' FULL = 'full' @classmethod def cast(cls, value): if not value: return KeepDirectories.NONE if value is True: return KeepDirectories.FUL...
from enum import Enum from .base import Item class KeepDirectories(Enum): NONE = 'none' SUFFIX = 'suffix' FULL = 'full' @classmethod def cast(cls, value): if not value: return KeepDirectories.NONE if value is True: return KeepDirectories.FULL retur...
from enum import Enum from .base import Item class KeepDirectories(Enum): NONE = 'none' SUFFIX = 'suffix' FULL = 'full' @classmethod def cast(cls, value): if not value: return KeepDirectories.NONE if value is True: return KeepDirectories.FULL retur...
<commit_before>from enum import Enum from .base import Item class KeepDirectories(Enum): NONE = 'none' SUFFIX = 'suffix' FULL = 'full' @classmethod def cast(cls, value): if not value: return KeepDirectories.NONE if value is True: return KeepDirectories.FUL...
d1e75df724fd3627b3fd83ab374dd9770d1acada
setup.py
setup.py
# coding=utf-8 from setuptools import setup, find_packages from sii import __LIBRARY_VERSION__ INSTALL_REQUIRES = [line for line in open('requirements.txt')] TESTS_REQUIRE = [line for line in open('requirements-dev.txt')] PACKAGES_DATA = {'sii': ['data/*.xsd']} setup( name='sii', description='Librería de S...
# coding=utf-8 from setuptools import setup, find_packages from sii import __LIBRARY_VERSION__ with open('requirements.txt', 'r') as f: INSTALL_REQUIRES = f.readlines() with open('requirements-dev.txt', 'r') as f: TESTS_REQUIRE = f.readlines() PACKAGES_DATA = {'sii': ['data/*.xsd']} setup( name='sii', ...
Simplify readlines() to add requirements
Simplify readlines() to add requirements
Python
mit
gisce/sii
# coding=utf-8 from setuptools import setup, find_packages from sii import __LIBRARY_VERSION__ INSTALL_REQUIRES = [line for line in open('requirements.txt')] TESTS_REQUIRE = [line for line in open('requirements-dev.txt')] PACKAGES_DATA = {'sii': ['data/*.xsd']} setup( name='sii', description='Librería de S...
# coding=utf-8 from setuptools import setup, find_packages from sii import __LIBRARY_VERSION__ with open('requirements.txt', 'r') as f: INSTALL_REQUIRES = f.readlines() with open('requirements-dev.txt', 'r') as f: TESTS_REQUIRE = f.readlines() PACKAGES_DATA = {'sii': ['data/*.xsd']} setup( name='sii', ...
<commit_before># coding=utf-8 from setuptools import setup, find_packages from sii import __LIBRARY_VERSION__ INSTALL_REQUIRES = [line for line in open('requirements.txt')] TESTS_REQUIRE = [line for line in open('requirements-dev.txt')] PACKAGES_DATA = {'sii': ['data/*.xsd']} setup( name='sii', description...
# coding=utf-8 from setuptools import setup, find_packages from sii import __LIBRARY_VERSION__ with open('requirements.txt', 'r') as f: INSTALL_REQUIRES = f.readlines() with open('requirements-dev.txt', 'r') as f: TESTS_REQUIRE = f.readlines() PACKAGES_DATA = {'sii': ['data/*.xsd']} setup( name='sii', ...
# coding=utf-8 from setuptools import setup, find_packages from sii import __LIBRARY_VERSION__ INSTALL_REQUIRES = [line for line in open('requirements.txt')] TESTS_REQUIRE = [line for line in open('requirements-dev.txt')] PACKAGES_DATA = {'sii': ['data/*.xsd']} setup( name='sii', description='Librería de S...
<commit_before># coding=utf-8 from setuptools import setup, find_packages from sii import __LIBRARY_VERSION__ INSTALL_REQUIRES = [line for line in open('requirements.txt')] TESTS_REQUIRE = [line for line in open('requirements-dev.txt')] PACKAGES_DATA = {'sii': ['data/*.xsd']} setup( name='sii', description...
703e659ee2705b509b105a9b2a4f09d29c129643
setup.py
setup.py
"""Config for PyPI.""" from setuptools import find_packages from setuptools import setup setup( author='Kyle P. Johnson', author_email='kyle@kyle-p-johnson.com', classifiers=[ 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MI...
"""Config for PyPI.""" from setuptools import find_packages from setuptools import setup setup( author='Kyle P. Johnson', author_email='kyle@kyle-p-johnson.com', classifiers=[ 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MI...
Increment version to trigger auto build
Increment version to trigger auto build
Python
mit
kylepjohnson/cltk,TylerKirby/cltk,TylerKirby/cltk,D-K-E/cltk,LBenzahia/cltk,diyclassics/cltk,cltk/cltk,LBenzahia/cltk
"""Config for PyPI.""" from setuptools import find_packages from setuptools import setup setup( author='Kyle P. Johnson', author_email='kyle@kyle-p-johnson.com', classifiers=[ 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MI...
"""Config for PyPI.""" from setuptools import find_packages from setuptools import setup setup( author='Kyle P. Johnson', author_email='kyle@kyle-p-johnson.com', classifiers=[ 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MI...
<commit_before>"""Config for PyPI.""" from setuptools import find_packages from setuptools import setup setup( author='Kyle P. Johnson', author_email='kyle@kyle-p-johnson.com', classifiers=[ 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI...
"""Config for PyPI.""" from setuptools import find_packages from setuptools import setup setup( author='Kyle P. Johnson', author_email='kyle@kyle-p-johnson.com', classifiers=[ 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MI...
"""Config for PyPI.""" from setuptools import find_packages from setuptools import setup setup( author='Kyle P. Johnson', author_email='kyle@kyle-p-johnson.com', classifiers=[ 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MI...
<commit_before>"""Config for PyPI.""" from setuptools import find_packages from setuptools import setup setup( author='Kyle P. Johnson', author_email='kyle@kyle-p-johnson.com', classifiers=[ 'Intended Audience :: Education', 'Intended Audience :: Science/Research', 'License :: OSI...
7da8c97530d25d4f471f7927825382c0cea9524d
setup.py
setup.py
#!/usr/bin/env python3 from setuptools import setup setup( name='todoman', description='A simple CalDav-based todo manager.', author='Hugo Osvaldo Barrera', author_email='hugo@barrera.io', url='https://gitlab.com/hobarrera/todoman', license='MIT', packages=['todoman'], entry_points={ ...
#!/usr/bin/env python3 from setuptools import setup setup( name='todoman', description='A simple CalDav-based todo manager.', author='Hugo Osvaldo Barrera', author_email='hugo@barrera.io', url='https://gitlab.com/hobarrera/todoman', license='MIT', packages=['todoman'], entry_points={ ...
Make README.rst the package's long description
Make README.rst the package's long description
Python
isc
pimutils/todoman,rimshaakhan/todoman,Sakshisaraswat/todoman,asalminen/todoman,AnubhaAgrawal/todoman,hobarrera/todoman
#!/usr/bin/env python3 from setuptools import setup setup( name='todoman', description='A simple CalDav-based todo manager.', author='Hugo Osvaldo Barrera', author_email='hugo@barrera.io', url='https://gitlab.com/hobarrera/todoman', license='MIT', packages=['todoman'], entry_points={ ...
#!/usr/bin/env python3 from setuptools import setup setup( name='todoman', description='A simple CalDav-based todo manager.', author='Hugo Osvaldo Barrera', author_email='hugo@barrera.io', url='https://gitlab.com/hobarrera/todoman', license='MIT', packages=['todoman'], entry_points={ ...
<commit_before>#!/usr/bin/env python3 from setuptools import setup setup( name='todoman', description='A simple CalDav-based todo manager.', author='Hugo Osvaldo Barrera', author_email='hugo@barrera.io', url='https://gitlab.com/hobarrera/todoman', license='MIT', packages=['todoman'], e...
#!/usr/bin/env python3 from setuptools import setup setup( name='todoman', description='A simple CalDav-based todo manager.', author='Hugo Osvaldo Barrera', author_email='hugo@barrera.io', url='https://gitlab.com/hobarrera/todoman', license='MIT', packages=['todoman'], entry_points={ ...
#!/usr/bin/env python3 from setuptools import setup setup( name='todoman', description='A simple CalDav-based todo manager.', author='Hugo Osvaldo Barrera', author_email='hugo@barrera.io', url='https://gitlab.com/hobarrera/todoman', license='MIT', packages=['todoman'], entry_points={ ...
<commit_before>#!/usr/bin/env python3 from setuptools import setup setup( name='todoman', description='A simple CalDav-based todo manager.', author='Hugo Osvaldo Barrera', author_email='hugo@barrera.io', url='https://gitlab.com/hobarrera/todoman', license='MIT', packages=['todoman'], e...
cf496e0f18811dd61caea822a8cc3e5769bbdc04
setup.py
setup.py
#!/usr/bin/env python3 # coding: utf-8 """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import keysmith with open('README.rst') as readme_file: README = readme_file.read() setu...
#!/usr/bin/env python3 # coding: utf-8 """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import keysmith with open('README.rst') as readme_file: README = readme_file.read() setu...
Remove the Intended Audience classifier
Remove the Intended Audience classifier
Python
bsd-3-clause
dmtucker/keysmith
#!/usr/bin/env python3 # coding: utf-8 """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import keysmith with open('README.rst') as readme_file: README = readme_file.read() setu...
#!/usr/bin/env python3 # coding: utf-8 """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import keysmith with open('README.rst') as readme_file: README = readme_file.read() setu...
<commit_before>#!/usr/bin/env python3 # coding: utf-8 """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import keysmith with open('README.rst') as readme_file: README = readme_fi...
#!/usr/bin/env python3 # coding: utf-8 """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import keysmith with open('README.rst') as readme_file: README = readme_file.read() setu...
#!/usr/bin/env python3 # coding: utf-8 """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import keysmith with open('README.rst') as readme_file: README = readme_file.read() setu...
<commit_before>#!/usr/bin/env python3 # coding: utf-8 """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import keysmith with open('README.rst') as readme_file: README = readme_fi...
5da6d00d040e7e4567956492ed955f9bd4e6cfa7
setup.py
setup.py
from setuptools import setup, find_packages import sys, os from applib import __version__ setup(name='applib', version=__version__, description="Cross-platform application utilities", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_class...
from setuptools import setup, find_packages import sys, os from applib import __version__ setup(name='applib', version=__version__, description="Cross-platform application utilities", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_class...
Fix url to use new homepage
Fix url to use new homepage
Python
mit
ActiveState/applib
from setuptools import setup, find_packages import sys, os from applib import __version__ setup(name='applib', version=__version__, description="Cross-platform application utilities", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_class...
from setuptools import setup, find_packages import sys, os from applib import __version__ setup(name='applib', version=__version__, description="Cross-platform application utilities", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_class...
<commit_before>from setuptools import setup, find_packages import sys, os from applib import __version__ setup(name='applib', version=__version__, description="Cross-platform application utilities", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aac...
from setuptools import setup, find_packages import sys, os from applib import __version__ setup(name='applib', version=__version__, description="Cross-platform application utilities", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_class...
from setuptools import setup, find_packages import sys, os from applib import __version__ setup(name='applib', version=__version__, description="Cross-platform application utilities", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_class...
<commit_before>from setuptools import setup, find_packages import sys, os from applib import __version__ setup(name='applib', version=__version__, description="Cross-platform application utilities", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aac...
9fbfaac74b3213601ce48c73cd49a02344ba580b
setup.py
setup.py
from distutils.core import setup import sisdb setup ( name='sisdb', version=sisdb.VERSION, description='SIS ORM like library', packages=['sisdb'], install_requires=['sis >= 0.3.0'] )
from distutils.core import setup import sisdb setup ( name='sisdb', version=sisdb.VERSION, description='SIS ORM like library', packages=['sisdb'], install_requires=['sispy >= 0.3.0'] )
Update to require sispy instead of sis
Update to require sispy instead of sis
Python
bsd-3-clause
sis-cmdb/sis-db-python
from distutils.core import setup import sisdb setup ( name='sisdb', version=sisdb.VERSION, description='SIS ORM like library', packages=['sisdb'], install_requires=['sis >= 0.3.0'] ) Update to require sispy instead of sis
from distutils.core import setup import sisdb setup ( name='sisdb', version=sisdb.VERSION, description='SIS ORM like library', packages=['sisdb'], install_requires=['sispy >= 0.3.0'] )
<commit_before>from distutils.core import setup import sisdb setup ( name='sisdb', version=sisdb.VERSION, description='SIS ORM like library', packages=['sisdb'], install_requires=['sis >= 0.3.0'] ) <commit_msg>Update to require sispy instead of sis<commit_after>
from distutils.core import setup import sisdb setup ( name='sisdb', version=sisdb.VERSION, description='SIS ORM like library', packages=['sisdb'], install_requires=['sispy >= 0.3.0'] )
from distutils.core import setup import sisdb setup ( name='sisdb', version=sisdb.VERSION, description='SIS ORM like library', packages=['sisdb'], install_requires=['sis >= 0.3.0'] ) Update to require sispy instead of sisfrom distutils.core import setup import sisdb setup ( name='sisdb', ...
<commit_before>from distutils.core import setup import sisdb setup ( name='sisdb', version=sisdb.VERSION, description='SIS ORM like library', packages=['sisdb'], install_requires=['sis >= 0.3.0'] ) <commit_msg>Update to require sispy instead of sis<commit_after>from distutils.core import setup im...
3f7c6e468f420198f83e090efc155efe8fb18660
setup.py
setup.py
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-zendesk-tickets', version='...
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-zendesk-tickets', version='...
Remove <1.9 limit on Django version
Remove <1.9 limit on Django version
Python
mit
ministryofjustice/django-zendesk-tickets,ministryofjustice/django-zendesk-tickets
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-zendesk-tickets', version='...
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-zendesk-tickets', version='...
<commit_before>import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-zendesk-tickets'...
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-zendesk-tickets', version='...
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-zendesk-tickets', version='...
<commit_before>import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-zendesk-tickets'...
f78f5b467ffe722e04317396622b5b81e40bb6bd
setup.py
setup.py
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='7.0.16', packages=['todoist', 'todoist.managers'], author='Doist Team...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='7.0.17', packages=['todoist', 'todoist.managers'], author='Doist Team...
Update the PyPI version to 7.0.17.
Update the PyPI version to 7.0.17.
Python
mit
Doist/todoist-python
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='7.0.16', packages=['todoist', 'todoist.managers'], author='Doist Team...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='7.0.17', packages=['todoist', 'todoist.managers'], author='Doist Team...
<commit_before># -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='7.0.16', packages=['todoist', 'todoist.managers'], aut...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='7.0.17', packages=['todoist', 'todoist.managers'], author='Doist Team...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='7.0.16', packages=['todoist', 'todoist.managers'], author='Doist Team...
<commit_before># -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='7.0.16', packages=['todoist', 'todoist.managers'], aut...
83410be53dfd4ddba5c3d5fff4c8cea022fc08d2
setup.py
setup.py
from setuptools import setup, find_packages with open("README.rst", "rt") as f: readme = f.read() setup( name='gimei', version="0.1.5", description="generates the name and the address at random.", long_description=__doc__, author='Mao Nabeta', author_email='mao.nabeta@gmail.com', url='h...
from setuptools import setup, find_packages with open("README.rst", "rt") as f: readme = f.read() setup( name='gimei', version="0.1.51", description="generates the name and the address at random.", long_description=__doc__, author='Mao Nabeta', author_email='mao.nabeta@gmail.com', url='...
Set version number to 0.1.51.
Set version number to 0.1.51.
Python
mit
nabetama/gimei
from setuptools import setup, find_packages with open("README.rst", "rt") as f: readme = f.read() setup( name='gimei', version="0.1.5", description="generates the name and the address at random.", long_description=__doc__, author='Mao Nabeta', author_email='mao.nabeta@gmail.com', url='h...
from setuptools import setup, find_packages with open("README.rst", "rt") as f: readme = f.read() setup( name='gimei', version="0.1.51", description="generates the name and the address at random.", long_description=__doc__, author='Mao Nabeta', author_email='mao.nabeta@gmail.com', url='...
<commit_before>from setuptools import setup, find_packages with open("README.rst", "rt") as f: readme = f.read() setup( name='gimei', version="0.1.5", description="generates the name and the address at random.", long_description=__doc__, author='Mao Nabeta', author_email='mao.nabeta@gmail.c...
from setuptools import setup, find_packages with open("README.rst", "rt") as f: readme = f.read() setup( name='gimei', version="0.1.51", description="generates the name and the address at random.", long_description=__doc__, author='Mao Nabeta', author_email='mao.nabeta@gmail.com', url='...
from setuptools import setup, find_packages with open("README.rst", "rt") as f: readme = f.read() setup( name='gimei', version="0.1.5", description="generates the name and the address at random.", long_description=__doc__, author='Mao Nabeta', author_email='mao.nabeta@gmail.com', url='h...
<commit_before>from setuptools import setup, find_packages with open("README.rst", "rt") as f: readme = f.read() setup( name='gimei', version="0.1.5", description="generates the name and the address at random.", long_description=__doc__, author='Mao Nabeta', author_email='mao.nabeta@gmail.c...
2c41039669b9f8b423209c04f1d032584a86721e
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup def read(filename): return open(filename).read() setup(name="lzo-indexer", version="0.0.1", description="Library for indexing LZO compressed files", long_description=read("README.md"), author="Tom Arnfeld", author_email="tom@duedil.com", ...
#!/usr/bin/env python from setuptools import setup def read(filename): return open(filename).read() setup(name="lzo-indexer", version="0.0.1", description="Library for indexing LZO compressed files", long_description=read("README.md"), author="Tom Arnfeld", author_email="tom@duedil.com", ...
Switch to the new github release download links
Switch to the new github release download links
Python
apache-2.0
duedil-ltd/python-lzo-indexer
#!/usr/bin/env python from setuptools import setup def read(filename): return open(filename).read() setup(name="lzo-indexer", version="0.0.1", description="Library for indexing LZO compressed files", long_description=read("README.md"), author="Tom Arnfeld", author_email="tom@duedil.com", ...
#!/usr/bin/env python from setuptools import setup def read(filename): return open(filename).read() setup(name="lzo-indexer", version="0.0.1", description="Library for indexing LZO compressed files", long_description=read("README.md"), author="Tom Arnfeld", author_email="tom@duedil.com", ...
<commit_before>#!/usr/bin/env python from setuptools import setup def read(filename): return open(filename).read() setup(name="lzo-indexer", version="0.0.1", description="Library for indexing LZO compressed files", long_description=read("README.md"), author="Tom Arnfeld", author_email="tom@d...
#!/usr/bin/env python from setuptools import setup def read(filename): return open(filename).read() setup(name="lzo-indexer", version="0.0.1", description="Library for indexing LZO compressed files", long_description=read("README.md"), author="Tom Arnfeld", author_email="tom@duedil.com", ...
#!/usr/bin/env python from setuptools import setup def read(filename): return open(filename).read() setup(name="lzo-indexer", version="0.0.1", description="Library for indexing LZO compressed files", long_description=read("README.md"), author="Tom Arnfeld", author_email="tom@duedil.com", ...
<commit_before>#!/usr/bin/env python from setuptools import setup def read(filename): return open(filename).read() setup(name="lzo-indexer", version="0.0.1", description="Library for indexing LZO compressed files", long_description=read("README.md"), author="Tom Arnfeld", author_email="tom@d...
ea860743e0ba4538714d9fe5476b4807cf75ed35
sourcer/__init__.py
sourcer/__init__.py
from .terms import * from .parser import * __all__ = [ 'Alt', 'And', 'Any', 'AnyChar', 'AnyInst', 'Bind', 'Content', 'End', 'Expect', 'ForwardRef', 'InfixLeft', 'InfixRight', 'Left', 'LeftAssoc', 'List', 'Literal', 'Middle', 'Not', 'Operation...
from .terms import ( Alt, And, Any, AnyChar, AnyInst, Bind, Content, End, Expect, ForwardRef, InfixLeft, InfixRight, Left, LeftAssoc, List, Literal, Middle, Not, Operation, OperatorPrecedence, Opt, Or, ParseError, ParseResul...
Replace the __all__ specification with direct imports.
Replace the __all__ specification with direct imports.
Python
mit
jvs/sourcer
from .terms import * from .parser import * __all__ = [ 'Alt', 'And', 'Any', 'AnyChar', 'AnyInst', 'Bind', 'Content', 'End', 'Expect', 'ForwardRef', 'InfixLeft', 'InfixRight', 'Left', 'LeftAssoc', 'List', 'Literal', 'Middle', 'Not', 'Operation...
from .terms import ( Alt, And, Any, AnyChar, AnyInst, Bind, Content, End, Expect, ForwardRef, InfixLeft, InfixRight, Left, LeftAssoc, List, Literal, Middle, Not, Operation, OperatorPrecedence, Opt, Or, ParseError, ParseResul...
<commit_before>from .terms import * from .parser import * __all__ = [ 'Alt', 'And', 'Any', 'AnyChar', 'AnyInst', 'Bind', 'Content', 'End', 'Expect', 'ForwardRef', 'InfixLeft', 'InfixRight', 'Left', 'LeftAssoc', 'List', 'Literal', 'Middle', 'Not',...
from .terms import ( Alt, And, Any, AnyChar, AnyInst, Bind, Content, End, Expect, ForwardRef, InfixLeft, InfixRight, Left, LeftAssoc, List, Literal, Middle, Not, Operation, OperatorPrecedence, Opt, Or, ParseError, ParseResul...
from .terms import * from .parser import * __all__ = [ 'Alt', 'And', 'Any', 'AnyChar', 'AnyInst', 'Bind', 'Content', 'End', 'Expect', 'ForwardRef', 'InfixLeft', 'InfixRight', 'Left', 'LeftAssoc', 'List', 'Literal', 'Middle', 'Not', 'Operation...
<commit_before>from .terms import * from .parser import * __all__ = [ 'Alt', 'And', 'Any', 'AnyChar', 'AnyInst', 'Bind', 'Content', 'End', 'Expect', 'ForwardRef', 'InfixLeft', 'InfixRight', 'Left', 'LeftAssoc', 'List', 'Literal', 'Middle', 'Not',...
cb998c88d385d42f13e2e39fb86e8df73610a275
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-validate-model-attribute-assignment', url="https://chris-lamb.co.uk/projects/django-validate-model-attribute-assignment", version='2.0.1', description="Prevent typos and other errors when assigning attributes to Dja...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-validate-model-attribute-assignment', url="https://chris-lamb.co.uk/projects/django-validate-model-attribute-assignment", version='2.0.1', description="Prevent typos and other errors when assigning attributes to Dja...
Update Django requirement to latest LTS
Update Django requirement to latest LTS
Python
bsd-3-clause
lamby/django-validate-model-attribute-assignment
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-validate-model-attribute-assignment', url="https://chris-lamb.co.uk/projects/django-validate-model-attribute-assignment", version='2.0.1', description="Prevent typos and other errors when assigning attributes to Dja...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-validate-model-attribute-assignment', url="https://chris-lamb.co.uk/projects/django-validate-model-attribute-assignment", version='2.0.1', description="Prevent typos and other errors when assigning attributes to Dja...
<commit_before>#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-validate-model-attribute-assignment', url="https://chris-lamb.co.uk/projects/django-validate-model-attribute-assignment", version='2.0.1', description="Prevent typos and other errors when assigning at...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-validate-model-attribute-assignment', url="https://chris-lamb.co.uk/projects/django-validate-model-attribute-assignment", version='2.0.1', description="Prevent typos and other errors when assigning attributes to Dja...
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-validate-model-attribute-assignment', url="https://chris-lamb.co.uk/projects/django-validate-model-attribute-assignment", version='2.0.1', description="Prevent typos and other errors when assigning attributes to Dja...
<commit_before>#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-validate-model-attribute-assignment', url="https://chris-lamb.co.uk/projects/django-validate-model-attribute-assignment", version='2.0.1', description="Prevent typos and other errors when assigning at...
7fc2b2d1c2f21cd44b3fbcd641ae2b36f38f080d
setup.py
setup.py
import os from setuptools import setup from withtool import __version__ def read(fname): path = os.path.join(os.path.dirname(__file__), fname) with open(path, encoding='utf-8') as f: return f.read() setup( name='with', version=__version__, description='A shell context manager', long_...
import os from setuptools import setup from withtool import __version__ def read(fname): path = os.path.join(os.path.dirname(__file__), fname) with open(path, encoding='utf-8') as f: return f.read() setup( name='with', version=__version__, description='A shell context manager', long_...
Upgrade dependency python-slugify to ==1.2.1
Upgrade dependency python-slugify to ==1.2.1
Python
mit
renanivo/with
import os from setuptools import setup from withtool import __version__ def read(fname): path = os.path.join(os.path.dirname(__file__), fname) with open(path, encoding='utf-8') as f: return f.read() setup( name='with', version=__version__, description='A shell context manager', long_...
import os from setuptools import setup from withtool import __version__ def read(fname): path = os.path.join(os.path.dirname(__file__), fname) with open(path, encoding='utf-8') as f: return f.read() setup( name='with', version=__version__, description='A shell context manager', long_...
<commit_before>import os from setuptools import setup from withtool import __version__ def read(fname): path = os.path.join(os.path.dirname(__file__), fname) with open(path, encoding='utf-8') as f: return f.read() setup( name='with', version=__version__, description='A shell context mana...
import os from setuptools import setup from withtool import __version__ def read(fname): path = os.path.join(os.path.dirname(__file__), fname) with open(path, encoding='utf-8') as f: return f.read() setup( name='with', version=__version__, description='A shell context manager', long_...
import os from setuptools import setup from withtool import __version__ def read(fname): path = os.path.join(os.path.dirname(__file__), fname) with open(path, encoding='utf-8') as f: return f.read() setup( name='with', version=__version__, description='A shell context manager', long_...
<commit_before>import os from setuptools import setup from withtool import __version__ def read(fname): path = os.path.join(os.path.dirname(__file__), fname) with open(path, encoding='utf-8') as f: return f.read() setup( name='with', version=__version__, description='A shell context mana...
7ef952010f1bbfb9f78de923caa1112121328324
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup settings = dict() # Publish if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() settings.update( name='whenpy'...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup settings = dict() # Publish if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() settings.update( name='whenpy'...
Add new Python versions to the supported languages
Add new Python versions to the supported languages Now that tests are passing for Python 3.1 and 3.2, they should go into the list of supported versions of Python listed on PyPI.
Python
bsd-3-clause
dirn/When.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup settings = dict() # Publish if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() settings.update( name='whenpy'...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup settings = dict() # Publish if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() settings.update( name='whenpy'...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup settings = dict() # Publish if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() settings.update( ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup settings = dict() # Publish if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() settings.update( name='whenpy'...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup settings = dict() # Publish if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() settings.update( name='whenpy'...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup settings = dict() # Publish if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() settings.update( ...
0ebf51994a73fdc7c4f13b274fc41bef541eea52
deflect/widgets.py
deflect/widgets.py
from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(forms.TextInput): """ A form widget that displays a standard `...
from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(forms.TextInput): """ A form widget that displays a standard `...
Hide the option set from incompatible browsers
Hide the option set from incompatible browsers
Python
bsd-3-clause
jbittel/django-deflect
from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(forms.TextInput): """ A form widget that displays a standard `...
from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(forms.TextInput): """ A form widget that displays a standard `...
<commit_before>from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(forms.TextInput): """ A form widget that displa...
from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(forms.TextInput): """ A form widget that displays a standard `...
from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(forms.TextInput): """ A form widget that displays a standard `...
<commit_before>from __future__ import unicode_literals from itertools import chain from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DataListInput(forms.TextInput): """ A form widget that displa...
806a6d8e029ef1c4708a265abd99219b167cc843
generate-data.py
generate-data.py
#!/usr/bin/env python import random from nott_params import * num_samples = int(gridDim[0] * gridDim[1] * 10) def generate_data(numx, numy): stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1)) return stimulus def print_header(): print("{0} {1} {2}".format(num_samples, num_inputs, num_o...
#!/usr/bin/env python import random from nott_params import * num_samples = int(gridDim[0] * gridDim[1] * 0.2) def generate_data(numx, numy): stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1)) return stimulus def print_header(): print("{0} {1} {2}".format(num_samples, num_inputs, num_...
Remove oversampling; use 20 percent instead
Remove oversampling; use 20 percent instead
Python
mit
jeffames-cs/nnot
#!/usr/bin/env python import random from nott_params import * num_samples = int(gridDim[0] * gridDim[1] * 10) def generate_data(numx, numy): stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1)) return stimulus def print_header(): print("{0} {1} {2}".format(num_samples, num_inputs, num_o...
#!/usr/bin/env python import random from nott_params import * num_samples = int(gridDim[0] * gridDim[1] * 0.2) def generate_data(numx, numy): stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1)) return stimulus def print_header(): print("{0} {1} {2}".format(num_samples, num_inputs, num_...
<commit_before>#!/usr/bin/env python import random from nott_params import * num_samples = int(gridDim[0] * gridDim[1] * 10) def generate_data(numx, numy): stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1)) return stimulus def print_header(): print("{0} {1} {2}".format(num_samples, nu...
#!/usr/bin/env python import random from nott_params import * num_samples = int(gridDim[0] * gridDim[1] * 0.2) def generate_data(numx, numy): stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1)) return stimulus def print_header(): print("{0} {1} {2}".format(num_samples, num_inputs, num_...
#!/usr/bin/env python import random from nott_params import * num_samples = int(gridDim[0] * gridDim[1] * 10) def generate_data(numx, numy): stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1)) return stimulus def print_header(): print("{0} {1} {2}".format(num_samples, num_inputs, num_o...
<commit_before>#!/usr/bin/env python import random from nott_params import * num_samples = int(gridDim[0] * gridDim[1] * 10) def generate_data(numx, numy): stimulus = (random.randint(0, numx - 1), random.randint(0, numy - 1)) return stimulus def print_header(): print("{0} {1} {2}".format(num_samples, nu...
35541f35ebed2b41b3fde073e8f3d2aaaca41dcb
tasks.py
tasks.py
from invoke import run, task TESTPYPI = "https://testpypi.python.org/pypi" @task def lint(): """Run flake8 to lint code""" run("python setup.py flake8") @task(lint) def test(): """Lint, unit test, and check setup.py""" run("nosetests --with-coverage --cover-package=siganalysis") run("python set...
from invoke import run, task TESTPYPI = "https://testpypi.python.org/pypi" @task def lint(): """Run flake8 to lint code""" run("python setup.py flake8") @task(lint) def test(): """Lint, unit test, and check setup.py""" run("nosetests --with-coverage --cover-package=taffmat") run("python setup.p...
Fix test task (wrong package)
Fix test task (wrong package)
Python
mit
questrail/taffmat
from invoke import run, task TESTPYPI = "https://testpypi.python.org/pypi" @task def lint(): """Run flake8 to lint code""" run("python setup.py flake8") @task(lint) def test(): """Lint, unit test, and check setup.py""" run("nosetests --with-coverage --cover-package=siganalysis") run("python set...
from invoke import run, task TESTPYPI = "https://testpypi.python.org/pypi" @task def lint(): """Run flake8 to lint code""" run("python setup.py flake8") @task(lint) def test(): """Lint, unit test, and check setup.py""" run("nosetests --with-coverage --cover-package=taffmat") run("python setup.p...
<commit_before>from invoke import run, task TESTPYPI = "https://testpypi.python.org/pypi" @task def lint(): """Run flake8 to lint code""" run("python setup.py flake8") @task(lint) def test(): """Lint, unit test, and check setup.py""" run("nosetests --with-coverage --cover-package=siganalysis") ...
from invoke import run, task TESTPYPI = "https://testpypi.python.org/pypi" @task def lint(): """Run flake8 to lint code""" run("python setup.py flake8") @task(lint) def test(): """Lint, unit test, and check setup.py""" run("nosetests --with-coverage --cover-package=taffmat") run("python setup.p...
from invoke import run, task TESTPYPI = "https://testpypi.python.org/pypi" @task def lint(): """Run flake8 to lint code""" run("python setup.py flake8") @task(lint) def test(): """Lint, unit test, and check setup.py""" run("nosetests --with-coverage --cover-package=siganalysis") run("python set...
<commit_before>from invoke import run, task TESTPYPI = "https://testpypi.python.org/pypi" @task def lint(): """Run flake8 to lint code""" run("python setup.py flake8") @task(lint) def test(): """Lint, unit test, and check setup.py""" run("nosetests --with-coverage --cover-package=siganalysis") ...
1c7e6a9c973551193d19bacb79d602e4d3cca630
tests/unit/test_examples.py
tests/unit/test_examples.py
# -*- coding: utf-8 -*- ####################################################################### # Name: test_examples # Purpose: Test that examples run without errors. # Author: Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # Copyright: (c) 2014-2015 Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # L...
# -*- coding: utf-8 -*- ####################################################################### # Name: test_examples # Purpose: Test that examples run without errors. # Author: Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # Copyright: (c) 2014-2015 Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # L...
Insert example directories in path before all others in the example test.
Insert example directories in path before all others in the example test.
Python
mit
leiyangyou/Arpeggio,leiyangyou/Arpeggio
# -*- coding: utf-8 -*- ####################################################################### # Name: test_examples # Purpose: Test that examples run without errors. # Author: Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # Copyright: (c) 2014-2015 Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # L...
# -*- coding: utf-8 -*- ####################################################################### # Name: test_examples # Purpose: Test that examples run without errors. # Author: Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # Copyright: (c) 2014-2015 Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # L...
<commit_before># -*- coding: utf-8 -*- ####################################################################### # Name: test_examples # Purpose: Test that examples run without errors. # Author: Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # Copyright: (c) 2014-2015 Igor R. Dejanović <igor DOT dejanovic AT gma...
# -*- coding: utf-8 -*- ####################################################################### # Name: test_examples # Purpose: Test that examples run without errors. # Author: Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # Copyright: (c) 2014-2015 Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # L...
# -*- coding: utf-8 -*- ####################################################################### # Name: test_examples # Purpose: Test that examples run without errors. # Author: Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # Copyright: (c) 2014-2015 Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # L...
<commit_before># -*- coding: utf-8 -*- ####################################################################### # Name: test_examples # Purpose: Test that examples run without errors. # Author: Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com> # Copyright: (c) 2014-2015 Igor R. Dejanović <igor DOT dejanovic AT gma...
97c0f23c676de7e726e938bf0b61087834cf9fd9
netbox/tenancy/api/serializers.py
netbox/tenancy/api/serializers.py
from rest_framework import serializers from extras.api.serializers import CustomFieldSerializer from tenancy.models import Tenant, TenantGroup # # Tenant groups # class TenantGroupSerializer(serializers.ModelSerializer): class Meta: model = TenantGroup fields = ['id', 'name', 'slug'] class Te...
from rest_framework import serializers from extras.api.serializers import CustomFieldSerializer from tenancy.models import Tenant, TenantGroup # # Tenant groups # class TenantGroupSerializer(serializers.ModelSerializer): class Meta: model = TenantGroup fields = ['id', 'name', 'slug'] class Te...
Add description field to TenantSerializer
Add description field to TenantSerializer This might be just an oversight. Other data models do include the description in their serialisers. The API produces the description field with this change.
Python
apache-2.0
digitalocean/netbox,snazy2000/netbox,digitalocean/netbox,snazy2000/netbox,Alphalink/netbox,snazy2000/netbox,lampwins/netbox,Alphalink/netbox,snazy2000/netbox,Alphalink/netbox,lampwins/netbox,lampwins/netbox,digitalocean/netbox,digitalocean/netbox,lampwins/netbox,Alphalink/netbox
from rest_framework import serializers from extras.api.serializers import CustomFieldSerializer from tenancy.models import Tenant, TenantGroup # # Tenant groups # class TenantGroupSerializer(serializers.ModelSerializer): class Meta: model = TenantGroup fields = ['id', 'name', 'slug'] class Te...
from rest_framework import serializers from extras.api.serializers import CustomFieldSerializer from tenancy.models import Tenant, TenantGroup # # Tenant groups # class TenantGroupSerializer(serializers.ModelSerializer): class Meta: model = TenantGroup fields = ['id', 'name', 'slug'] class Te...
<commit_before>from rest_framework import serializers from extras.api.serializers import CustomFieldSerializer from tenancy.models import Tenant, TenantGroup # # Tenant groups # class TenantGroupSerializer(serializers.ModelSerializer): class Meta: model = TenantGroup fields = ['id', 'name', 'sl...
from rest_framework import serializers from extras.api.serializers import CustomFieldSerializer from tenancy.models import Tenant, TenantGroup # # Tenant groups # class TenantGroupSerializer(serializers.ModelSerializer): class Meta: model = TenantGroup fields = ['id', 'name', 'slug'] class Te...
from rest_framework import serializers from extras.api.serializers import CustomFieldSerializer from tenancy.models import Tenant, TenantGroup # # Tenant groups # class TenantGroupSerializer(serializers.ModelSerializer): class Meta: model = TenantGroup fields = ['id', 'name', 'slug'] class Te...
<commit_before>from rest_framework import serializers from extras.api.serializers import CustomFieldSerializer from tenancy.models import Tenant, TenantGroup # # Tenant groups # class TenantGroupSerializer(serializers.ModelSerializer): class Meta: model = TenantGroup fields = ['id', 'name', 'sl...
7b1766a6f07d468f1830871bfe2cdc1aaa29dcbf
examples/client.py
examples/client.py
""" Cross-process log tracing: HTTP client. """ from __future__ import unicode_literals import sys import requests from eliot import Logger, to_file, start_action to_file(sys.stdout) logger = Logger() def request(x, y): with start_action(logger, "http_request", x=x, y=y) as action: task_id = action.seri...
""" Cross-process log tracing: HTTP client. """ from __future__ import unicode_literals import sys import requests from eliot import Logger, to_file, start_action to_file(sys.stdout) logger = Logger() def remote_divide(x, y): with start_action(logger, "http_request", x=x, y=y) as action: task_id = actio...
Address review comment: Better function name.
Address review comment: Better function name.
Python
apache-2.0
ScatterHQ/eliot,ScatterHQ/eliot,ClusterHQ/eliot,iffy/eliot,ScatterHQ/eliot
""" Cross-process log tracing: HTTP client. """ from __future__ import unicode_literals import sys import requests from eliot import Logger, to_file, start_action to_file(sys.stdout) logger = Logger() def request(x, y): with start_action(logger, "http_request", x=x, y=y) as action: task_id = action.seri...
""" Cross-process log tracing: HTTP client. """ from __future__ import unicode_literals import sys import requests from eliot import Logger, to_file, start_action to_file(sys.stdout) logger = Logger() def remote_divide(x, y): with start_action(logger, "http_request", x=x, y=y) as action: task_id = actio...
<commit_before>""" Cross-process log tracing: HTTP client. """ from __future__ import unicode_literals import sys import requests from eliot import Logger, to_file, start_action to_file(sys.stdout) logger = Logger() def request(x, y): with start_action(logger, "http_request", x=x, y=y) as action: task_i...
""" Cross-process log tracing: HTTP client. """ from __future__ import unicode_literals import sys import requests from eliot import Logger, to_file, start_action to_file(sys.stdout) logger = Logger() def remote_divide(x, y): with start_action(logger, "http_request", x=x, y=y) as action: task_id = actio...
""" Cross-process log tracing: HTTP client. """ from __future__ import unicode_literals import sys import requests from eliot import Logger, to_file, start_action to_file(sys.stdout) logger = Logger() def request(x, y): with start_action(logger, "http_request", x=x, y=y) as action: task_id = action.seri...
<commit_before>""" Cross-process log tracing: HTTP client. """ from __future__ import unicode_literals import sys import requests from eliot import Logger, to_file, start_action to_file(sys.stdout) logger = Logger() def request(x, y): with start_action(logger, "http_request", x=x, y=y) as action: task_i...
6e6383037fc86beba36f16e9beb89e850ba24649
oauth_access/models.py
oauth_access/models.py
import datetime from django.db import models from django.contrib.auth.models import User class UserAssociation(models.Model): user = models.ForeignKey(User) service = models.CharField(max_length=75, db_index=True) identifier = models.CharField(max_length=255, db_index=True) token = models.CharF...
import datetime from django.db import models from django.contrib.auth.models import User class UserAssociation(models.Model): user = models.ForeignKey(User) service = models.CharField(max_length=75, db_index=True) identifier = models.CharField(max_length=255, db_index=True) token = models.CharF...
Handle case when token has a null expires
Handle case when token has a null expires
Python
bsd-3-clause
eldarion/django-oauth-access,eldarion/django-oauth-access
import datetime from django.db import models from django.contrib.auth.models import User class UserAssociation(models.Model): user = models.ForeignKey(User) service = models.CharField(max_length=75, db_index=True) identifier = models.CharField(max_length=255, db_index=True) token = models.CharF...
import datetime from django.db import models from django.contrib.auth.models import User class UserAssociation(models.Model): user = models.ForeignKey(User) service = models.CharField(max_length=75, db_index=True) identifier = models.CharField(max_length=255, db_index=True) token = models.CharF...
<commit_before>import datetime from django.db import models from django.contrib.auth.models import User class UserAssociation(models.Model): user = models.ForeignKey(User) service = models.CharField(max_length=75, db_index=True) identifier = models.CharField(max_length=255, db_index=True) token...
import datetime from django.db import models from django.contrib.auth.models import User class UserAssociation(models.Model): user = models.ForeignKey(User) service = models.CharField(max_length=75, db_index=True) identifier = models.CharField(max_length=255, db_index=True) token = models.CharF...
import datetime from django.db import models from django.contrib.auth.models import User class UserAssociation(models.Model): user = models.ForeignKey(User) service = models.CharField(max_length=75, db_index=True) identifier = models.CharField(max_length=255, db_index=True) token = models.CharF...
<commit_before>import datetime from django.db import models from django.contrib.auth.models import User class UserAssociation(models.Model): user = models.ForeignKey(User) service = models.CharField(max_length=75, db_index=True) identifier = models.CharField(max_length=255, db_index=True) token...
53a518aa9e00af8f2b24b566f6d0420d107e93bf
handler/index.py
handler/index.py
#!/usr/bin/python # -*- coding:utf-8 -*- # Powered By KK Studio # Index Page from BaseHandler import BaseHandler from tornado.web import authenticated as Auth class IndexHandler(BaseHandler): #@Auth def get(self): self.log.info('Hell,Index page!') # Log Test self.render('index/index.html')
#!/usr/bin/python # -*- coding:utf-8 -*- # Powered By KK Studio # Index Page from BaseHandler import BaseHandler #from tornado.web import authenticated as Auth class IndexHandler(BaseHandler): #@Auth def get(self): self.log.info('Hello,Index page!') # Log Test self.render('index/index.html')
Fix a log display error
Fix a log display error
Python
mit
kkstu/Torweb,kkstu/Torweb
#!/usr/bin/python # -*- coding:utf-8 -*- # Powered By KK Studio # Index Page from BaseHandler import BaseHandler from tornado.web import authenticated as Auth class IndexHandler(BaseHandler): #@Auth def get(self): self.log.info('Hell,Index page!') # Log Test self.render('index/index.html') Fi...
#!/usr/bin/python # -*- coding:utf-8 -*- # Powered By KK Studio # Index Page from BaseHandler import BaseHandler #from tornado.web import authenticated as Auth class IndexHandler(BaseHandler): #@Auth def get(self): self.log.info('Hello,Index page!') # Log Test self.render('index/index.html')
<commit_before>#!/usr/bin/python # -*- coding:utf-8 -*- # Powered By KK Studio # Index Page from BaseHandler import BaseHandler from tornado.web import authenticated as Auth class IndexHandler(BaseHandler): #@Auth def get(self): self.log.info('Hell,Index page!') # Log Test self.render('index/...
#!/usr/bin/python # -*- coding:utf-8 -*- # Powered By KK Studio # Index Page from BaseHandler import BaseHandler #from tornado.web import authenticated as Auth class IndexHandler(BaseHandler): #@Auth def get(self): self.log.info('Hello,Index page!') # Log Test self.render('index/index.html')
#!/usr/bin/python # -*- coding:utf-8 -*- # Powered By KK Studio # Index Page from BaseHandler import BaseHandler from tornado.web import authenticated as Auth class IndexHandler(BaseHandler): #@Auth def get(self): self.log.info('Hell,Index page!') # Log Test self.render('index/index.html') Fi...
<commit_before>#!/usr/bin/python # -*- coding:utf-8 -*- # Powered By KK Studio # Index Page from BaseHandler import BaseHandler from tornado.web import authenticated as Auth class IndexHandler(BaseHandler): #@Auth def get(self): self.log.info('Hell,Index page!') # Log Test self.render('index/...
9d02fcd251cc2f954e559794507e1b052d8bef3c
tests/test_compile_samples.py
tests/test_compile_samples.py
import os.path import pytest import rain.compiler as C def ls(*path): path = os.path.join(*path) for file in os.listdir(path): yield os.path.join(path, file) def lsrn(*path, recurse=False): for file in ls(*path): if os.path.isfile(file) and file.endswith('.rn') and not file.endswith('_pkg.rn'): yi...
import os.path import pytest import rain.compiler as C def ls(*path): path = os.path.join(*path) for file in os.listdir(path): yield os.path.join(path, file) def lsrn(*path, recurse=False): for file in ls(*path): if os.path.isfile(file) and file.endswith('.rn') and not file.endswith('_pkg.rn'): yi...
Fix tests for new quiet attribute
tests: Fix tests for new quiet attribute
Python
mit
philipdexter/rain,philipdexter/rain,philipdexter/rain,scizzorz/rain,philipdexter/rain,scizzorz/rain,scizzorz/rain,scizzorz/rain
import os.path import pytest import rain.compiler as C def ls(*path): path = os.path.join(*path) for file in os.listdir(path): yield os.path.join(path, file) def lsrn(*path, recurse=False): for file in ls(*path): if os.path.isfile(file) and file.endswith('.rn') and not file.endswith('_pkg.rn'): yi...
import os.path import pytest import rain.compiler as C def ls(*path): path = os.path.join(*path) for file in os.listdir(path): yield os.path.join(path, file) def lsrn(*path, recurse=False): for file in ls(*path): if os.path.isfile(file) and file.endswith('.rn') and not file.endswith('_pkg.rn'): yi...
<commit_before>import os.path import pytest import rain.compiler as C def ls(*path): path = os.path.join(*path) for file in os.listdir(path): yield os.path.join(path, file) def lsrn(*path, recurse=False): for file in ls(*path): if os.path.isfile(file) and file.endswith('.rn') and not file.endswith('_pkg...
import os.path import pytest import rain.compiler as C def ls(*path): path = os.path.join(*path) for file in os.listdir(path): yield os.path.join(path, file) def lsrn(*path, recurse=False): for file in ls(*path): if os.path.isfile(file) and file.endswith('.rn') and not file.endswith('_pkg.rn'): yi...
import os.path import pytest import rain.compiler as C def ls(*path): path = os.path.join(*path) for file in os.listdir(path): yield os.path.join(path, file) def lsrn(*path, recurse=False): for file in ls(*path): if os.path.isfile(file) and file.endswith('.rn') and not file.endswith('_pkg.rn'): yi...
<commit_before>import os.path import pytest import rain.compiler as C def ls(*path): path = os.path.join(*path) for file in os.listdir(path): yield os.path.join(path, file) def lsrn(*path, recurse=False): for file in ls(*path): if os.path.isfile(file) and file.endswith('.rn') and not file.endswith('_pkg...
05dbb8055f4e1c61d04daf8324169c7834b5393b
tests/test_get_user_config.py
tests/test_get_user_config.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_get_user_config -------------------- Tests formerly known from a unittest residing in test_config.py named """ import pytest @pytest.fixture(scope='function') def back_up_rc(request): """ Back up an existing cookiecutter rc and restore it after the tes...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_get_user_config -------------------- Tests formerly known from a unittest residing in test_config.py named """ import os import shutil import pytest @pytest.fixture(scope='function') def back_up_rc(request): """ Back up an existing cookiecutter rc and ...
Remove self references from setup/teardown
Remove self references from setup/teardown
Python
bsd-3-clause
nhomar/cookiecutter,audreyr/cookiecutter,vincentbernat/cookiecutter,cguardia/cookiecutter,luzfcb/cookiecutter,dajose/cookiecutter,vincentbernat/cookiecutter,dajose/cookiecutter,janusnic/cookiecutter,atlassian/cookiecutter,jhermann/cookiecutter,0k/cookiecutter,agconti/cookiecutter,cguardia/cookiecutter,venumech/cookiecu...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_get_user_config -------------------- Tests formerly known from a unittest residing in test_config.py named """ import pytest @pytest.fixture(scope='function') def back_up_rc(request): """ Back up an existing cookiecutter rc and restore it after the tes...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_get_user_config -------------------- Tests formerly known from a unittest residing in test_config.py named """ import os import shutil import pytest @pytest.fixture(scope='function') def back_up_rc(request): """ Back up an existing cookiecutter rc and ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_get_user_config -------------------- Tests formerly known from a unittest residing in test_config.py named """ import pytest @pytest.fixture(scope='function') def back_up_rc(request): """ Back up an existing cookiecutter rc and restore i...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_get_user_config -------------------- Tests formerly known from a unittest residing in test_config.py named """ import os import shutil import pytest @pytest.fixture(scope='function') def back_up_rc(request): """ Back up an existing cookiecutter rc and ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_get_user_config -------------------- Tests formerly known from a unittest residing in test_config.py named """ import pytest @pytest.fixture(scope='function') def back_up_rc(request): """ Back up an existing cookiecutter rc and restore it after the tes...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_get_user_config -------------------- Tests formerly known from a unittest residing in test_config.py named """ import pytest @pytest.fixture(scope='function') def back_up_rc(request): """ Back up an existing cookiecutter rc and restore i...
384e7076f8c07f6192f11a813569540ddc98cc0c
kmeans.py
kmeans.py
import numpy as np class KMeans(object): def __init__(self, clusters, init=None): self.clusters = clusters self.init = init self.centroids = np.array([]) self.partition = np.array([]) def cluster(self, dataset): # Randomly choose initial set of centroids if undefined ...
import numpy as np class KMeans: def __init__(self, clusters, init=None): self.clusters = clusters self.init = init self.centroids = None self.partition = None def cluster(self, dataset): # Randomly choose initial set of centroids if undefined if not self.init: ...
Use numpy.random.choice in place of numpy.random.randint.
Use numpy.random.choice in place of numpy.random.randint. Allows sampling without replacement; hence, removing the possibility of choosing equal initial centroids.
Python
mit
kubkon/kmeans
import numpy as np class KMeans(object): def __init__(self, clusters, init=None): self.clusters = clusters self.init = init self.centroids = np.array([]) self.partition = np.array([]) def cluster(self, dataset): # Randomly choose initial set of centroids if undefined ...
import numpy as np class KMeans: def __init__(self, clusters, init=None): self.clusters = clusters self.init = init self.centroids = None self.partition = None def cluster(self, dataset): # Randomly choose initial set of centroids if undefined if not self.init: ...
<commit_before>import numpy as np class KMeans(object): def __init__(self, clusters, init=None): self.clusters = clusters self.init = init self.centroids = np.array([]) self.partition = np.array([]) def cluster(self, dataset): # Randomly choose initial set of centroids ...
import numpy as np class KMeans: def __init__(self, clusters, init=None): self.clusters = clusters self.init = init self.centroids = None self.partition = None def cluster(self, dataset): # Randomly choose initial set of centroids if undefined if not self.init: ...
import numpy as np class KMeans(object): def __init__(self, clusters, init=None): self.clusters = clusters self.init = init self.centroids = np.array([]) self.partition = np.array([]) def cluster(self, dataset): # Randomly choose initial set of centroids if undefined ...
<commit_before>import numpy as np class KMeans(object): def __init__(self, clusters, init=None): self.clusters = clusters self.init = init self.centroids = np.array([]) self.partition = np.array([]) def cluster(self, dataset): # Randomly choose initial set of centroids ...
ad42c66676cc8b7778a4020fff3402bc100f212c
material/admin/__init__.py
material/admin/__init__.py
default_app_config = 'material.admin.apps.MaterialAdminConfig'
default_app_config = 'material.admin.apps.MaterialAdminConfig' try: from . import modules admin = modules.Admin() except ImportError: """ Ok, karenina is not installed """
Add module declaration for karenina
Add module declaration for karenina
Python
bsd-3-clause
Axelio/django-material,MonsterKiller/django-material,refnode/django-material,lukasgarcya/django-material,2947721120/django-material,afifnz/django-material,afifnz/django-material,sourabhdattawad/django-material,MonsterKiller/django-material,koopauy/django-material,koopauy/django-material,thiagoramos-luizalabs/django-mat...
default_app_config = 'material.admin.apps.MaterialAdminConfig'Add module declaration for karenina
default_app_config = 'material.admin.apps.MaterialAdminConfig' try: from . import modules admin = modules.Admin() except ImportError: """ Ok, karenina is not installed """
<commit_before>default_app_config = 'material.admin.apps.MaterialAdminConfig'<commit_msg>Add module declaration for karenina<commit_after>
default_app_config = 'material.admin.apps.MaterialAdminConfig' try: from . import modules admin = modules.Admin() except ImportError: """ Ok, karenina is not installed """
default_app_config = 'material.admin.apps.MaterialAdminConfig'Add module declaration for kareninadefault_app_config = 'material.admin.apps.MaterialAdminConfig' try: from . import modules admin = modules.Admin() except ImportError: """ Ok, karenina is not installed """
<commit_before>default_app_config = 'material.admin.apps.MaterialAdminConfig'<commit_msg>Add module declaration for karenina<commit_after>default_app_config = 'material.admin.apps.MaterialAdminConfig' try: from . import modules admin = modules.Admin() except ImportError: """ Ok, karenina is not instal...
b2badddd5fb58d6928bdfce84e88951e190f15fb
02/test_move.py
02/test_move.py
from move import load_moves, encode_moves, normalize_index, move import unittest class TestMove(unittest.TestCase): def setUp(self): self.moves = ['ULL', 'RRDDD', 'LURDL', 'UUUUD'] def test_load_moves(self): assert load_moves('example.txt') == self.moves def test_encode_moves(self): ...
from move import load_moves, encode_moves, normalize_index, move import unittest class TestMove(unittest.TestCase): def setUp(self): self.moves = ['ULL', 'RRDDD', 'LURDL', 'UUUUD'] def test_load_moves(self): assert load_moves('example.txt') == self.moves def test_encode_moves(self): ...
Add tests for alternate number pad.
Add tests for alternate number pad.
Python
mit
machinelearningdeveloper/aoc_2016
from move import load_moves, encode_moves, normalize_index, move import unittest class TestMove(unittest.TestCase): def setUp(self): self.moves = ['ULL', 'RRDDD', 'LURDL', 'UUUUD'] def test_load_moves(self): assert load_moves('example.txt') == self.moves def test_encode_moves(self): ...
from move import load_moves, encode_moves, normalize_index, move import unittest class TestMove(unittest.TestCase): def setUp(self): self.moves = ['ULL', 'RRDDD', 'LURDL', 'UUUUD'] def test_load_moves(self): assert load_moves('example.txt') == self.moves def test_encode_moves(self): ...
<commit_before>from move import load_moves, encode_moves, normalize_index, move import unittest class TestMove(unittest.TestCase): def setUp(self): self.moves = ['ULL', 'RRDDD', 'LURDL', 'UUUUD'] def test_load_moves(self): assert load_moves('example.txt') == self.moves def test_encode...
from move import load_moves, encode_moves, normalize_index, move import unittest class TestMove(unittest.TestCase): def setUp(self): self.moves = ['ULL', 'RRDDD', 'LURDL', 'UUUUD'] def test_load_moves(self): assert load_moves('example.txt') == self.moves def test_encode_moves(self): ...
from move import load_moves, encode_moves, normalize_index, move import unittest class TestMove(unittest.TestCase): def setUp(self): self.moves = ['ULL', 'RRDDD', 'LURDL', 'UUUUD'] def test_load_moves(self): assert load_moves('example.txt') == self.moves def test_encode_moves(self): ...
<commit_before>from move import load_moves, encode_moves, normalize_index, move import unittest class TestMove(unittest.TestCase): def setUp(self): self.moves = ['ULL', 'RRDDD', 'LURDL', 'UUUUD'] def test_load_moves(self): assert load_moves('example.txt') == self.moves def test_encode...
2a0a29effa48caf5d95ed892d85cee235ebe1624
lamvery/utils.py
lamvery/utils.py
# -*- coding: utf-8 -*- import os import sys import re import shlex import subprocess from termcolor import cprint ENV_PATTERN = re.compile('^(?P<name>[^\s]+)\s*=\s*(?P<value>.+)$') def previous_alias(alias): return '{}-pre'.format(alias) def parse_env_args(env): if not isinstance(env, list): retu...
# -*- coding: utf-8 -*- import os import sys import re import shlex import subprocess ENV_PATTERN = re.compile('^(?P<name>[^\s]+)\s*=\s*(?P<value>.+)$') def previous_alias(alias): return '{}-pre'.format(alias) def parse_env_args(env): if not isinstance(env, list): return None ret = {} for...
Fix error when import lamvery in function
Fix error when import lamvery in function
Python
mit
marcy-terui/lamvery,marcy-terui/lamvery
# -*- coding: utf-8 -*- import os import sys import re import shlex import subprocess from termcolor import cprint ENV_PATTERN = re.compile('^(?P<name>[^\s]+)\s*=\s*(?P<value>.+)$') def previous_alias(alias): return '{}-pre'.format(alias) def parse_env_args(env): if not isinstance(env, list): retu...
# -*- coding: utf-8 -*- import os import sys import re import shlex import subprocess ENV_PATTERN = re.compile('^(?P<name>[^\s]+)\s*=\s*(?P<value>.+)$') def previous_alias(alias): return '{}-pre'.format(alias) def parse_env_args(env): if not isinstance(env, list): return None ret = {} for...
<commit_before># -*- coding: utf-8 -*- import os import sys import re import shlex import subprocess from termcolor import cprint ENV_PATTERN = re.compile('^(?P<name>[^\s]+)\s*=\s*(?P<value>.+)$') def previous_alias(alias): return '{}-pre'.format(alias) def parse_env_args(env): if not isinstance(env, list...
# -*- coding: utf-8 -*- import os import sys import re import shlex import subprocess ENV_PATTERN = re.compile('^(?P<name>[^\s]+)\s*=\s*(?P<value>.+)$') def previous_alias(alias): return '{}-pre'.format(alias) def parse_env_args(env): if not isinstance(env, list): return None ret = {} for...
# -*- coding: utf-8 -*- import os import sys import re import shlex import subprocess from termcolor import cprint ENV_PATTERN = re.compile('^(?P<name>[^\s]+)\s*=\s*(?P<value>.+)$') def previous_alias(alias): return '{}-pre'.format(alias) def parse_env_args(env): if not isinstance(env, list): retu...
<commit_before># -*- coding: utf-8 -*- import os import sys import re import shlex import subprocess from termcolor import cprint ENV_PATTERN = re.compile('^(?P<name>[^\s]+)\s*=\s*(?P<value>.+)$') def previous_alias(alias): return '{}-pre'.format(alias) def parse_env_args(env): if not isinstance(env, list...
ce59932d485440c592abbacc16c1fc32a7cde6e2
jktest/testcase.py
jktest/testcase.py
import unittest from jktest.config import TestConfig from jktest.jkind import JKind from jktest.results import ResultList class TestCase( unittest.TestCase ): def assertTrue( self, expr, msg = None ): super( TestCase, self ).assertTrue( expr, msg ) class JKTestCase( unittest.TestCase ): # class JKTestC...
import unittest from jktest.config import TestConfig from jktest.jkind import JKind from jktest.results import ResultList class TestCase( unittest.TestCase ): def assertTrue( self, expr, msg = None ): super( TestCase, self ).assertTrue( expr, msg ) class JKTestCase( unittest.TestCase ): # class JKTestC...
Add prints for output formatting
Add prints for output formatting
Python
bsd-3-clause
agacek/jkindRegression,pr-martin/jkindRegression
import unittest from jktest.config import TestConfig from jktest.jkind import JKind from jktest.results import ResultList class TestCase( unittest.TestCase ): def assertTrue( self, expr, msg = None ): super( TestCase, self ).assertTrue( expr, msg ) class JKTestCase( unittest.TestCase ): # class JKTestC...
import unittest from jktest.config import TestConfig from jktest.jkind import JKind from jktest.results import ResultList class TestCase( unittest.TestCase ): def assertTrue( self, expr, msg = None ): super( TestCase, self ).assertTrue( expr, msg ) class JKTestCase( unittest.TestCase ): # class JKTestC...
<commit_before> import unittest from jktest.config import TestConfig from jktest.jkind import JKind from jktest.results import ResultList class TestCase( unittest.TestCase ): def assertTrue( self, expr, msg = None ): super( TestCase, self ).assertTrue( expr, msg ) class JKTestCase( unittest.TestCase ): ...
import unittest from jktest.config import TestConfig from jktest.jkind import JKind from jktest.results import ResultList class TestCase( unittest.TestCase ): def assertTrue( self, expr, msg = None ): super( TestCase, self ).assertTrue( expr, msg ) class JKTestCase( unittest.TestCase ): # class JKTestC...
import unittest from jktest.config import TestConfig from jktest.jkind import JKind from jktest.results import ResultList class TestCase( unittest.TestCase ): def assertTrue( self, expr, msg = None ): super( TestCase, self ).assertTrue( expr, msg ) class JKTestCase( unittest.TestCase ): # class JKTestC...
<commit_before> import unittest from jktest.config import TestConfig from jktest.jkind import JKind from jktest.results import ResultList class TestCase( unittest.TestCase ): def assertTrue( self, expr, msg = None ): super( TestCase, self ).assertTrue( expr, msg ) class JKTestCase( unittest.TestCase ): ...
07bcbe76f33cb4354cb90744f46c5528169183e3
launch_pyslvs.py
launch_pyslvs.py
# -*- coding: utf-8 -*- ##Pyslvs - Dimensional Synthesis of Planar Four-bar Linkages in PyQt5 GUI. ##Copyright (C) 2016 Yuan Chang [daan0014119@gmail.com] from sys import exit if __name__=='__main__': try: from core.info.info import show_info, Pyslvs_Splash args = show_info() from PyQt5.QtWi...
# -*- coding: utf-8 -*- ##Pyslvs - Dimensional Synthesis of Planar Four-bar Linkages in PyQt5 GUI. ##Copyright (C) 2016 Yuan Chang [daan0014119@gmail.com] from sys import exit if __name__=='__main__': try: from core.info.info import show_info, Pyslvs_Splash args = show_info() from PyQt5.QtWi...
Change the Error show in command window.
Change the Error show in command window.
Python
agpl-3.0
40323230/Pyslvs-PyQt5,KmolYuan/Pyslvs-PyQt5,KmolYuan/Pyslvs-PyQt5
# -*- coding: utf-8 -*- ##Pyslvs - Dimensional Synthesis of Planar Four-bar Linkages in PyQt5 GUI. ##Copyright (C) 2016 Yuan Chang [daan0014119@gmail.com] from sys import exit if __name__=='__main__': try: from core.info.info import show_info, Pyslvs_Splash args = show_info() from PyQt5.QtWi...
# -*- coding: utf-8 -*- ##Pyslvs - Dimensional Synthesis of Planar Four-bar Linkages in PyQt5 GUI. ##Copyright (C) 2016 Yuan Chang [daan0014119@gmail.com] from sys import exit if __name__=='__main__': try: from core.info.info import show_info, Pyslvs_Splash args = show_info() from PyQt5.QtWi...
<commit_before># -*- coding: utf-8 -*- ##Pyslvs - Dimensional Synthesis of Planar Four-bar Linkages in PyQt5 GUI. ##Copyright (C) 2016 Yuan Chang [daan0014119@gmail.com] from sys import exit if __name__=='__main__': try: from core.info.info import show_info, Pyslvs_Splash args = show_info() ...
# -*- coding: utf-8 -*- ##Pyslvs - Dimensional Synthesis of Planar Four-bar Linkages in PyQt5 GUI. ##Copyright (C) 2016 Yuan Chang [daan0014119@gmail.com] from sys import exit if __name__=='__main__': try: from core.info.info import show_info, Pyslvs_Splash args = show_info() from PyQt5.QtWi...
# -*- coding: utf-8 -*- ##Pyslvs - Dimensional Synthesis of Planar Four-bar Linkages in PyQt5 GUI. ##Copyright (C) 2016 Yuan Chang [daan0014119@gmail.com] from sys import exit if __name__=='__main__': try: from core.info.info import show_info, Pyslvs_Splash args = show_info() from PyQt5.QtWi...
<commit_before># -*- coding: utf-8 -*- ##Pyslvs - Dimensional Synthesis of Planar Four-bar Linkages in PyQt5 GUI. ##Copyright (C) 2016 Yuan Chang [daan0014119@gmail.com] from sys import exit if __name__=='__main__': try: from core.info.info import show_info, Pyslvs_Splash args = show_info() ...
79dd3b4d0bd1fb331558892b5d29b223d4022657
feedhq/urls.py
feedhq/urls.py
from django.conf import settings from django.conf.urls.defaults import url, patterns, include from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.http import HttpResponse, HttpResponsePermanentRedirect from ratelimitbackend import admin admin.autod...
from django.conf import settings from django.conf.urls.defaults import url, patterns, include from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.http import HttpResponse, HttpResponsePermanentRedirect from ratelimitbackend import admin admin.autod...
Make sure to import the user monkeypatch before anything else that touches it
Make sure to import the user monkeypatch before anything else that touches it
Python
bsd-3-clause
rmoorman/feedhq,vincentbernat/feedhq,vincentbernat/feedhq,rmoorman/feedhq,rmoorman/feedhq,rmoorman/feedhq,feedhq/feedhq,vincentbernat/feedhq,vincentbernat/feedhq,feedhq/feedhq,feedhq/feedhq,rmoorman/feedhq,feedhq/feedhq,vincentbernat/feedhq,feedhq/feedhq
from django.conf import settings from django.conf.urls.defaults import url, patterns, include from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.http import HttpResponse, HttpResponsePermanentRedirect from ratelimitbackend import admin admin.autod...
from django.conf import settings from django.conf.urls.defaults import url, patterns, include from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.http import HttpResponse, HttpResponsePermanentRedirect from ratelimitbackend import admin admin.autod...
<commit_before>from django.conf import settings from django.conf.urls.defaults import url, patterns, include from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.http import HttpResponse, HttpResponsePermanentRedirect from ratelimitbackend import ad...
from django.conf import settings from django.conf.urls.defaults import url, patterns, include from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.http import HttpResponse, HttpResponsePermanentRedirect from ratelimitbackend import admin admin.autod...
from django.conf import settings from django.conf.urls.defaults import url, patterns, include from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.http import HttpResponse, HttpResponsePermanentRedirect from ratelimitbackend import admin admin.autod...
<commit_before>from django.conf import settings from django.conf.urls.defaults import url, patterns, include from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.http import HttpResponse, HttpResponsePermanentRedirect from ratelimitbackend import ad...
b7d0d81bd6030abfee5b3993d42e02896e8c0b50
edpwd/random_string.py
edpwd/random_string.py
# -*- coding: utf-8 import random, string def random_string(length, letters=True, digits=True, punctuation=False, whitespace=False): """ Returns a random string """ chars = '' if letters: chars += string.ascii_letters if digits: chars += string.digits ...
# -*- coding: utf-8 from random import choice import string def random_string(length, letters=True, digits=True, punctuation=False, whitespace=False): """ Returns a random string """ chars = '' if letters: chars += string.ascii_letters if digits: chars +...
Revert "Use random.sample() rather than reinventing it."
Revert "Use random.sample() rather than reinventing it." My wrong. sample() doesn't allow repeating characters, so it's not exactly the same.
Python
bsd-2-clause
tampakrap/edpwd
# -*- coding: utf-8 import random, string def random_string(length, letters=True, digits=True, punctuation=False, whitespace=False): """ Returns a random string """ chars = '' if letters: chars += string.ascii_letters if digits: chars += string.digits ...
# -*- coding: utf-8 from random import choice import string def random_string(length, letters=True, digits=True, punctuation=False, whitespace=False): """ Returns a random string """ chars = '' if letters: chars += string.ascii_letters if digits: chars +...
<commit_before># -*- coding: utf-8 import random, string def random_string(length, letters=True, digits=True, punctuation=False, whitespace=False): """ Returns a random string """ chars = '' if letters: chars += string.ascii_letters if digits: chars += s...
# -*- coding: utf-8 from random import choice import string def random_string(length, letters=True, digits=True, punctuation=False, whitespace=False): """ Returns a random string """ chars = '' if letters: chars += string.ascii_letters if digits: chars +...
# -*- coding: utf-8 import random, string def random_string(length, letters=True, digits=True, punctuation=False, whitespace=False): """ Returns a random string """ chars = '' if letters: chars += string.ascii_letters if digits: chars += string.digits ...
<commit_before># -*- coding: utf-8 import random, string def random_string(length, letters=True, digits=True, punctuation=False, whitespace=False): """ Returns a random string """ chars = '' if letters: chars += string.ascii_letters if digits: chars += s...
cb39c1edf395f7da1c241010fc833fe512fa74ac
bcbio/distributed/clargs.py
bcbio/distributed/clargs.py
"""Parsing of command line arguments into parallel inputs. """ def to_parallel(args, module="bcbio.distributed"): """Convert input arguments into a parallel dictionary for passing to processing. """ ptype, cores = _get_cores_and_type(args.numcores, getattr(args, "paralleltype", None), ...
"""Parsing of command line arguments into parallel inputs. """ def to_parallel(args, module="bcbio.distributed"): """Convert input arguments into a parallel dictionary for passing to processing. """ ptype, cores = _get_cores_and_type(args.numcores, getattr(args, "para...
Fix for bcbio-nextgen-vm not passing the local_controller option.
Fix for bcbio-nextgen-vm not passing the local_controller option.
Python
mit
brainstorm/bcbio-nextgen,brainstorm/bcbio-nextgen,vladsaveliev/bcbio-nextgen,vladsaveliev/bcbio-nextgen,lbeltrame/bcbio-nextgen,brainstorm/bcbio-nextgen,lbeltrame/bcbio-nextgen,a113n/bcbio-nextgen,biocyberman/bcbio-nextgen,vladsaveliev/bcbio-nextgen,lbeltrame/bcbio-nextgen,chapmanb/bcbio-nextgen,a113n/bcbio-nextgen,cha...
"""Parsing of command line arguments into parallel inputs. """ def to_parallel(args, module="bcbio.distributed"): """Convert input arguments into a parallel dictionary for passing to processing. """ ptype, cores = _get_cores_and_type(args.numcores, getattr(args, "paralleltype", None), ...
"""Parsing of command line arguments into parallel inputs. """ def to_parallel(args, module="bcbio.distributed"): """Convert input arguments into a parallel dictionary for passing to processing. """ ptype, cores = _get_cores_and_type(args.numcores, getattr(args, "para...
<commit_before>"""Parsing of command line arguments into parallel inputs. """ def to_parallel(args, module="bcbio.distributed"): """Convert input arguments into a parallel dictionary for passing to processing. """ ptype, cores = _get_cores_and_type(args.numcores, getattr(args, "paralleltype", None), ...
"""Parsing of command line arguments into parallel inputs. """ def to_parallel(args, module="bcbio.distributed"): """Convert input arguments into a parallel dictionary for passing to processing. """ ptype, cores = _get_cores_and_type(args.numcores, getattr(args, "para...
"""Parsing of command line arguments into parallel inputs. """ def to_parallel(args, module="bcbio.distributed"): """Convert input arguments into a parallel dictionary for passing to processing. """ ptype, cores = _get_cores_and_type(args.numcores, getattr(args, "paralleltype", None), ...
<commit_before>"""Parsing of command line arguments into parallel inputs. """ def to_parallel(args, module="bcbio.distributed"): """Convert input arguments into a parallel dictionary for passing to processing. """ ptype, cores = _get_cores_and_type(args.numcores, getattr(args, "paralleltype", None), ...
10be4d04d5e96993f5dd969b3b1fdb0686b11382
examples/basic_lock.py
examples/basic_lock.py
import asyncio import logging from aioredlock import Aioredlock, LockError async def basic_lock(): lock_manager = Aioredlock([{ 'host': 'localhost', 'port': 6374, 'db': 0, 'password': None }]) try: lock = await lock_manager.lock("resource") except LockError: ...
import asyncio import logging from aioredlock import Aioredlock, LockError async def basic_lock(): lock_manager = Aioredlock([{ 'host': 'localhost', 'port': 6379, 'db': 0, 'password': None }]) try: lock = await lock_manager.lock("resource") except LockError: ...
Revert unintented port change in example
Revert unintented port change in example
Python
mit
joanvila/aioredlock
import asyncio import logging from aioredlock import Aioredlock, LockError async def basic_lock(): lock_manager = Aioredlock([{ 'host': 'localhost', 'port': 6374, 'db': 0, 'password': None }]) try: lock = await lock_manager.lock("resource") except LockError: ...
import asyncio import logging from aioredlock import Aioredlock, LockError async def basic_lock(): lock_manager = Aioredlock([{ 'host': 'localhost', 'port': 6379, 'db': 0, 'password': None }]) try: lock = await lock_manager.lock("resource") except LockError: ...
<commit_before>import asyncio import logging from aioredlock import Aioredlock, LockError async def basic_lock(): lock_manager = Aioredlock([{ 'host': 'localhost', 'port': 6374, 'db': 0, 'password': None }]) try: lock = await lock_manager.lock("resource") exce...
import asyncio import logging from aioredlock import Aioredlock, LockError async def basic_lock(): lock_manager = Aioredlock([{ 'host': 'localhost', 'port': 6379, 'db': 0, 'password': None }]) try: lock = await lock_manager.lock("resource") except LockError: ...
import asyncio import logging from aioredlock import Aioredlock, LockError async def basic_lock(): lock_manager = Aioredlock([{ 'host': 'localhost', 'port': 6374, 'db': 0, 'password': None }]) try: lock = await lock_manager.lock("resource") except LockError: ...
<commit_before>import asyncio import logging from aioredlock import Aioredlock, LockError async def basic_lock(): lock_manager = Aioredlock([{ 'host': 'localhost', 'port': 6374, 'db': 0, 'password': None }]) try: lock = await lock_manager.lock("resource") exce...
99884ec3e960fa7b73e10a6969c455de6eca542b
src/ggrc_workflows/migrations/versions/20140715214934_26d9c9c91542_add_cycletaskgroupobject_object.py
src/ggrc_workflows/migrations/versions/20140715214934_26d9c9c91542_add_cycletaskgroupobject_object.py
"""Add CycleTaskGroupObject.object Revision ID: 26d9c9c91542 Revises: 19a67dc67c3 Create Date: 2014-07-15 21:49:34.073412 """ # revision identifiers, used by Alembic. revision = '26d9c9c91542' down_revision = '19a67dc67c3' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('cycle_tas...
"""Add CycleTaskGroupObject.object Revision ID: 26d9c9c91542 Revises: 19a67dc67c3 Create Date: 2014-07-15 21:49:34.073412 """ # revision identifiers, used by Alembic. revision = '26d9c9c91542' down_revision = '19a67dc67c3' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('cycle_tas...
Update migration to fix existing CycleTaskGroupObjects
Update migration to fix existing CycleTaskGroupObjects
Python
apache-2.0
NejcZupec/ggrc-core,hasanalom/ggrc-core,hyperNURb/ggrc-core,hasanalom/ggrc-core,vladan-m/ggrc-core,plamut/ggrc-core,uskudnik/ggrc-core,j0gurt/ggrc-core,VinnieJohns/ggrc-core,jmakov/ggrc-core,AleksNeStu/ggrc-core,hyperNURb/ggrc-core,j0gurt/ggrc-core,kr41/ggrc-core,hasanalom/ggrc-core,edofic/ggrc-core,prasannav7/ggrc-cor...
"""Add CycleTaskGroupObject.object Revision ID: 26d9c9c91542 Revises: 19a67dc67c3 Create Date: 2014-07-15 21:49:34.073412 """ # revision identifiers, used by Alembic. revision = '26d9c9c91542' down_revision = '19a67dc67c3' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('cycle_tas...
"""Add CycleTaskGroupObject.object Revision ID: 26d9c9c91542 Revises: 19a67dc67c3 Create Date: 2014-07-15 21:49:34.073412 """ # revision identifiers, used by Alembic. revision = '26d9c9c91542' down_revision = '19a67dc67c3' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('cycle_tas...
<commit_before> """Add CycleTaskGroupObject.object Revision ID: 26d9c9c91542 Revises: 19a67dc67c3 Create Date: 2014-07-15 21:49:34.073412 """ # revision identifiers, used by Alembic. revision = '26d9c9c91542' down_revision = '19a67dc67c3' from alembic import op import sqlalchemy as sa def upgrade(): op.add_co...
"""Add CycleTaskGroupObject.object Revision ID: 26d9c9c91542 Revises: 19a67dc67c3 Create Date: 2014-07-15 21:49:34.073412 """ # revision identifiers, used by Alembic. revision = '26d9c9c91542' down_revision = '19a67dc67c3' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('cycle_tas...
"""Add CycleTaskGroupObject.object Revision ID: 26d9c9c91542 Revises: 19a67dc67c3 Create Date: 2014-07-15 21:49:34.073412 """ # revision identifiers, used by Alembic. revision = '26d9c9c91542' down_revision = '19a67dc67c3' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('cycle_tas...
<commit_before> """Add CycleTaskGroupObject.object Revision ID: 26d9c9c91542 Revises: 19a67dc67c3 Create Date: 2014-07-15 21:49:34.073412 """ # revision identifiers, used by Alembic. revision = '26d9c9c91542' down_revision = '19a67dc67c3' from alembic import op import sqlalchemy as sa def upgrade(): op.add_co...
18204d7e508052cfabc58bc58e4bb21be13fbd00
src/webapp/tasks.py
src/webapp/tasks.py
from uwsgidecorators import spool import database as db from database.model import Team from geotools import simple_distance from geotools.routing import MapPoint @spool def get_aqua_distance(args): team = db.session.query(Team).filter(Team.id == int(args["team_id"])).first() if team is None: return ...
import database as db from database.model import Team from geotools import simple_distance from geotools.routing import MapPoint try: from uwsgidecorators import spool except ImportError as e: def spool(fn): def nufun(*args, **kwargs): raise e return nufun @spool def get_aqua_dist...
Raise import errors for uwsgi decorators only if the task is called.
Raise import errors for uwsgi decorators only if the task is called.
Python
bsd-3-clause
janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system
from uwsgidecorators import spool import database as db from database.model import Team from geotools import simple_distance from geotools.routing import MapPoint @spool def get_aqua_distance(args): team = db.session.query(Team).filter(Team.id == int(args["team_id"])).first() if team is None: return ...
import database as db from database.model import Team from geotools import simple_distance from geotools.routing import MapPoint try: from uwsgidecorators import spool except ImportError as e: def spool(fn): def nufun(*args, **kwargs): raise e return nufun @spool def get_aqua_dist...
<commit_before>from uwsgidecorators import spool import database as db from database.model import Team from geotools import simple_distance from geotools.routing import MapPoint @spool def get_aqua_distance(args): team = db.session.query(Team).filter(Team.id == int(args["team_id"])).first() if team is None: ...
import database as db from database.model import Team from geotools import simple_distance from geotools.routing import MapPoint try: from uwsgidecorators import spool except ImportError as e: def spool(fn): def nufun(*args, **kwargs): raise e return nufun @spool def get_aqua_dist...
from uwsgidecorators import spool import database as db from database.model import Team from geotools import simple_distance from geotools.routing import MapPoint @spool def get_aqua_distance(args): team = db.session.query(Team).filter(Team.id == int(args["team_id"])).first() if team is None: return ...
<commit_before>from uwsgidecorators import spool import database as db from database.model import Team from geotools import simple_distance from geotools.routing import MapPoint @spool def get_aqua_distance(args): team = db.session.query(Team).filter(Team.id == int(args["team_id"])).first() if team is None: ...
7f0b561625b94c6fa6b14dab4bbe02fa28d38bfa
statement_format.py
statement_format.py
import pandas as pd def fn(row): if row['Type'] == 'DIRECT DEBIT': return 'DD' if row['Type'] == 'DIRECT CREDIT' or row['Spending Category'] == 'INCOME': return 'BP' if row['Amount (GBP)'] < 0: return 'SO' raise Exception('Unintended state') df = pd.read_csv('statement.csv') ...
import pandas as pd def fn(row): if row['Type'] == 'DIRECT DEBIT': return 'DD' if row['Type'] == 'DIRECT CREDIT' or row['Spending Category'] == 'INCOME': return 'BP' if row['Amount (GBP)'] < 0: return 'SO' raise Exception('Unintended state') df = pd.read_csv('statement.csv') ...
Correct numbers. Now to format output
Correct numbers. Now to format output
Python
mit
noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit
import pandas as pd def fn(row): if row['Type'] == 'DIRECT DEBIT': return 'DD' if row['Type'] == 'DIRECT CREDIT' or row['Spending Category'] == 'INCOME': return 'BP' if row['Amount (GBP)'] < 0: return 'SO' raise Exception('Unintended state') df = pd.read_csv('statement.csv') ...
import pandas as pd def fn(row): if row['Type'] == 'DIRECT DEBIT': return 'DD' if row['Type'] == 'DIRECT CREDIT' or row['Spending Category'] == 'INCOME': return 'BP' if row['Amount (GBP)'] < 0: return 'SO' raise Exception('Unintended state') df = pd.read_csv('statement.csv') ...
<commit_before>import pandas as pd def fn(row): if row['Type'] == 'DIRECT DEBIT': return 'DD' if row['Type'] == 'DIRECT CREDIT' or row['Spending Category'] == 'INCOME': return 'BP' if row['Amount (GBP)'] < 0: return 'SO' raise Exception('Unintended state') df = pd.read_csv('s...
import pandas as pd def fn(row): if row['Type'] == 'DIRECT DEBIT': return 'DD' if row['Type'] == 'DIRECT CREDIT' or row['Spending Category'] == 'INCOME': return 'BP' if row['Amount (GBP)'] < 0: return 'SO' raise Exception('Unintended state') df = pd.read_csv('statement.csv') ...
import pandas as pd def fn(row): if row['Type'] == 'DIRECT DEBIT': return 'DD' if row['Type'] == 'DIRECT CREDIT' or row['Spending Category'] == 'INCOME': return 'BP' if row['Amount (GBP)'] < 0: return 'SO' raise Exception('Unintended state') df = pd.read_csv('statement.csv') ...
<commit_before>import pandas as pd def fn(row): if row['Type'] == 'DIRECT DEBIT': return 'DD' if row['Type'] == 'DIRECT CREDIT' or row['Spending Category'] == 'INCOME': return 'BP' if row['Amount (GBP)'] < 0: return 'SO' raise Exception('Unintended state') df = pd.read_csv('s...
05f220d6090be58ee465b6f30d01e14079bcbeba
corehq/messaging/scheduling/scheduling_partitioned/dbaccessors.py
corehq/messaging/scheduling/scheduling_partitioned/dbaccessors.py
def save_schedule_instance(instance): instance.save()
from corehq.sql_db.util import ( get_object_from_partitioned_database, save_object_to_partitioned_database, run_query_across_partitioned_databases, ) from datetime import datetime from django.db.models import Q def get_schedule_instance(schedule_instance_id): from corehq.messaging.scheduling.schedulin...
Add functions for processing ScheduleInstances
Add functions for processing ScheduleInstances
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
def save_schedule_instance(instance): instance.save() Add functions for processing ScheduleInstances
from corehq.sql_db.util import ( get_object_from_partitioned_database, save_object_to_partitioned_database, run_query_across_partitioned_databases, ) from datetime import datetime from django.db.models import Q def get_schedule_instance(schedule_instance_id): from corehq.messaging.scheduling.schedulin...
<commit_before> def save_schedule_instance(instance): instance.save() <commit_msg>Add functions for processing ScheduleInstances<commit_after>
from corehq.sql_db.util import ( get_object_from_partitioned_database, save_object_to_partitioned_database, run_query_across_partitioned_databases, ) from datetime import datetime from django.db.models import Q def get_schedule_instance(schedule_instance_id): from corehq.messaging.scheduling.schedulin...
def save_schedule_instance(instance): instance.save() Add functions for processing ScheduleInstancesfrom corehq.sql_db.util import ( get_object_from_partitioned_database, save_object_to_partitioned_database, run_query_across_partitioned_databases, ) from datetime import datetime from django.db.models ...
<commit_before> def save_schedule_instance(instance): instance.save() <commit_msg>Add functions for processing ScheduleInstances<commit_after>from corehq.sql_db.util import ( get_object_from_partitioned_database, save_object_to_partitioned_database, run_query_across_partitioned_databases, ) from dateti...
955d83391540d9d1dd7732c204a99a51789745e4
config.py
config.py
from os import getenv, \ path from time import time from datetime import timedelta class Config(object): AWS_ACCESS_KEY_ID = getenv('AWS_ACCESS_KEY_ID') AWS_REGION = getenv('AWS_REGION') AWS_S3_BUCKET = getenv('AWS_S3_BUCKET') AWS_SECRET_ACCESS_KEY = getenv('AWS_SECRET_ACCESS_KEY') ...
from os import getenv, \ path from time import time from datetime import timedelta class Config(object): AWS_ACCESS_KEY_ID = getenv('AWS_ACCESS_KEY_ID') AWS_REGION = getenv('AWS_REGION') AWS_S3_BUCKET = getenv('AWS_S3_BUCKET') AWS_SECRET_ACCESS_KEY = getenv('AWS_SECRET_ACCESS_KEY') ...
Support mysql2: prefixed database url's
Support mysql2: prefixed database url's
Python
mit
taeram/aflutter,taeram/aflutter,taeram/aflutter,taeram/aflutter
from os import getenv, \ path from time import time from datetime import timedelta class Config(object): AWS_ACCESS_KEY_ID = getenv('AWS_ACCESS_KEY_ID') AWS_REGION = getenv('AWS_REGION') AWS_S3_BUCKET = getenv('AWS_S3_BUCKET') AWS_SECRET_ACCESS_KEY = getenv('AWS_SECRET_ACCESS_KEY') ...
from os import getenv, \ path from time import time from datetime import timedelta class Config(object): AWS_ACCESS_KEY_ID = getenv('AWS_ACCESS_KEY_ID') AWS_REGION = getenv('AWS_REGION') AWS_S3_BUCKET = getenv('AWS_S3_BUCKET') AWS_SECRET_ACCESS_KEY = getenv('AWS_SECRET_ACCESS_KEY') ...
<commit_before>from os import getenv, \ path from time import time from datetime import timedelta class Config(object): AWS_ACCESS_KEY_ID = getenv('AWS_ACCESS_KEY_ID') AWS_REGION = getenv('AWS_REGION') AWS_S3_BUCKET = getenv('AWS_S3_BUCKET') AWS_SECRET_ACCESS_KEY = getenv('AWS_SECRET_AC...
from os import getenv, \ path from time import time from datetime import timedelta class Config(object): AWS_ACCESS_KEY_ID = getenv('AWS_ACCESS_KEY_ID') AWS_REGION = getenv('AWS_REGION') AWS_S3_BUCKET = getenv('AWS_S3_BUCKET') AWS_SECRET_ACCESS_KEY = getenv('AWS_SECRET_ACCESS_KEY') ...
from os import getenv, \ path from time import time from datetime import timedelta class Config(object): AWS_ACCESS_KEY_ID = getenv('AWS_ACCESS_KEY_ID') AWS_REGION = getenv('AWS_REGION') AWS_S3_BUCKET = getenv('AWS_S3_BUCKET') AWS_SECRET_ACCESS_KEY = getenv('AWS_SECRET_ACCESS_KEY') ...
<commit_before>from os import getenv, \ path from time import time from datetime import timedelta class Config(object): AWS_ACCESS_KEY_ID = getenv('AWS_ACCESS_KEY_ID') AWS_REGION = getenv('AWS_REGION') AWS_S3_BUCKET = getenv('AWS_S3_BUCKET') AWS_SECRET_ACCESS_KEY = getenv('AWS_SECRET_AC...
2e10e1bbfe6c8b7b4fba9adfe0cbb8518a19eeca
config.py
config.py
import toml def parse(file): with open(file) as conffile: data = toml.loads(conffile.read()) return data
import pytoml def parse(file): with open(file) as conffile: data = pytoml.loads(conffile.read()) return data
Use pytoml instead of toml library
Use pytoml instead of toml library
Python
mit
mvdnes/mdms,mvdnes/mdms
import toml def parse(file): with open(file) as conffile: data = toml.loads(conffile.read()) return data Use pytoml instead of toml library
import pytoml def parse(file): with open(file) as conffile: data = pytoml.loads(conffile.read()) return data
<commit_before>import toml def parse(file): with open(file) as conffile: data = toml.loads(conffile.read()) return data <commit_msg>Use pytoml instead of toml library<commit_after>
import pytoml def parse(file): with open(file) as conffile: data = pytoml.loads(conffile.read()) return data
import toml def parse(file): with open(file) as conffile: data = toml.loads(conffile.read()) return data Use pytoml instead of toml libraryimport pytoml def parse(file): with open(file) as conffile: data = pytoml.loads(conffile.read()) return data
<commit_before>import toml def parse(file): with open(file) as conffile: data = toml.loads(conffile.read()) return data <commit_msg>Use pytoml instead of toml library<commit_after>import pytoml def parse(file): with open(file) as conffile: data = pytoml.loads(conffile.read()) return ...
fbe446727b35680e747c74816995f6b7912fffeb
syslights_server.py
syslights_server.py
#!/usr/bin/env python3 import sys import time import glob import serial import psutil CPU_INTERVAL = 0.5 CONNECT_TIMEOUT = 2 BAUD = 4800 def update_loop(conn): while True: load = psutil.cpu_percent(interval=CPU_INTERVAL) scaled_load = int(load * 10) message = str(scaled_load).encode('asc...
#!/usr/bin/env python3 import sys import time import glob import serial import psutil CPU_INTERVAL = 0.5 CONNECT_TIMEOUT = 2 BAUD = 4800 def update_loop(conn): while True: load = psutil.cpu_percent(interval=CPU_INTERVAL) scaled_load = int(load * 10) message = str(scaled_load).encode('asc...
Fix error handling in server
Fix error handling in server
Python
mit
swarmer/syslights
#!/usr/bin/env python3 import sys import time import glob import serial import psutil CPU_INTERVAL = 0.5 CONNECT_TIMEOUT = 2 BAUD = 4800 def update_loop(conn): while True: load = psutil.cpu_percent(interval=CPU_INTERVAL) scaled_load = int(load * 10) message = str(scaled_load).encode('asc...
#!/usr/bin/env python3 import sys import time import glob import serial import psutil CPU_INTERVAL = 0.5 CONNECT_TIMEOUT = 2 BAUD = 4800 def update_loop(conn): while True: load = psutil.cpu_percent(interval=CPU_INTERVAL) scaled_load = int(load * 10) message = str(scaled_load).encode('asc...
<commit_before>#!/usr/bin/env python3 import sys import time import glob import serial import psutil CPU_INTERVAL = 0.5 CONNECT_TIMEOUT = 2 BAUD = 4800 def update_loop(conn): while True: load = psutil.cpu_percent(interval=CPU_INTERVAL) scaled_load = int(load * 10) message = str(scaled_lo...
#!/usr/bin/env python3 import sys import time import glob import serial import psutil CPU_INTERVAL = 0.5 CONNECT_TIMEOUT = 2 BAUD = 4800 def update_loop(conn): while True: load = psutil.cpu_percent(interval=CPU_INTERVAL) scaled_load = int(load * 10) message = str(scaled_load).encode('asc...
#!/usr/bin/env python3 import sys import time import glob import serial import psutil CPU_INTERVAL = 0.5 CONNECT_TIMEOUT = 2 BAUD = 4800 def update_loop(conn): while True: load = psutil.cpu_percent(interval=CPU_INTERVAL) scaled_load = int(load * 10) message = str(scaled_load).encode('asc...
<commit_before>#!/usr/bin/env python3 import sys import time import glob import serial import psutil CPU_INTERVAL = 0.5 CONNECT_TIMEOUT = 2 BAUD = 4800 def update_loop(conn): while True: load = psutil.cpu_percent(interval=CPU_INTERVAL) scaled_load = int(load * 10) message = str(scaled_lo...