commit stringlengths 40 40 | subject stringlengths 1 1.49k | old_file stringlengths 4 311 | new_file stringlengths 4 311 | new_contents stringlengths 1 29.8k | old_contents stringlengths 0 9.9k | lang stringclasses 3
values | proba float64 0 1 |
|---|---|---|---|---|---|---|---|
fa82a17c61698847904fa7dea14414b30b80bdfc | Update InferenceContext attribute documentation | astroid/context.py | astroid/context.py | # Copyright (c) 2015-2016 Cara Vinson <ceridwenv@gmail.com>
# Copyright (c) 2015-2016 Claudiu Popa <pcmanticore@gmail.com>
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
# For details: https://github.com/PyCQA/astroid/blob/master/COPYING.LESSER
"""Various context related utiliti... | # Copyright (c) 2015-2016 Cara Vinson <ceridwenv@gmail.com>
# Copyright (c) 2015-2016 Claudiu Popa <pcmanticore@gmail.com>
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
# For details: https://github.com/PyCQA/astroid/blob/master/COPYING.LESSER
"""Various context related utiliti... | Python | 0 |
cc963ca1a169506ee46c926fd7e7bc41f0b46780 | fix import complete_social_login | rest_auth/registration/serializers.py | rest_auth/registration/serializers.py | from django.http import HttpRequest
from django.conf import settings
from rest_framework import serializers
from requests.exceptions import HTTPError
# Import is needed only if we are using social login, in which
# case the allauth.socialaccount will be declared
if 'allauth.socialaccount' in settings.INSTALLED_APPS:
... | from django.http import HttpRequest
from django.conf import settings
from rest_framework import serializers
from requests.exceptions import HTTPError
# Import is needed only if we are using social login, in which
# case the allauth.socialaccount will be declared
try:
from allauth.socialaccount.helpers import compl... | Python | 0.000005 |
1a9581a33efab4bcf7f1b7a6e555fa373d6f0739 | Fix repo URL in staging report | scripts/GenerateStagingReport.py | scripts/GenerateStagingReport.py | #coding=UTF-8
from BuildArchetypes import archetypes, getDeploymentContext
import argparse, cgi
parser = argparse.ArgumentParser(description="Build report generator")
parser.add_argument("version", type=str, help="Vaadin version that was just built")
parser.add_argument("deployUrl", type=str, help="Base url of the de... | #coding=UTF-8
from BuildArchetypes import archetypes, getDeploymentContext
import argparse, cgi
parser = argparse.ArgumentParser(description="Build report generator")
parser.add_argument("version", type=str, help="Vaadin version that was just built")
parser.add_argument("deployUrl", type=str, help="Base url of the de... | Python | 0.000032 |
ceb5f223f2f38969157372b608d03771a9179858 | Make threading tests work in environment with restricted maxprocs | rootpy/logger/tests/test_threading.py | rootpy/logger/tests/test_threading.py | from __future__ import division
import itertools
import os
import resource
import thread
import threading
import time
from math import ceil
from random import random
import ROOT
import rootpy; log = rootpy.log["rootpy.logger.test.threading"]
rootpy.logger.magic.DANGER.enabled = True
from .logcheck import EnsureLog... | from __future__ import division
import itertools
import os
import threading
import time
from random import random
import rootpy; log = rootpy.log["rootpy.logger.test.threading"]
rootpy.logger.magic.DANGER.enabled = True
import ROOT
from .logcheck import EnsureLogContains
def optional_fatal(abort=True):
msg = ... | Python | 0 |
4bef39d1344a832d9a6acfb52173ac493e238139 | bump version | publicprize/config.py | publicprize/config.py | # -*- coding: utf-8 -*-
""" Flask configuration.
:copyright: Copyright (c) 2014 Bivio Software, Inc. All Rights Reserved.
:license: Apache, see LICENSE for more details.
"""
import os
def _config_from_environ(cfg, prefix):
for k in cfg.keys():
ek = prefix + '_' + k.upper()
if isinstance(c... | # -*- coding: utf-8 -*-
""" Flask configuration.
:copyright: Copyright (c) 2014 Bivio Software, Inc. All Rights Reserved.
:license: Apache, see LICENSE for more details.
"""
import os
def _config_from_environ(cfg, prefix):
for k in cfg.keys():
ek = prefix + '_' + k.upper()
if isinstance(c... | Python | 0 |
65ecd399ea82abdafd0a2471193a9c850b50db87 | Debug level of logging | playoff.py | playoff.py | import traceback
from jfr_playoff.filemanager import PlayoffFileManager
from jfr_playoff.generator import PlayoffGenerator
from jfr_playoff.settings import PlayoffSettings
def main():
interactive = False
try:
import argparse
arg_parser = argparse.ArgumentParser(
description='Gen... | import traceback
from jfr_playoff.filemanager import PlayoffFileManager
from jfr_playoff.generator import PlayoffGenerator
from jfr_playoff.settings import PlayoffSettings
def main():
interactive = False
try:
import argparse
arg_parser = argparse.ArgumentParser(
description='Gen... | Python | 0 |
3f80c759c55552dce7d45cf5f84e953ac7863974 | add placeholder for more examples | octopus/modules/examples/examples.py | octopus/modules/examples/examples.py | from octopus.core import app
from flask import Blueprint, render_template
blueprint = Blueprint('examples', __name__)
#@blueprint.route("/")
#def list_examples():
# return render_template("examples/list.html")
@blueprint.route("/ac")
def autocomplete():
return render_template("examples/es/autocomplete.html")... | from octopus.core import app
from flask import Blueprint, render_template
blueprint = Blueprint('examples', __name__)
#@blueprint.route("/")
#def list_examples():
# return render_template("examples/list.html")
@blueprint.route("/ac")
def autocomplete():
return render_template("examples/es/autocomplete.html")... | Python | 0 |
2668829d114031ba6fa641bb989988368371917b | add program lookup to choice group admin hotfix | open_programs/apps/programs/admin.py | open_programs/apps/programs/admin.py | from django.contrib import admin
from reversion.admin import VersionAdmin
from ajax_select.admin import AjaxSelectAdmin
from ajax_select import make_ajax_form
from .models import Program, TrainingTarget, ProgramCompetence, ProgramModules, TargetModules, ChoiceGroup, ChoiceGroupType, LearningPlan
@admin.register(Prog... | from django.contrib import admin
from reversion.admin import VersionAdmin
from ajax_select.admin import AjaxSelectAdmin
from ajax_select import make_ajax_form
from .models import Program, TrainingTarget, ProgramCompetence, ProgramModules, TargetModules, ChoiceGroup, ChoiceGroupType, LearningPlan
@admin.register(Prog... | Python | 0 |
01c8f0ebc4669d88576d2e66c57ac51863fd31fe | Fix ignore pattern | autotweet/learn.py | autotweet/learn.py | """:mod:`autotweet.learn` --- Learning your tweets
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module learns your tweets and store it to database.
"""
import logging
import re
import sqlalchemy
import time
import tweepy
from .database import add_document, get_session
from .twitter import CONSUMER_KEY, CON... | """:mod:`autotweet.learn` --- Learning your tweets
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module learns your tweets and store it to database.
"""
import logging
import re
import sqlalchemy
import time
import tweepy
from .database import add_document, get_session
from .twitter import CONSUMER_KEY, CON... | Python | 0.000003 |
d632b78c4fe41fff6511a4bcbb8ec9c13a34c066 | Add test for LogEntry | tests/core/tests/admin_integration_tests.py | tests/core/tests/admin_integration_tests.py | from __future__ import unicode_literals
import os.path
from django.test.testcases import TestCase
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from django.contrib.admin.models import LogEntry
from core.admin import BookAdmin
class ImportExportAdminIntegrationT... | from __future__ import unicode_literals
import os.path
from django.test.testcases import TestCase
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from core.admin import BookAdmin
class ImportExportAdminIntegrationTest(TestCase):
def setUp(self):
user... | Python | 0 |
71b6f040e161c9a169e86d7a87fdd8038cf5961e | Add get_all_instance_types to AZURE | apps/domain/src/main/core/infrastructure/providers/azure/utils.py | apps/domain/src/main/core/infrastructure/providers/azure/utils.py | import subprocess
import click
import json
from PyInquirer import prompt
from ...utils import Config, styles
class AZ:
def locations_list(self):
proc = subprocess.Popen(
"az account list-locations --query '[].{DisplayName:displayName}' --output table",
shell=True,
std... | import subprocess
import click
from PyInquirer import prompt
from ...utils import Config, styles
class AZ:
def locations_list(self):
proc = subprocess.Popen(
"az account list-locations --query '[].{DisplayName:displayName}' --output table",
shell=True,
stdout=subproce... | Python | 0.000003 |
ec5cb4e878dae00bb6b23965c6c466ee29727583 | Update HashFilter | pybloom/hashfilter.py | pybloom/hashfilter.py | import time
class HashFilter(object):
'''
Plain Temporal Hash Filter for testing purposes
'''
def __init__(self, expiration):
self.expiration = expiration
self.unique_items = {}
def add(self, key, timestamp = None):
timestamp = int(timestamp)
if key in self.unique_i... | import time
class HashFilter(object):
'''
Plain Temporal Hash Filter for testing purposes
'''
def __init__(self, expiration):
self.expiration = expiration
self.unique_items = {}
def add(self, key, timestamp = None):
if key in self.unique_items:
if not timestamp:... | Python | 0 |
ab13290364a40c0592ed347bf7b91110afaa7115 | Fix test_json | openfisca_france/tests/test_jsons.py | openfisca_france/tests/test_jsons.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redistribute... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redistribute... | Python | 0.998619 |
72ec0d82bfa59d14dbd9e8ffd89ddcfc990fc4fe | Fix #14 | pygraphml/__init__.py | pygraphml/__init__.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from .attribute import Attribute
from .item import Item
from .point import Point
from .node import Node
from .edge import Edge
from .graph import... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from .attribute import Attribute
from .item import Item
from .point import Point
from .node import Node
from .edge import Edge
from .graph import... | Python | 0.000001 |
145dc7d22301cffdf43498924f1a908f0d160512 | Allow deep recursion | pylint_runner/main.py | pylint_runner/main.py | #!/usr/bin/env python
# pylint: disable=no-member
"""
Runs pylint on all contained python files in this directory, printint out
nice colorized warnings/errors without all the other report fluff
"""
from __future__ import print_function
import os
import sys
import colorama
import pylint
import pylint.lint
__author__ =... | #!/usr/bin/env python
# pylint: disable=no-member
"""
Runs pylint on all contained python files in this directory, printint out
nice colorized warnings/errors without all the other report fluff
"""
from __future__ import print_function
import os
import sys
import colorama
import pylint
import pylint.lint
__author__ =... | Python | 0.999987 |
3905327d8cb02c6c7929f6b3bd12658c6bc1b6ab | bump to 1.73 | pyperform/__init__.py | pyperform/__init__.py | from __future__ import print_function
__version__ = '1.73'
from pyperform.benchmark import Benchmark
from .comparisonbenchmark import ComparisonBenchmark
from .benchmarkedclass import BenchmarkedClass
from .benchmarkedfunction import BenchmarkedFunction
from .timer import timer
from .exceptions import ValidationErro... | from __future__ import print_function
__version__ = '1.72'
from pyperform.benchmark import Benchmark
from .comparisonbenchmark import ComparisonBenchmark
from .benchmarkedclass import BenchmarkedClass
from .benchmarkedfunction import BenchmarkedFunction
from .timer import timer
from .exceptions import ValidationErro... | Python | 0.000001 |
813fac88b392f81825d60f3862a09718f12bf424 | add ccsd | pyquante2/__init__.py | pyquante2/__init__.py | from pyquante2.basis.basisset import basisset
from pyquante2.basis.cgbf import cgbf,sto
from pyquante2.basis.pgbf import pgbf
from pyquante2.geo.molecule import molecule
from pyquante2.geo.samples import *
from pyquante2.graphics.vtkplot import vtk_orbs
from pyquante2.grid.grid import grid
from pyquante2.ints.one impor... | from pyquante2.basis.basisset import basisset
from pyquante2.basis.cgbf import cgbf,sto
from pyquante2.basis.pgbf import pgbf
from pyquante2.geo.molecule import molecule
from pyquante2.geo.samples import *
from pyquante2.graphics.vtkplot import vtk_orbs
from pyquante2.grid.grid import grid
from pyquante2.ints.one impor... | Python | 0.000001 |
89ed1ea77e2e92ae9a953404552a229854ce0f9c | Add option to don't add route | pyramid_auth/views.py | pyramid_auth/views.py | from pyramid.view import view_config
from pyramid.httpexceptions import (
HTTPFound,
HTTPForbidden,
)
from pyramid.security import (
unauthenticated_userid,
remember,
forget,
)
from urllib import urlencode
import tw2.core as twc
from . import forms
class BaseView(object):
def __init__(self, ... | from pyramid.view import view_config
from pyramid.httpexceptions import (
HTTPFound,
HTTPForbidden,
)
from pyramid.security import (
unauthenticated_userid,
remember,
forget,
)
from urllib import urlencode
import tw2.core as twc
from . import forms
class BaseView(object):
def __init__(self, ... | Python | 0.000001 |
f808b67c9a067d9addd75f09e10853c3812d6101 | Refactor code | transfers/examples/pre-transfer/00_unbag.py | transfers/examples/pre-transfer/00_unbag.py | #!/usr/bin/env python
# Script to re-package unzipped bags as standard transfers, utilizing checksums from bag manifest.
# Assumes bags are structured as either bag/data/(content) or bag/data/objects/(content).
# Enables use of scripts to add metadata to SIP without failing transfer at bag validation.
from __future_... | #!/usr/bin/env python
# Script to re-package unzipped bags as standard transfers, utilizing checksums from bag manifest.
# Assumes bags are structured as either bag/data/(content) or bag/data/objects/(content).
# Enables use of scripts to add metadata to SIP without failing transfer at bag validation.
from __future_... | Python | 0.000002 |
1d5d767433b611d3c5f4627cf73dea7c9f86c748 | Reformat and update copyright. | spotseeker_server/test/schema.py | spotseeker_server/test/schema.py | # Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from spotseeker_server.models import *
from django.test.client import Client
from django.test import TestCase
import simplejson as json
from mock import patch
from spotseeker_server import models
from django.test.utils import overri... | # Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
""" Copyright 2012, 2013 UW Information Technology, University of Washington
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtai... | Python | 0 |
2fbd5ceead47ea980e5dfa7b2bc29eafbbab2d72 | remove unneeded import in views | blog/views.py | blog/views.py | from django.http import Http404
from django.shortcuts import render, get_object_or_404, get_list_or_404
from django.utils import timezone
from . import models as blog
def home(request):
NUM_LAST_ARTICLES = 5
articles = blog.Article.objects.filter(date__lte=timezone.now()).order_by('-date')[:NUM_LAST_ARTICLE... | from django.core.exceptions import ObjectDoesNotExist
from django.http import Http404
from django.shortcuts import render, get_object_or_404, get_list_or_404
from django.utils import timezone
from . import models as blog
def home(request):
NUM_LAST_ARTICLES = 5
articles = blog.Article.objects.filter(date__l... | Python | 0 |
62c76a953ea5a1c753f9c7447bab5800bb25c2b1 | add life expantency context bulk down for ihme | ddf_utils/factory/igme.py | ddf_utils/factory/igme.py | # -*- coding: utf-8 -*-
"""download sources from CME info portal"""
__doc__ = """T.B.D"""
import os.path as osp
import re
import requests
import pandas as pd
from lxml import html
from urllib.parse import urlsplit, urljoin
url = 'http://www.childmortality.org/'
metadata = None
def load_metadata():
r = reque... | # -*- coding: utf-8 -*-
"""download sources from CME info portal"""
__doc__ = """T.B.D"""
import os.path as osp
import re
import requests
import pandas as pd
from io import BytesIO
from lxml import html
from urllib.parse import urlsplit, urljoin
url = 'http://www.childmortality.org/'
metadata = None
def load_me... | Python | 0 |
5dce1ee6c54d8686cee42651528c087e9939368b | Bump version, 0.9.4.21 | dp_tornado/version.py | dp_tornado/version.py | __version_info__ = (0, 9, 4, 22)
__version__ = '.'.join(map(str, __version_info__))
| __version_info__ = (0, 9, 4, 21)
__version__ = '.'.join(map(str, __version_info__))
| Python | 0 |
7eca9eb4d5c7134b84c3462ac01cf1679557819f | Update example | example/app/tables.py | example/app/tables.py | #!/usr/bin/env python
# coding: utf-8
from table.columns import Column, LinkColumn, DatetimeColumn, Link
from table.utils import A
from table import Table
from models import Person
class PersonTable(Table):
id = Column(field='id', header=u'#', header_attrs={'width': '5%'})
name = Column(field='nam... | #!/usr/bin/env python
# coding: utf-8
from table.columns import Column, LinkColumn, DatetimeColumn, Link
from table.utils import A
from table import Table
from models import Person
class PersonTable(Table):
id = Column(field='id', header=u'#', header_attrs={'width': '5%'})
name = Column(field='nam... | Python | 0.000001 |
3a156fb107db25c8171adcc1346fd17f36222092 | Fix refresh count | galaxy/main/management/commands/refresh_role_counts.py | galaxy/main/management/commands/refresh_role_counts.py | import time
from math import ceil, floor
from github import Github
from django.conf import settings
from django.db.models import Max, Q
from django.core.management.base import BaseCommand, CommandError
from galaxy.main.models import Role, RefreshRoleCount
from galaxy.main.celerytasks.tasks import refresh_role_count... | import time
from math import ceil, floor
from github import Github
from django.conf import settings
from django.db.models import Max
from django.core.management.base import BaseCommand, CommandError
from galaxy.main.models import Role, RefreshRoleCount
from galaxy.main.celerytasks.tasks import refresh_role_counts
... | Python | 0.000001 |
cd9e9efd8587b5be9e3d9a4e7efeaf26b048b0d2 | fix attribute error on handlers loading | lib/rapidsms/contrib/handlers/settings.py | lib/rapidsms/contrib/handlers/settings.py | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
INSTALLED_HANDLERS = None
EXCLUDED_HANDLERS = []
RAPIDSMS_HANDLERS_EXCLUDE_APPS = [] | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
INSTALLED_HANDLERS = None
EXCLUDED_HANDLERS = []
| Python | 0.000001 |
5223846786b70dd9c198f98f7a620e70b40fab3d | update k84 | chap09/k84.py | chap09/k84.py | #
# usage: python k84.py {N}
#
import sys
import plyvel
import struct
from math import log
def create_matrix(n):
co_db = plyvel.DB('./co.ldb', create_if_missing=True)
word_db = plyvel.DB('./word.ldb', create_if_missing=True)
context_db = plyvel.DB('./context.ldb', create_if_missing=True)
matrix_db = p... | #
# usage: python k84.py {N}
#
import sys
import plyvel
from math import log
def wc_matrix(n, ofn):
co_db = plyvel.DB('./co.ldb', create_if_missing=True)
word_db = plyvel.DB('./word.ldb', create_if_missing=True)
context_db = plyvel.DB('./context.ldb', create_if_missing=True)
x = 0
ZERO = x.to_byt... | Python | 0 |
241897e2f4596dfee6eae87a6467254e135ac61b | Upgrade ready to fly quads to parts v2. | rcbi/rcbi/spiders/ReadyToFlyQuadsSpider.py | rcbi/rcbi/spiders/ReadyToFlyQuadsSpider.py | import scrapy
from scrapy import log
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from rcbi.items import Part
MANUFACTURERS = ["Tiger", "RTF ", "HQ Prop", "Lemon"]
CORRECT = {"Tiger": "T-Motor", "RTF ": "ReadyToFlyQuads", "HQ Prop": "HQProp", "Lemon": "Lemon Rx"}
STOCK_... | import scrapy
from scrapy import log
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from rcbi.items import Part
MANUFACTURERS = ["Tiger", "RTF ", "HQ Prop", "Lemon"]
CORRECT = {"Tiger": "T-Motor", "RTF ": "ReadyToFlyQuads", "HQ Prop": "HQProp", "Lemon": "Lemon Rx"}
class R... | Python | 0 |
5f96021cf88201447a48a05dab0ff5a1f131b6bc | Fix problem_id command with anonymize argument | edx_data_research/reporting/problem_ids/problem_id.py | edx_data_research/reporting/problem_ids/problem_id.py | '''
In this module, we will generate a csv report for a given problem id, which
will include information about how students fared with a given problem id
'''
from itertools import groupby
from edx_data_research.reporting.edx_base import EdX
class ProblemId(EdX):
def __init__(self, args):
super(self.__c... | '''
In this module, we will generate a csv report for a given problem id, which
will include information about how students fared with a given problem id
'''
from itertools import groupby
from edx_data_research.reporting.edx_base import EdX
class ProblemId(EdX):
def __init__(self, args):
super(self.__c... | Python | 0.00177 |
01003d7b64220b794d8e10e78dd26badef4dfcc5 | Fix tests | base/auth/tests.py | base/auth/tests.py | from flask_testing import TestCase
from ..app import create_app
from ..config import test
from ..ext import db
class BaseCoreTest(TestCase):
def create_app(self):
return create_app(test)
def setUp(self):
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_al... | from flask_testing import TestCase
from ..app import create_app
from ..config import test
from ..ext import db
class BaseCoreTest(TestCase):
def create_app(self):
return create_app(test)
def setUp(self):
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_al... | Python | 0.000003 |
69e760e4a571d16e75f30f1e97ea1a917445f333 | Switch to recipe engine "url" module. | recipes/recipe_modules/gitiles/__init__.py | recipes/recipe_modules/gitiles/__init__.py | DEPS = [
'recipe_engine/json',
'recipe_engine/path',
'recipe_engine/python',
'recipe_engine/raw_io',
'recipe_engine/url',
]
| DEPS = [
'recipe_engine/json',
'recipe_engine/path',
'recipe_engine/python',
'recipe_engine/raw_io',
'url',
]
| Python | 0.000023 |
6ced33f201e8a4e389a077a91ba9ed8bf5c19fa0 | fix issue with number for samples | wqflask/wqflask/correlation/pre_computes.py | wqflask/wqflask/correlation/pre_computes.py | """module contains the code to do the
precomputations of sample data between
two entire datasets"""
import json
from typing import List
from base import data_set
from gn3.computations.correlations import compute_all_sample_correlation
from gn3.computations.correlations import fast_compute_all_sample_correlation
from... | """module contains the code to do the
precomputations of sample data between
two entire datasets"""
import json
from typing import List
from base import data_set
from gn3.computations.correlations import fast_compute_all_sample_correlation
from gn3.computations.correlations import map_shared_keys_to_values
def get_... | Python | 0 |
bb366439065924732b9b1559a0dc776c586fa07c | fix url | regulations/tests/selenium/example_test.py | regulations/tests/selenium/example_test.py | import os
import unittest
import base64
import json
import httplib
import sys
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
class ExampleTest(unittest.TestCase):
def setUp(self):
self.capabilities = webdriver.DesiredCapabilities.CHROME
self.capabilities['tu... | import os
import unittest
import base64
import json
import httplib
import sys
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
class ExampleTest(unittest.TestCase):
def setUp(self):
self.capabilities = webdriver.DesiredCapabilities.CHROME
self.capabilities['tu... | Python | 0.86565 |
bbee1e9b8563d56c0d0acbfc6ae61334f8251159 | Reset default value in test so that it doesn't produce error | enthought/traits/tests/undefined_test_case.py | enthought/traits/tests/undefined_test_case.py | import unittest
from enthought.traits.api import HasTraits, Str, Undefined, ReadOnly, Float
class Foo(HasTraits):
name = Str()
original_name = ReadOnly
bar = Str
baz = Float
def _name_changed(self):
if self.original_name is Undefined:
self.original_name = self.name
class Bar... | import unittest
from enthought.traits.api import HasTraits, Str, Undefined, ReadOnly, Float
class Foo(HasTraits):
name = Str()
original_name = ReadOnly
bar = Str
baz = Float
def _name_changed(self):
if self.original_name is Undefined:
self.original_name = self.name
class Bar... | Python | 0.000001 |
85f14fffc01002e5a1c0a7a3644a81a4ade61745 | Bump dsub version to 0.2.1 | dsub/_dsub_version.py | dsub/_dsub_version.py | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Python | 0 |
edb6f738979e213cca3fd03991caebdf209b09b9 | Fix permissions script | static/extension/dynamic_scope/dynamic_permission.py | static/extension/dynamic_scope/dynamic_permission.py | # oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
# Copyright (c) 2016, Gluu
#
# Author: Yuriy Movchan
#
from org.xdi.model.custom.script.type.scope import DynamicScopeType
from org.xdi.service.cdi.util import CdiUtil
from org.xdi.oxauth.service import Us... | # oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
# Copyright (c) 2016, Gluu
#
# Author: Yuriy Movchan
#
from org.xdi.model.custom.script.type.scope import DynamicScopeType
from org.xdi.oxauth.service import UserService
from org.xdi.util import StringHelp... | Python | 0.000001 |
c1923339d7d64b9e85e3a2a1522ff0442e18a798 | Update common version (#6060) | sdk/core/azure-common/azure/common/_version.py | sdk/core/azure-common/azure/common/_version.py | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
VERSION = "... | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
VERSION = "... | Python | 0 |
9711a2208525b200c98997248c358432a26bf7a3 | improve cleanup_ctx_databases | dvhb_hybrid/config.py | dvhb_hybrid/config.py | import functools
import json
import os
def absdir(directory, base_dir):
if not directory.startswith('/'):
directory = os.path.join(base_dir, directory)
return os.path.normpath(directory)
def dirs(list_dir, base_dir):
result = []
for i in list_dir:
result.append(absdir(i, base_dir))
... | import functools
import os
def absdir(directory, base_dir):
if not directory.startswith('/'):
directory = os.path.join(base_dir, directory)
return os.path.normpath(directory)
def dirs(list_dir, base_dir):
result = []
for i in list_dir:
result.append(absdir(i, base_dir))
return re... | Python | 0.000001 |
3ff373ed0d5349087a77b2a96af41e0e5cc9c15d | add UI for boardd loopback test | selfdrive/boardd/tests/test_boardd_loopback.py | selfdrive/boardd/tests/test_boardd_loopback.py | #!/usr/bin/env python3
import os
import random
import time
from collections import defaultdict
from functools import wraps
import cereal.messaging as messaging
from cereal import car
from common.basedir import PARAMS
from common.params import Params
from common.spinner import Spinner
from panda import Panda
from selfd... | #!/usr/bin/env python3
import os
import random
import time
from collections import defaultdict
from functools import wraps
import cereal.messaging as messaging
from cereal import car
from common.basedir import PARAMS
from common.params import Params
from panda import Panda
from selfdrive.boardd.boardd import can_list_... | Python | 0 |
4019372609565b074a5c3ba946245b61c8479ada | update dev version after 2.1.0 tag [skip ci] | py/fiberassign/_version.py | py/fiberassign/_version.py | __version__ = '2.1.0.dev2650'
| __version__ = '2.1.0'
| Python | 0 |
9602574af41a9c09edbc84bf77bde3a285d71741 | use datastore client in example | examples/google/radiology/upload_storage_radiology.py | examples/google/radiology/upload_storage_radiology.py | #!/usr/bin/env python
# RADIOLOGY ---------------------------------------------------
# This is an example script to upload data (images, text, metadata) to
# google cloud storage and datastore. Data MUST be de-identified
import os
# Start google storage client for pmc-stanford
from som.api.google.datastore import D... | #!/usr/bin/env python
# RADIOLOGY ---------------------------------------------------
# This is an example script to upload data (images, text, metadata) to
# google cloud storage and datastore. Data MUST be de-identified
import os
# Start google storage client for pmc-stanford
from som.api.google import Client
clie... | Python | 0 |
951b6b9cc14e323dc97aa6e67dee17ef110e673f | check for exclusive try/else and if/else | pychecker2/utest/scopes.py | pychecker2/utest/scopes.py | from pychecker2.TestSupport import WarningTester
from pychecker2 import ScopeChecks
class RedefinedTestCase(WarningTester):
def testScopes(self):
w = ScopeChecks.RedefineCheck.redefinedScope
self.warning('def f(): pass\n'
'def f(): pass\n',
1, w, 'f', 2)
... | from pychecker2.TestSupport import WarningTester
from pychecker2 import ScopeChecks
class RedefinedTestCase(WarningTester):
def testScopes(self):
self.warning('def f(): pass\n'
'def f(): pass\n',
1, ScopeChecks.RedefineCheck.redefinedScope, 'f', 2)
self.war... | Python | 0 |
a434050e0f1c9f3e162898a3687cd7de8b77980c | Update load.py | simphony_mayavi/load.py | simphony_mayavi/load.py | from mayavi.core.api import registry
from simphony_mayavi.adapt2cuds import adapt2cuds
def load(filename, name=None, kind=None, rename_arrays=None):
""" Load the file data into a CUDS container.
"""
data_set = _read(filename)
return adapt2cuds(
data_set, name, kind, rename_arrays)
def _rea... | from mayavi.core.api import registry
from simphony_mayavi.adapt2cuds import adapt2cuds
def load(filename, name=None, kind=None, rename_arrays=None):
""" Load the file data into a CUDS container.
"""
data_set = _read(filename)
return adapt2cuds(
data_set, name, kind, rename_arrays)
def _rea... | Python | 0.000001 |
2bf0c9e0d8bbce50f06ca08c79f97ecf5b76e21b | Fix logging | simplesqlite/_logger.py | simplesqlite/_logger.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import, unicode_literals
import logbook
import sqliteschema
import tabledata
logger = logbook.Logger("SimpleSQLie")
logger.disable()
def set_logger(is_enable):
if is_enable != logger.disa... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import, unicode_literals
import logbook
import tabledata
logger = logbook.Logger("SimpleSQLie")
logger.disable()
def set_logger(is_enable):
if is_enable != logger.disabled:
return... | Python | 0.000007 |
930508e5ec00d9f174409097ba54e70c7c6b2b3c | Fix #421: RPN_DEFNS needs to passed to Pelegant via env | sirepo/pkcli/elegant.py | sirepo/pkcli/elegant.py | # -*- coding: utf-8 -*-
"""Wrapper to run elegant from the command line.
:copyright: Copyright (c) 2015 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
from pykern import pkio
from pykern import pkresour... | # -*- coding: utf-8 -*-
"""Wrapper to run elegant from the command line.
:copyright: Copyright (c) 2015 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
from pykern import pkio
from pykern import pkresour... | Python | 0 |
5c8a6072309989ac97eefc2a6f63a6082a2c5ff0 | Update matching_specific_string.py | hacker_rank/contests/regular_expresso/matching_specific_string.py | hacker_rank/contests/regular_expresso/matching_specific_string.py | Regex_Pattern = r'hackerrank' # Do not delete 'r'.
| Python | 0.000002 | |
05b15f2db049e8b722f17867f5163c0b6e3a3108 | Allow POST to /git-update url. | pthemes.py | pthemes.py | import os
import logging
from flask import Flask, render_template, redirect, url_for, flash
from pq import PQ
from api import APIGrabber
from db import PonyDB
logging.basicConfig()
# Config
# ---------------
# App config
app = Flask(__name__)
app.config.from_object(os.environ.get('APP_SETTINGS', None))
db = PonyDB(a... | import os
import logging
from flask import Flask, render_template, redirect, url_for, flash
from pq import PQ
from api import APIGrabber
from db import PonyDB
logging.basicConfig()
# Config
# ---------------
# App config
app = Flask(__name__)
app.config.from_object(os.environ.get('APP_SETTINGS', None))
db = PonyDB(a... | Python | 0 |
66370cecd7bdf9d0b5ecd358aa58b4f567d45c95 | add a new keyword to the pypy lexer | pygments/lexers/pypylog.py | pygments/lexers/pypylog.py | # -*- coding: utf-8 -*-
"""
pygments.lexers.pypylog
~~~~~~~~~~~~~~~~~~~~~~~
Lexer for pypy log files.
:copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, bygroups, include
from pygments.token import ... | # -*- coding: utf-8 -*-
"""
pygments.lexers.pypylog
~~~~~~~~~~~~~~~~~~~~~~~
Lexer for pypy log files.
:copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, bygroups, include
from pygments.token import ... | Python | 0 |
ebd152ca9b4126776e0f035477791be587907a8b | Fix coding style and add a file header. | pygments/lexers/pypylog.py | pygments/lexers/pypylog.py | # -*- coding: utf-8 -*-
"""
pygments.lexers.pypylog
~~~~~~~~~~~~~~~~~~~~~~~
Lexer for pypy log files.
:copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, bygroups, include
from pygments.token import ... | from pygments.lexer import RegexLexer, bygroups, include
from pygments.token import (Text, Keyword, Number, Comment, Punctuation, Name,
String, Literal)
__all__ = [
"PyPyLogLexer",
]
class PyPyLogLexer(RegexLexer):
"""
Lexer for PyPy log files.
*New in Pygments 1.5.*
"""
name = "PyPy Log... | Python | 0 |
0b89e64128fbc2970027fde31758160bdce6d30d | Use unix line ending | pytable.py | pytable.py | # -*- coding: utf-8 -*-
from __future__ import print_function
class BaseRenderer(object):
def __init__(self, table):
self.table = table
self.output = []
def p(self, val):
self.output.append(val)
def __str__(self):
return ''.join(self.output)
class FancyRenderer(BaseRen... | # -*- coding: utf-8 -*-
from __future__ import print_function
class BaseRenderer(object):
def __init__(self, table):
self.table = table
self.output = []
def p(self, val):
self.output.append(val)
def __str__(self):
return ''.join(self.output)
class Fanc... | Python | 0.000052 |
38a4b41d942f40dd16e1a1c88ab68c0b9169ff0c | update tts | slackbot/plugins/tts.py | slackbot/plugins/tts.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# tts.py ---
#
# Filename: tts.py
# Description:
# Author: Werther Zhang
# Maintainer:
# Created: Sun Sep 10 16:24:08 2017 (+0800)
#
# Change Log:
#
#
import os
import sys
import baidutts
import hashlib
import commands
from slackbot.bot import plugin_init
from slackbot... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# tts.py ---
#
# Filename: tts.py
# Description:
# Author: Werther Zhang
# Maintainer:
# Created: Sun Sep 10 16:24:08 2017 (+0800)
#
# Change Log:
#
#
import os
import sys
import baidutts
import hashlib
import commands
from slackbot.bot import plugin_init
from slackbot... | Python | 0.000001 |
8f4f902042b848a6a212ae966aaf6435ae8d5c77 | set background as a widget | sheldonchess/interface/web/sheldonchess.py | sheldonchess/interface/web/sheldonchess.py | from rajesh import Application, run, expr
from rajesh.element import Img, Div
from screens import MainMenu, NormalGameLobby
class Player(object):
def __init__(self, app):
self.app = app
self.name = ""
class SheldonChess(Application):
def begin(self):
self.player = Player(self)
... | from rajesh import Application, run, expr
from rajesh.element import Img, Div
from screens import MainMenu, NormalGameLobby
class Player(object):
def __init__(self, app):
self.app = app
self.name = ""
class SheldonChess(Application):
def begin(self):
self.player = Player(self)
... | Python | 0.000001 |
fac2c5752c23d2fd415caafd2654f696c4842806 | Bump version. | pyramid_addons/__init__.py | pyramid_addons/__init__.py | __version__ = '0.21'
| __version__ = '0.20'
| Python | 0 |
1159cda1437085218b79345244897f2be8990ca9 | fix tell delivery and possibly db lock | pyscp_bot/modules/notes.py | pyscp_bot/modules/notes.py | #!/usr/bin/env python3
###############################################################################
# Module Imports
###############################################################################
import arrow
import peewee
import sopel
import re
import pyscp_bot.jarvis as vocab
#################################... | #!/usr/bin/env python3
###############################################################################
# Module Imports
###############################################################################
import arrow
import peewee
import sopel
import re
import pyscp_bot.jarvis as vocab
#################################... | Python | 0 |
e913bbffde84403018e741a62318df029a641950 | Delete more not needed stuff | archive/archive_api/src/conftest.py | archive/archive_api/src/conftest.py | # -*- encoding: utf-8
import os
import uuid
import betamax
import pytest
import requests
@pytest.fixture(scope="session")
def recorded_sess(pytestconfig):
with betamax.Betamax.configure() as config:
config.cassette_library_dir = str(
pytestconfig.rootdir.join("src", "tests", "cassettes")
... | # -*- encoding: utf-8
import os
import random
import uuid
import betamax
import pytest
import requests
import json
@pytest.fixture(scope="session")
def recorded_sess(pytestconfig):
with betamax.Betamax.configure() as config:
config.cassette_library_dir = str(
pytestconfig.rootdir.join("src",... | Python | 0 |
8e4a5ef25c87879fb01aa79f88c6c6a833820f8b | bump version | python/baseline/version.py | python/baseline/version.py | __version__ = "1.1.3"
| __version__ = "1.1.2"
| Python | 0 |
76ffb1b8891e2ad349140044d78e766e02ebf87a | Remove import taichi from expr.py (#3871) | python/taichi/lang/expr.py | python/taichi/lang/expr.py | import numpy as np
from taichi._lib import core as _ti_core
from taichi.lang import impl
from taichi.lang.common_ops import TaichiOperations
from taichi.lang.matrix import Matrix
from taichi.lang.util import is_taichi_class
# Scalar, basic data type
class Expr(TaichiOperations):
"""A Python-side Expr wrapper, who... | import numpy as np
from taichi._lib import core as _ti_core
from taichi.lang import impl
from taichi.lang.common_ops import TaichiOperations
from taichi.lang.util import is_taichi_class
import taichi as ti
# Scalar, basic data type
class Expr(TaichiOperations):
"""A Python-side Expr wrapper, whose member variabl... | Python | 0 |
49f365ecfc18e32e5664ffc53c163320ed0af6ac | Add the missing rows() function | pywind/bmreports/prices.py | pywind/bmreports/prices.py | # coding=utf-8
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdi... | # coding=utf-8
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdi... | Python | 0.999729 |
86768d83067745def16761db24ce496e3125399e | test script works | mtgreatest/process_results/test_script.py | mtgreatest/process_results/test_script.py | #!/usr/bin/env python
import scrape_results
from mtgreatest.rdb import Cursor
cursor = Cursor()
event_info = cursor.execute('select event_id, event_link from event_table where results_loaded = 1')
event_info = [dict(zip(('event_id','event_link'), item)) for item in event_info] #this should be a method (or default re... | #!/usr/bin/env python
import scrape_results
from mtgreatest.rdb import Cursor
cursor = Cursor()
event_info = cursor.execute('select event_id, event_link from event_table where results_loaded = 1')
event_info = [dict(zip(('event_id','event_link'), item)) for item in event_info] #this should be a method (or default re... | Python | 0.000001 |
e164a3ccb7625d4f36c83628aa6f7f030f38d6cf | remove normalized test | networkx/algorithms/tests/test_smetric.py | networkx/algorithms/tests/test_smetric.py |
from nose.tools import assert_equal
import networkx as nx
def test_smetric():
g = nx.Graph()
g.add_edge(1,2)
g.add_edge(2,3)
g.add_edge(2,4)
g.add_edge(1,4)
sm = nx.s_metric(g,normalized=False)
assert_equal(sm, 19.0)
# smNorm = nx.s_metric(g,normalized=True)
# assert_equal(smNorm, 0... |
from nose.tools import assert_equal
import networkx as nx
def test_smetric():
g = nx.Graph()
g.add_edge(1,2)
g.add_edge(2,3)
g.add_edge(2,4)
g.add_edge(1,4)
sm = nx.s_metric(g,normalized=False)
assert_equal(sm, 19.0)
smNorm = nx.s_metric(g,normalized=True)
# assert_equal(smNorm, 0.... | Python | 0.000051 |
a15bda8b4a4d32d25f1e47f69b20f7df0ff45691 | Remove debugging code | ether/ethcontract.py | ether/ethcontract.py | from ether import asm, util
import re
import persistent
from ethereum import utils
class ETHContract(persistent.Persistent):
def __init__(self, code = ""):
self.code = code
def get_xrefs(self):
disassembly = asm.disassemble(util.safe_decode(self.code))
xrefs = []
for ins... | from ether import asm, util
import re
import persistent
from ethereum import utils
class ETHContract(persistent.Persistent):
def __init__(self, code = ""):
self.code = code
def get_xrefs(self):
disassembly = asm.disassemble(util.safe_decode(self.code))
xrefs = []
for ins... | Python | 0.000739 |
d1490510cd5f66a5da699ffea39b6a8b37c88f01 | add test for composite potential | gary/potential/tests/test_io.py | gary/potential/tests/test_io.py | # coding: utf-8
""" test reading/writing potentials to files """
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import os
# Third-party
import numpy as np
# Project
from ..io import read, write
from ..builtin import IsochronePotential
from ..custom... | # coding: utf-8
""" test reading/writing potentials to files """
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import os
# Third-party
import numpy as np
# Project
from ..io import read, write
from ..builtin import IsochronePotential
from ...units... | Python | 0 |
11499596e27e8f4c792cf5e36ea5a1c8f6d6053f | Improve logging (learning) | evilminions/hydra.py | evilminions/hydra.py | '''Replicates the behavior of a minion many times'''
import logging
import tornado.gen
import zmq
import salt.config
import salt.loader
import salt.payload
from evilminions.hydrahead import HydraHead
from evilminions.utils import fun_call_id
# HACK: turn the trace function into a no-op
# this almost doubles evil-m... | '''Replicates the behavior of a minion many times'''
import logging
import tornado.gen
import zmq
import salt.config
import salt.loader
import salt.payload
from evilminions.hydrahead import HydraHead
from evilminions.utils import fun_call_id
# HACK: turn the trace function into a no-op
# this almost doubles evil-m... | Python | 0 |
42b0c14d1e34dd88a92f22eda9d87dd104ea61f0 | tweak demo | examples/meanfield.py | examples/meanfield.py | from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from pyhsmm.basic.distributions import Regression, Gaussian, PoissonDuration
from autoregressive.distributions import AutoRegression
from pyhsmm.util.text import progprint_xrange
from pyslds.models import HMMSLDS
np.random.seed(0)
#... | from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from pyhsmm.basic.distributions import Regression, Gaussian, PoissonDuration
from autoregressive.distributions import AutoRegression
from pyhsmm.util.text import progprint_xrange
from pyslds.models import HMMSLDS
np.random.seed(0)
#... | Python | 0.000001 |
db69d08b61f83703fc40ef7273cba1b2e0b825a3 | stop checking if an entry already exists when polling | feeds/tasks.py | feeds/tasks.py | import time
import feedparser
from celery import task
from feeds.models import Feed, Entry
from django.core.exceptions import ObjectDoesNotExist
from profiles.models import UserProfile, UserEntryDetail
def poll_feed(feed):
parser = feedparser.parse(feed.link)
# Add entries from feed
entries = parser.entr... | import time
import feedparser
from celery import task
from feeds.models import Feed, Entry
from django.core.exceptions import ObjectDoesNotExist
from profiles.models import UserProfile, UserEntryDetail
def poll_feed(feed):
parser = feedparser.parse(feed.link)
# Add entries from feed
entries = parser.entr... | Python | 0 |
81806fe89b9c4a364d373020bd56ee1a396a5858 | Add automatic escaping of the settings docstring for Windows' sake in py3k | evennia/game_template/server/conf/settings.py | evennia/game_template/server/conf/settings.py | r"""
Evennia settings file.
The available options are found in the default settings file found
here:
{settings_default}
Remember:
Don't copy more from the default file than you actually intend to
change; this will make sure that you don't overload upstream updates
unnecessarily.
When changing a setting requiring a... | """
Evennia settings file.
The available options are found in the default settings file found
here:
{settings_default}
Remember:
Don't copy more from the default file than you actually intend to
change; this will make sure that you don't overload upstream updates
unnecessarily.
When changing a setting requiring a ... | Python | 0 |
a85f6f86522dbb984818defc0d5c3cee049f1341 | add simple async post support | eventbus/eventbus.py | eventbus/eventbus.py | __author__ = 'Xsank'
import inspect
from multiprocessing.pool import ThreadPool
from listener import Listener
from exception import RegisterError
from exception import UnregisterError
class EventBus(object):
def __init__(self,pool_size=4):
self.listeners=dict()
self.pool=ThreadPool(pool_size)
... | __author__ = 'Xsank'
import inspect
from listener import Listener
from exception import RegisterError
from exception import UnregisterError
class EventBus(object):
def __init__(self):
self.listeners=dict()
def register(self,listener):
if not isinstance(listener,Listener):
raise R... | Python | 0 |
30e00089247b314e82bc7792ac6f9641cd632bbd | Bump to dev. | eventlet/__init__.py | eventlet/__init__.py | version_info = (0, 9, 16, "dev")
__version__ = ".".join(map(str, version_info))
try:
from eventlet import greenthread
from eventlet import greenpool
from eventlet import queue
from eventlet import timeout
from eventlet import patcher
from eventlet import convenience
import greenlet
sle... | version_info = (0, 9, 15)
__version__ = ".".join(map(str, version_info))
try:
from eventlet import greenthread
from eventlet import greenpool
from eventlet import queue
from eventlet import timeout
from eventlet import patcher
from eventlet import convenience
import greenlet
sleep = gr... | Python | 0 |
22f373c0e6ef3a2c7bfb128ad014af245f113ea9 | Add default serial baudrate. | robus/io/serial_io.py | robus/io/serial_io.py | import serial as _serial
from serial.tools.list_ports import comports
from . import IOHandler
class Serial(IOHandler):
@classmethod
def is_host_compatible(cls, host):
available_host = (p.device for p in comports())
return host in available_host
def __init__(self, host, baudrate=57600):
... | import serial as _serial
from serial.tools.list_ports import comports
from . import IOHandler
class Serial(IOHandler):
@classmethod
def is_host_compatible(cls, host):
available_host = (p.device for p in comports())
return host in available_host
def __init__(self, host, baudrate):
... | Python | 0 |
e0024790be3a85e529c93397500e4f736c82a5ef | Fix the runner for Python 2. | src/calmjs/parse/tests/test_testing.py | src/calmjs/parse/tests/test_testing.py | # -*- coding: utf-8 -*-
import unittest
from calmjs.parse.testing.util import build_equality_testcase
from calmjs.parse.testing.util import build_exception_testcase
def run(self):
"""
A dummy run method.
"""
class BuilderEqualityTestCase(unittest.TestCase):
def test_build_equality_testcase(self):
... | # -*- coding: utf-8 -*-
import unittest
from calmjs.parse.testing.util import build_equality_testcase
from calmjs.parse.testing.util import build_exception_testcase
class BuilderEqualityTestCase(unittest.TestCase):
def test_build_equality_testcase(self):
DummyTestCase = build_equality_testcase('DummyTes... | Python | 0.001551 |
d926c984e895b68ad0cc0383926451c0d7249512 | Fix use of deprecated find_module | astropy/tests/tests/test_imports.py | astropy/tests/tests/test_imports.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pkgutil
def test_imports():
"""
This just imports all modules in astropy, making sure they don't have any
dependencies that sneak through
"""
def onerror(name):
# We should raise any legitimate error that occurred, but... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pkgutil
def test_imports():
"""
This just imports all modules in astropy, making sure they don't have any
dependencies that sneak through
"""
def onerror(name):
# We should raise any legitimate error that occurred, but... | Python | 0.000002 |
8864d0f7ea909bebda68b28ad53a312c10af581e | Update ClientCredentials tutorial to use Python3 | oauth-client-credentials/python/script.py | oauth-client-credentials/python/script.py | import base64, requests, sys
print("-----------------------------------------------")
print("- PureCloud Python Client Credentials Example -")
print("-----------------------------------------------")
client_id = "CLIENT_ID"
client_secret = "CLIENT_SECRET"
# Base64 encode the client ID and client secret
authorization ... | import base64, requests, sys
print '-----------------------------------------------'
print '- PureCloud Python Client Credentials Example -'
print '-----------------------------------------------'
clientId = '7de3af06-c0b3-4f9b-af45-72f4a1403797'
clientSecret = '1duphi_YtswNjN2GXOg_APY-KKTmnYXvfNj7N8GUhnM'
# Base64 e... | Python | 0 |
c479c360d979d22182e787f74f5a74473fc41002 | Save sales ranges only when the forms data is changed | shoop/campaigns/admin_module/form_parts.py | shoop/campaigns/admin_module/form_parts.py | # This file is part of Shoop.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django import forms
from django.utils.translation impo... | # This file is part of Shoop.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django import forms
from django.utils.translation impo... | Python | 0 |
8b17411d16c22c7a28017f67c827c81e28535f41 | Fix rate_watcher locking error | sacad/rate_watcher.py | sacad/rate_watcher.py | """ This module provides a class with a context manager to help avoid overloading web servers. """
import asyncio
import logging
import os
import random
import sqlite3
import time
import urllib.parse
class AccessRateWatcher:
""" Access rate limiter, supporting concurrent access by threads and/or processes. """
... | """ This module provides a class with a context manager to help avoid overloading web servers. """
import asyncio
import logging
import os
import random
import sqlite3
import time
import urllib.parse
class AccessRateWatcher:
""" Access rate limiter, supporting concurrent access by threads and/or processes. """
... | Python | 0.000001 |
029e39edfb733a524d7ea4fc7f64fa93e81b9f53 | Add SACREBLEU_DIR and smart_open to imports (#73) | sacrebleu/__init__.py | sacrebleu/__init__.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2017--2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not
# use this file except in compliance with the License. A copy of the License
# is located at
#
# http://aws.... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2017--2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not
# use this file except in compliance with the License. A copy of the License
# is located at
#
# http://aws.... | Python | 0 |
09faf99eb775a36a70d03958a58bf1df8bbb1b93 | update for structure changes | salt/auth/__init__.py | salt/auth/__init__.py | '''
Salt's pluggable authentication system
This sysetm allows for authentication to be managed in a module pluggable way
so that any external authentication system can be used inside of Salt
'''
# 1. Create auth loader instance
# 2. Accept arguments as a dict
# 3. Verify with function introspection
# 4. Execute auth ... | '''
Salt's pluggable authentication system
This sysetm allows for authentication to be managed in a module pluggable way
so that any external authentication system can be used inside of Salt
'''
# 1. Create auth loader instance
# 2. Accept arguments as a dict
# 3. Verify with function introspection
# 4. Execute auth ... | Python | 0 |
cad9160baa6d3841910ad68b48a212c4475a62e1 | Fix contact list type filter | shuup/admin/modules/contacts/views/list.py | shuup/admin/modules/contacts/views/list.py | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.core.urlresol... | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.core.urlresol... | Python | 0 |
9d9737f765416305dd2adbd816b447de5c5eae7c | add version 8.0.6.0 (#14003) | var/spack/repos/builtin/packages/ibm-java/package.py | var/spack/repos/builtin/packages/ibm-java/package.py | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import platform
import os
class IbmJava(Package):
"""Binary distribution of the IBM Java Softwar... | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import platform
import os
class IbmJava(Package):
"""Binary distribution of the IBM Java Softwar... | Python | 0 |
9fdcc147a754e3b4f85decb858066610652bd713 | update version. (#5439) | var/spack/repos/builtin/packages/r-tibble/package.py | var/spack/repos/builtin/packages/r-tibble/package.py | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | Python | 0 |
802926f151d9a1337c2a07adbc485b6193e91733 | Add template string calling to the state module | salt/modules/state.py | salt/modules/state.py | '''
Control the state system on the minion
'''
# Import Python modules
import os
# Import salt modules
import salt.state
def low(data):
'''
Execute a single low data call
'''
st_ = salt.state.State(__opts__)
err = st_.verify_data(data)
if err:
return err
return st_.call(data)
def ... | '''
Control the state system on the minion
'''
# Import Python modules
import os
# Import salt modules
import salt.state
def low(data):
'''
Execute a single low data call
'''
st_ = salt.state.State(__opts__)
err = st_.verify_data(data)
if err:
return err
return st_.call(data)
def ... | Python | 0.000001 |
83fea631f1765d4641cde8af2c5c931b22e4ee33 | extend trilinos | var/spack/repos/builtin/packages/trilinos/package.py | var/spack/repos/builtin/packages/trilinos/package.py | from spack import *
import os
class Trilinos(Package):
"""
The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented
software framework for the solution of large-scale, complex multi-physics engineering and scientific problems.
A unique design feature o... | from spack import *
class Trilinos(Package):
"""
The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented
software framework for the solution of large-scale, complex multi-physics engineering and scientific problems.
A unique design feature of Trilino... | Python | 0.000001 |
ac8d29c5855ea05bd42766cd142808704aded867 | Add space to trigger travis | web/impact/impact/permissions/graphql_permissions.py | web/impact/impact/permissions/graphql_permissions.py | from accelerator.models import (
UserRole,
)
from accelerator_abstract.models.base_user_utils import is_employee
from accelerator.models import ACTIVE_PROGRAM_STATUS
BASIC_ALLOWED_USER_ROLES = [
UserRole.FINALIST,
UserRole.AIR,
UserRole.MENTOR,
UserRole.PARTNER,
UserRole.ALUM
]
BASIC_VISIBLE_U... | from accelerator.models import (
UserRole,
)
from accelerator_abstract.models.base_user_utils import is_employee
from accelerator.models import ACTIVE_PROGRAM_STATUS
BASIC_ALLOWED_USER_ROLES = [
UserRole.FINALIST,
UserRole.AIR,
UserRole.MENTOR,
UserRole.PARTNER,
UserRole.ALUM
]
BASIC_VISIBLE_U... | Python | 0 |
7ad6da17a72010967ccd82d3393a86762cf2a786 | Mark import-std-module/empty-module as libc++ test | packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/TestEmptyStdModule.py | packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/TestEmptyStdModule.py | """
Test that LLDB doesn't crash if the std module we load is empty.
"""
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import os
class ImportStdModule(TestBase):
mydir = TestBase.compute_mydir(__file__)
# We only emulate a fake libc++ in th... | """
Test that LLDB doesn't crash if the std module we load is empty.
"""
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import os
class ImportStdModule(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipIf(compiler=no_match("clang"))
... | Python | 0.000037 |
973a7754623c330f0352979bf9e0f2a6020acf62 | reformat >80 char import line | tendrl/commons/tests/objects/cluster/atoms/check_cluster_available/test_check_cluster_available_init.py | tendrl/commons/tests/objects/cluster/atoms/check_cluster_available/test_check_cluster_available_init.py | import etcd
import maps
import pytest
from tendrl.commons.objects.cluster.atoms.check_cluster_available import \
CheckClusterAvailable
from tendrl.commons.objects import AtomExecutionFailedError
class MockCluster(object):
def __init__(self, integration_id = 0):
self.is_managed = True
def load(self... | import etcd
import maps
import pytest
from tendrl.commons.objects.cluster.atoms.check_cluster_available import CheckClusterAvailable # noqa
from tendrl.commons.objects import AtomExecutionFailedError
class MockCluster(object):
def __init__(self, integration_id = 0):
self.is_managed = True
def load(se... | Python | 0 |
eea0c4fd610882ee748410063a62c30ce95da0ee | Fix the snapshot creation script for the new command line syntax. Review URL: http://codereview.chromium.org//8414015 | runtime/tools/create_snapshot_file.py | runtime/tools/create_snapshot_file.py | #!/usr/bin/env python
#
# Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
# Script to create snapshot files.
import getopt
import optparse
import string
im... | #!/usr/bin/env python
#
# Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
# Script to create snapshot files.
import getopt
import optparse
import string
im... | Python | 0.999999 |
788073cdf2a5e2ee142cbcf1263accad7baac153 | Move chmod | genes/gnu_coreutils/commands.py | genes/gnu_coreutils/commands.py | #!/usr/bin/env python
from genes.posix.traits import only_posix
from genes.process.commands import run
@only_posix()
def chgrp(path, group):
run(['chgrp', group, path])
@only_posix()
def chown(path, user):
run(['chown', user, path])
@only_posix()
def chmod(*args):
# FIXME: this is ugly, name the ... | #!/usr/bin/env python
from genes.posix.traits import only_posix
from genes.process.commands import run
@only_posix()
def chgrp(path, group):
run(['chgrp', group, path])
@only_posix()
def chown(path, user):
run(['chown', user, path])
@only_posix()
def groupadd(*args):
run(['groupadd'] + list(args))
... | Python | 0.000001 |
14ba4d581428ff38190153955315dc13483623e1 | simplify (at least for me) | find_groups.py | find_groups.py | import random
from collections import namedtuple, defaultdict, deque
Point = namedtuple('Point', ['x', 'y'])
Size = namedtuple('Size', ['w', 'h'])
EMPTY = 0
BLACK = 1
WHITE = 2
BOARD_LETTERS = 'ABCDEFGHJKLMNOPQRST'
class Group:
def __init__(self, color):
self.color = color
self.points = set()
... | import random
from collections import namedtuple, defaultdict, deque
Point = namedtuple('Point', ['x', 'y'])
Size = namedtuple('Size', ['w', 'h'])
EMPTY = 0
BLACK = 1
WHITE = 2
BOARD_LETTERS = 'ABCDEFGHJKLMNOPQRST'
class Group:
def __init__(self, color):
self.color = color
self.points = set()
... | Python | 0.000002 |
0ab67a50c711e3a15974f3bb4fe9df84fac6608a | use new template | gimmemotifs/commands/cluster.py | gimmemotifs/commands/cluster.py | #!/usr/bin/env python
# Copyright (c) 2009-2016 Simon van Heeringen <s.vanheeringen@science.ru.nl>
#
# This module is free software. You can redistribute it and/or modify it under
# the terms of the MIT License, see the file COPYING included with this
# distribution.
from distutils import sysconfig
from gimmemotifs... | #!/usr/bin/env python
# Copyright (c) 2009-2016 Simon van Heeringen <s.vanheeringen@science.ru.nl>
#
# This module is free software. You can redistribute it and/or modify it under
# the terms of the MIT License, see the file COPYING included with this
# distribution.
from distutils import sysconfig
from gimmemotifs... | Python | 0 |
394954fc80230e01112166db4fe133c107febead | Allow more than one GitHub repo from the same user | gitautodeploy/parsers/common.py | gitautodeploy/parsers/common.py |
class WebhookRequestParser(object):
"""Abstract parent class for git service parsers. Contains helper
methods."""
def __init__(self, config):
self._config = config
def get_matching_repo_configs(self, urls):
"""Iterates over the various repo URLs provided as argument (git://,
s... |
class WebhookRequestParser(object):
"""Abstract parent class for git service parsers. Contains helper
methods."""
def __init__(self, config):
self._config = config
def get_matching_repo_configs(self, urls):
"""Iterates over the various repo URLs provided as argument (git://,
s... | Python | 0.998892 |
d4fed426153105a9f8cab595848d5303003449b8 | revert last commit, import properly | cogs/games.py | cogs/games.py | import discord
import json
from discord.ext import commands
from datetime import datetime
from utils import aiohttp_wrap as aw
class Game:
""" Cog which allows fetching of video game information """
IG_URL = 'https://api-2445582011268.apicast.io/{}/'
with open('data/apikeys.json') as f:
KEY = ... | import discord
from discord.ext import commands
from datetime import datetime
from utils import aiohttp_wrap as aw
class Game:
""" Cog which allows fetching of video game information """
IG_URL = 'https://api-2445582011268.apicast.io/{}/'
with open('data/apikeys.json') as f:
KEY = json.load(f)... | Python | 0 |
7adeb5e668a132ab540fa45c8e6c62cb8481930d | fix infinite recursion | fluff/sync_couchdb.py | fluff/sync_couchdb.py | from django.db.models import signals
import os
from couchdbkit.ext.django.loading import get_db
from pillowtop.utils import import_pillows
from dimagi.utils.couch import sync_docs
FLUFF = 'fluff'
def sync_design_docs(temp=None):
dir = os.path.abspath(os.path.dirname(__file__))
for pillow in import_pillows(i... | from django.db.models import signals
import os
from couchdbkit.ext.django.loading import get_db
from pillowtop.utils import import_pillows
from dimagi.utils.couch.sync_docs import sync_design_docs as sync_docs
FLUFF = 'fluff'
def sync_design_docs(temp=None):
dir = os.path.abspath(os.path.dirname(__file__))
... | Python | 0.00056 |
9cc7218f2eef7135e5402a47c2783def31add9f3 | save screenshot in 800x480 too | screenshots.py | screenshots.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, with_statement
from PIL import Image, ImageFile
from shovel import task
from meta.utils import path_meta, path_generated, depends
ImageFile.MAXBLOCK = 2**20
def save(image, filename):
image.save(filename, "JPEG", quality=98, optimize=Tru... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, with_statement
from PIL import Image, ImageFile
from shovel import task
from meta.utils import path_meta, path_generated, depends
ImageFile.MAXBLOCK = 2**20
def save(image, filename):
image.save(filename, "JPEG", quality=98, optimize=Tru... | Python | 0 |
bcb1c8d48532159f76708bdfd0e6868dbda92343 | make sure command processes run in test database when needed | freppledb/__init__.py | freppledb/__init__.py | r'''
A Django project implementing a web-based user interface for frePPLe.
'''
VERSION = '4.5.0'
def runCommand(taskname, *args, **kwargs):
'''
Auxilary method to run a django command. It is intended to be used
as a target for the multiprocessing module.
The code is put here, such that a child process load... | r'''
A Django project implementing a web-based user interface for frePPLe.
'''
VERSION = '4.5.0'
def runCommand(taskname, *args, **kwargs):
'''
Auxilary method to run a django command. It is intended to be used
as a target for the multiprocessing module.
The code is put here, such that a child process load... | Python | 0 |
b56145ad1aebd931ca0e741ea7d4315520e6ed40 | Tweak version incrementer | release.py | release.py | from os import fdopen, remove
from shutil import move
import subprocess
import sys
from tempfile import mkstemp
from geomeppy import __version__
def replace(file_path, pattern, subst):
# Create temp file
fh, abs_path = mkstemp()
with fdopen(fh, 'w') as new_file:
with open(file_path) as old_file:
... | from os import fdopen, remove
from shutil import move
import subprocess
import sys
from tempfile import mkstemp
from geomeppy import __version__
def replace(file_path, pattern, subst):
# Create temp file
fh, abs_path = mkstemp()
with fdopen(fh, 'w') as new_file:
with open(file_path) as old_file:
... | Python | 0 |
720c841d0930f73d1efe90518b0a2d9dcbd6425d | Document context | funktional/context.py | funktional/context.py | import sys
from contextlib import contextmanager
# Are we training (or testing)
training = False
@contextmanager
def context(**kwargs):
"""Temporarily change the values of context variables passed.
Enables the `with` syntax:
>>> with context(training=True):
...
"""
current = dict((k, geta... | import sys
from contextlib import contextmanager
training = False
@contextmanager
def context(**kwargs):
current = dict((k, getattr(sys.modules[__name__], k)) for k in kwargs)
for k,v in kwargs.items():
setattr(sys.modules[__name__], k, v)
yield
for k,v in current.items():
setattr(sys... | Python | 0.000004 |
55987e48997f7f5a94adc3c53fcb8ae58e672c3c | increase version number | gdc_client/version.py | gdc_client/version.py | __version__ = 'v1.4.0'
| __version__ = 'v1.3.0'
| Python | 0.00036 |
ed7f0e555b438b611f4a9b0fdf6de1fca6ec2914 | fix incorrect use of str replace | genSongbook.py | genSongbook.py | #!/usr/bin/python
import sys, os
def query(question, default):
sys.stdout.write(question + " [" + default + "] ? ")
choice = raw_input()
if choice == '':
return default
return choice
if __name__ == '__main__':
print("----------------------")
print("Welcome to genSongbook")
print(... | #!/usr/bin/python
import sys, os
def query(question, default):
sys.stdout.write(question + " [" + default + "] ? ")
choice = raw_input()
if choice == '':
return default
return choice
if __name__ == '__main__':
print("----------------------")
print("Welcome to genSongbook")
print(... | Python | 0.000014 |
c7067fce8723f810ed48de6513c6f756d499d807 | add whitelist tags. | dp_tornado/helper/html.py | dp_tornado/helper/html.py | # -*- coding: utf-8 -*-
from dp_tornado.engine.helper import Helper as dpHelper
try:
# py 2.x
import HTMLParser
html_parser = HTMLParser.HTMLParser()
except:
# py 3.4-
try:
import html.parser
html_parser = html.parser.HTMLParser()
except:
# py 3.4+
import html... | # -*- coding: utf-8 -*-
from dp_tornado.engine.helper import Helper as dpHelper
try:
# py 2.x
import HTMLParser
html_parser = HTMLParser.HTMLParser()
except:
# py 3.4-
try:
import html.parser
html_parser = html.parser.HTMLParser()
except:
# py 3.4+
import html... | Python | 0 |
ab6d09c93a9d43ffbf442880633170f5fc678edd | add verbose mode to print processing module | get_modules.py | get_modules.py | #!/usr/bin/env python3
import os
import sys
import requests
import yaml
import git
import svn.remote
import zipfile
import argparse
def get_modules(yml_file, dest, verbose):
f = open(yml_file)
for data in yaml.load(f):
if (not dest.endswith('/')):
dest = dest + '/'
if not 'version'... | #!/usr/bin/env python3
import os
import sys
import requests
import yaml
import git
import svn.remote
import zipfile
import argparse
def get_modules(yml_file, dest):
f = open(yml_file)
for data in yaml.load(f):
if (not dest.endswith('/')):
dest = dest + '/'
if not 'version' in data:... | Python | 0.000001 |
ad70f37b4a02ba117a91dcbdf5387ade2cbdfcf5 | Change petset to stateful set | e2e/tests/test_volumes.py | e2e/tests/test_volumes.py | from clickclick import fatal_error
from .helpers import PETSET_PATH, SECRET_PATH, create_resource, wait_for_pod
def test_volumes(run_id, url, token):
secret_manifest = '''
apiVersion: v1
kind: Secret
metadata:
name: &cluster_name spilodemo
labels:
application: spilo
spilo-cluster: *cluster_name
type... | from clickclick import fatal_error
from .helpers import PETSET_PATH, SECRET_PATH, create_resource, wait_for_pod
def test_volumes(run_id, url, token):
secret_manifest = '''
apiVersion: v1
kind: Secret
metadata:
name: &cluster_name spilodemo
labels:
application: spilo
spilo-cluster: *cluster_name
type... | Python | 0.000002 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.