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 |
|---|---|---|---|---|---|---|---|
42e26737d083b82716c3adb8c19fb66a5063dc65 | change version number to v3.0.1 | src/cmdlr/info.py | src/cmdlr/info.py | """Cmdlr infomation files."""
VERSION = '3.0.1'
DESCRIPTION = ('An extensible comic subscriber.')
LICENSE = 'MIT'
AUTHOR = 'Civalin'
AUTHOR_EMAIL = 'larinawf@gmail.com'
PROJECT_URL = 'https://github.com/civalin/cmdlr'
PROJECT_NAME = 'cmdlr'
| """Cmdlr infomation files."""
VERSION = '3.0.0'
DESCRIPTION = ('An extensible comic subscriber.')
LICENSE = 'MIT'
AUTHOR = 'Civalin'
AUTHOR_EMAIL = 'larinawf@gmail.com'
PROJECT_URL = 'https://github.com/civalin/cmdlr'
PROJECT_NAME = 'cmdlr'
| Python | 0.000123 |
49e301ac6a74a30cfdf00bf4178889f9ecb74889 | Patch release for bug-fix #166 | vtki/_version.py | vtki/_version.py | """ version info for vtki """
# major, minor, patch
version_info = 0, 18, 2
# Nice string for the version
__version__ = '.'.join(map(str, version_info))
| """ version info for vtki """
# major, minor, patch
version_info = 0, 18, 1
# Nice string for the version
__version__ = '.'.join(map(str, version_info))
| Python | 0 |
4c6ec1413d1a12165c1231095783aa94d235389a | Add __version__ to vumi package. | vumi/__init__.py | vumi/__init__.py | """
Vumi scalable text messaging engine.
"""
__version__ = "0.5.0a"
| Python | 0.000001 | |
3bb474a4506abb569d5c54703ba3bf2c9c933fd9 | Add tof-server to path | tof-server.wsgi | tof-server.wsgi | import sys
activate_this = '/var/www/tof-server/flask/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
sys.path.append('/var/www/tof-server')
#activator = 'some/path/to/activate_this.py'
#with open(activator) as f:
# exec(f.read(), {'__file__': activator})
from tof_server import app as... | activate_this = '/var/www/tof-server/flask/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
#activator = 'some/path/to/activate_this.py'
#with open(activator) as f:
# exec(f.read(), {'__file__': activator})
from tof_server import app as application | Python | 0.000001 |
5ede219cd4613af0fecbf415030aaa23df1ff3ee | Add test for measurement order | test/core/measurements_test.py | test/core/measurements_test.py | # Copyright 2016 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 agre... | # Copyright 2016 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 agre... | Python | 0 |
2a246c78a4506de5b4fcc55ff0257182142a4436 | Complete nums & num->pos dict sol w/ time/space complexity | lc0380_insert_delete_getrandom_o1.py | lc0380_insert_delete_getrandom_o1.py | """Leetcode 380. Insert Delete GetRandom O(1)
Medium
URL: https://leetcode.com/problems/insert-delete-getrandom-o1/
Design a data structure that supports all following operations in average O(1)
time.
- insert(val): Inserts an item val to the set if not already present.
- remove(val): Removes an item val from the set... | """Leetcode 380. Insert Delete GetRandom O(1)
Medium
URL: https://leetcode.com/problems/insert-delete-getrandom-o1/
Design a data structure that supports all following operations in average O(1)
time.
- insert(val): Inserts an item val to the set if not already present.
- remove(val): Removes an item val from the set... | Python | 0.000001 |
ff6d9647b72c2101480f170e55ee28fd0cb37d11 | add MME tag by default | xbrowse_server/base/management/commands/add_default_tags.py | xbrowse_server/base/management/commands/add_default_tags.py | import sys
from optparse import make_option
from xbrowse_server import xbrowse_controls
from django.core.management.base import BaseCommand
from xbrowse_server.base.models import Project, ProjectTag, Family
def get_or_create_project_tag(project, tag_name, description, color='#1f78b4'):
"""
Gets or creates a ... | import sys
from optparse import make_option
from xbrowse_server import xbrowse_controls
from django.core.management.base import BaseCommand
from xbrowse_server.base.models import Project, ProjectTag, Family
def get_or_create_project_tag(project, tag_name, description, color='#1f78b4'):
"""
Gets or creates a ... | Python | 0 |
66c33c880d1e5f20a23e01937f8c88f5b66bfc5c | fix SQL error on non existing column | addons/website_membership/models/membership.py | addons/website_membership/models/membership.py | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MembershipLine(models.Model):
_inherit = 'membership.membership_line'
def get_published_companies(self, limit=None):
if not self.ids:
return []
limit_c... | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MembershipLine(models.Model):
_inherit = 'membership.membership_line'
def get_published_companies(self, limit=None):
if not self.ids:
return []
limit_c... | Python | 0.000272 |
d5cb2a37ea77b15c5725d6ebf8e0ab79f3bea613 | Fix interface in historian service interface | flow_workflow/historian/service_interface.py | flow_workflow/historian/service_interface.py | import logging
from flow_workflow.historian.messages import UpdateMessage
LOG = logging.getLogger(__name__)
class WorkflowHistorianServiceInterface(object):
def __init__(self,
broker=None,
exchange=None,
routing_key=None):
self.broker = broker
self.exchange = ex... | import logging
from flow_workflow.historian.messages import UpdateMessage
LOG = logging.getLogger(__name__)
class WorkflowHistorianServiceInterface(object):
def __init__(self,
broker=None,
exchange=None,
routing_key=None):
self.broker = broker
self.exchange = ex... | Python | 0.000004 |
26f5adea28f81ebbe830d4a207958320e0b40520 | update version | gtfparse/__init__.py | gtfparse/__init__.py | # Copyright (c) 2015. Mount Sinai School of Medicine
#
# 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 o... | # Copyright (c) 2015. Mount Sinai School of Medicine
#
# 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 o... | Python | 0 |
85dc28b44def27658e282d621749598ec80ea420 | Fix typo | ambari-server/src/main/python/TeardownAgent.py | ambari-server/src/main/python/TeardownAgent.py | #!/usr/bin/env python
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... | #!/usr/bin/env python
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... | Python | 0.999999 |
31f55658d7495bf1fed8a5a466ffe54502a0348c | Make countersong check for language-dependent spells | tpdatasrc/tpgamefiles/scr/tpModifiers/countersong.py | tpdatasrc/tpgamefiles/scr/tpModifiers/countersong.py | from templeplus.pymod import PythonModifier
from toee import *
import tpdp
def Remove(char, args, evt_obj):
if evt_obj.is_modifier('Countersong'):
args.condition_remove()
return 0
# built-in hook only checks for Sonic descriptor
def Lang(char, args, evt_obj):
lang = 1 << (D20STD_F_SPELL_DESCRIPTOR_LANGUAGE_DEPEN... | from templeplus.pymod import PythonModifier
from toee import *
import tpdp
def Remove(char, args, evt_obj):
if evt_obj.is_modifier('Countersong'):
args.condition_remove()
return 0
countersong = PythonModifier()
countersong.ExtendExisting('Countersong')
countersong.AddHook(ET_OnConditionAddPre, EK_NONE, Remove, ()... | Python | 0 |
e535def2bc9b7de203e1fd37fc592cdeed1be526 | fix selection bug | src/choose.py | src/choose.py | # Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
# @nolint
from __future... | # Copyright (c) 2015-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
# @nolint
from __future... | Python | 0 |
ec7150144682afb1f64cd3ba3713207912820264 | Remove add_station reference. | agent/manager.py | agent/manager.py | import json
import logging
import threading
import time
import pika
from db.db import session
from db.models import Metric, WeatherStation
LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) '
'-35s %(lineno) -5d: %(message)s')
LOGGER = logging.getLogger(__name__)
class AgentManager(o... | import json
import logging
import threading
import time
import pika
from db.db import session
from db.models import Metric, WeatherStation
LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) '
'-35s %(lineno) -5d: %(message)s')
LOGGER = logging.getLogger(__name__)
class AgentManager(o... | Python | 0 |
0a44fc07efb902912e22e72979f69fbab200cd32 | Update version 0.6.8 -> 0.6.9 | dimod/package_info.py | dimod/package_info.py | __version__ = '0.6.9'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = 'acondello@dwavesys.com'
__description__ = 'A shared API for binary quadratic model samplers.'
| __version__ = '0.6.8'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = 'acondello@dwavesys.com'
__description__ = 'A shared API for binary quadratic model samplers.'
| Python | 0 |
6d86e8565a9ea1aac07b8a1470e2f3b724b981c2 | fix for use on python 2.1 | Lib/bsddb/test/test_misc.py | Lib/bsddb/test/test_misc.py | """Miscellaneous bsddb module test cases
"""
import os
import sys
import unittest
try:
# For Python 2.3
from bsddb import db, dbshelve
except ImportError:
# For earlier Pythons w/distutils pybsddb
from bsddb3 import db, dbshelve
#----------------------------------------------------------------------
... | """Miscellaneous bsddb module test cases
"""
import os
import sys
import unittest
try:
# For Python 2.3
from bsddb import db, dbshelve
except ImportError:
# For earlier Pythons w/distutils pybsddb
from bsddb3 import db, dbshelve
from test.test_support import verbose
#--------------------------------... | Python | 0.000002 |
d7b8186f0f4115307753d0aef038ec61155c83bc | Fix typo in python | Test/Test-IO/python/TestIO.py | Test/Test-IO/python/TestIO.py | #!/usr/bin/python
import timeit, sys, io
def wrapper(func, *args, **kwargs):
def wrapped():
return func(*args, **kwargs)
return wrapped
def start(file, outfile):
input = open(file, 'r')
output = open(outfile, 'w')
line = input.readline()
while line:
line = line.replace('Tellu... | #!/usr/bin/python
import timeit, sys, io
def wrapper(func, *args, **kwargs):
def wrapped():
return func(*args, **kwargs)
return wrapped
def start(file, outfile):
#input = open(file, 'r')
#output = open(outfile, 'w')
line = input.readline()
while line:
line = line.replace('Tel... | Python | 0.999998 |
a9b27bc7c3821536657405790f38532db473b92c | Fix bug in recent shelves views | books/views/shelf_views.py | books/views/shelf_views.py | from datetime import timedelta
from django.core.urlresolvers import reverse
from django.contrib import messages
from django.shortcuts import (
get_object_or_404,
redirect,
)
from django.utils import timezone
from django.views.generic import (
CreateView,
DeleteView,
DetailView,
ListView,
Upd... | from datetime import datetime, timedelta
from django.core.urlresolvers import reverse
from django.contrib import messages
from django.shortcuts import (
get_object_or_404,
redirect,
)
from django.views.generic import (
CreateView,
DeleteView,
DetailView,
ListView,
UpdateView,
View,
)
f... | Python | 0 |
7997dc0785f124dd3836bc8490c701fe99217a48 | add test mode param | umapi/api.py | umapi/api.py | import requests
import json
from error import UMAPIError, UMAPIRetryError, UMAPIRequestError, ActionFormatError
class UMAPI(object):
def __init__(self, endpoint, auth, test_mode=False):
self.endpoint = str(endpoint)
self.auth = auth
self.test_mode = test_mode
def users(self, org_id, p... | import requests
import json
from error import UMAPIError, UMAPIRetryError, UMAPIRequestError, ActionFormatError
class UMAPI(object):
def __init__(self, endpoint, auth):
self.endpoint = str(endpoint)
self.auth = auth
def users(self, org_id, page=0):
return self._call('/users/%s/%d' % (... | Python | 0.000001 |
b19429159f3c813297ba2e237abba276045f9ff1 | add 0.10.17, mariadb-connector-c dependency (#11044) | var/spack/repos/builtin/packages/r-rmysql/package.py | var/spack/repos/builtin/packages/r-rmysql/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 *
class RRmysql(RPackage):
"""Implements 'DBI' Interface to 'MySQL' and 'MariaDB' Databases."""
... | # 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 *
class RRmysql(RPackage):
"""Implements 'DBI' Interface to 'MySQL' and 'MariaDB' Databases."""
... | Python | 0 |
564f1da2c6643a4ef6d27b736620116b144fa2ac | Handle stale PostgreSQL (or others) more gracefully. Closes #3394. Thanks to flfr at stibo.com for the patch. | trac/db/pool.py | trac/db/pool.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005 Edgewall Software
# Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgew... | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005 Edgewall Software
# Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgew... | Python | 0.000002 |
bcff742c27904f995d9f5e8a184f0348b58139a5 | fix closing bracket | {{cookiecutter.repo_name}}/fabfile.py | {{cookiecutter.repo_name}}/fabfile.py | # -*- coding: utf-8 -*-
import os
import datetime
from contextlib import contextmanager
from fabric.api import env, run, local, prefix, sudo
def live():
"""Connects to the server."""
env.hosts = [os.environ.get('{{cookiecutter.repo_name}}_host')]
env.user = 'freshmilk'
env.cwd = '/var/www... | # -*- coding: utf-8 -*-
import os
import datetime
from contextlib import contextmanager
from fabric.api import env, run, local, prefix, sudo
def live():
"""Connects to the server."""
env.hosts = [os.environ.get('{{cookiecutter.repo_name}}_host')]
env.user = 'freshmilk'
env.cwd = '/var/www... | Python | 0.000001 |
645c640f38ae67008eb18c79301e19ddfd39c041 | use new valgrind repo (#8538) | var/spack/repos/builtin/packages/valgrind/package.py | var/spack/repos/builtin/packages/valgrind/package.py | ##############################################################################
# Copyright (c) 2013-2018, 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-2018, 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 |
88a028663b7688af362a2ebd5c168aaccc5695c0 | Comment updates | bravado/mapping/request.py | bravado/mapping/request.py | from bravado.mapping.operation import log
from bravado.mapping.param import unmarshal_param
class RequestLike(object):
"""
Common interface for server side request objects.
Subclasses are responsible for providing attrs for __required_attrs__.
"""
__required_attrs__ = [
'path', # dict... | from bravado.mapping.operation import log
from bravado.mapping.param import unmarshal_param
class RequestLike(object):
"""
Define a common interface for bravado to interface with server side
request objects.
Subclasses are responsible for providing attrs for __required_attrs__.
"""
__required... | Python | 0 |
f0dda4f875c13947d47cf91a58e9a834a5e4a92c | Fix flapping demo geo_location test (#37516) | tests/components/demo/test_geo_location.py | tests/components/demo/test_geo_location.py | """The tests for the demo platform."""
import unittest
import pytest
from homeassistant.components import geo_location
from homeassistant.components.demo.geo_location import (
DEFAULT_UPDATE_INTERVAL,
NUMBER_OF_DEMO_DEVICES,
)
from homeassistant.const import LENGTH_KILOMETERS
from homeassistant.setup import s... | """The tests for the demo platform."""
import unittest
from homeassistant.components import geo_location
from homeassistant.components.demo.geo_location import (
DEFAULT_UPDATE_INTERVAL,
NUMBER_OF_DEMO_DEVICES,
)
from homeassistant.const import LENGTH_KILOMETERS
from homeassistant.setup import setup_component
... | Python | 0 |
10a2b3def6936d94e21ac68a15b3ae1428e75e41 | Make the disassembler script work on Linux. | util/dasm.py | util/dasm.py | #!/usr/bin/env python
import sys
import optparse
import subprocess
import re
def dasm(infile, outfp, verbose = True):
command_line = [
'objdump',
'--disassemble',
'--disassemble-zeroes',
'--disassembler-options=att,suffix',
#'--prefix-addresses',
'--no-show-raw-insn',
'--wide',
infile
]
p = subpr... | #!/usr/bin/env python
import sys
import optparse
import subprocess
import re
def dasm(infile, outfp, verbose = True):
command_line = [
'objdump',
'--disassemble',
'--disassemble-zeroes',
'--disassembler-options=att,suffix',
'--prefix-addresses',
'--no-show-raw-insn',
'--wide',
inf... | Python | 0 |
887b03d7587525509d3652ef42b930025194d2ad | Update 2sum.py | Array/2sum.py | Array/2sum.py | Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target,
where index1 must be less than index2. Please note that your returned answers (both index1 and index2) are not zero-based.
Yo... | Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target,
where index1 must be less than index2. Please note that your returned answers (both index1 and index2) are not zero-based.
Yo... | Python | 0 |
dbdfbc18ebadc0a1d50a6513bb982d2e3881036f | Add MAX_TURNS and some more output to train-ml-bot | train-ml-bot.py | train-ml-bot.py | """
Train a machine learning model for the classifier bot. We create a player, and watch it play games against itself.
Every observed state is converted to a feature vector and labeled with the eventual outcome
(-1.0: player 2 won, 1.0: player 1 won)
This is part of the second worksheet.
"""
from api import State, uti... | """
Train a machine learning model for the classifier bot. We create a player, and watch it play games against itself.
Every observed state is converted to a feature vector and labeled with the eventual outcome
(-1.0: player 2 won, 1.0: player 1 won)
This is part of the second worksheet.
"""
from api import State, uti... | Python | 0 |
c5af0d98407052b9f04e37efc741c9b457825eb7 | Fix reading JSON file | Python/scoreP2.py | Python/scoreP2.py | # coding=utf-8
import json
import os
import numpy as np
from scoreCommon import matchInputFile, \
computeCommonMetrics, computeAveragePrecisionMetrics
_FEATURE_NAMES = ['globules', 'streaks']
def loadFeatures(featuresPath):
try:
with open(featuresPath) as f:
features = json.load(f)
... | # coding=utf-8
import json
import os
import numpy as np
from scoreCommon import matchInputFile, \
computeCommonMetrics, computeAveragePrecisionMetrics
_FEATURE_NAMES = ['globules', 'streaks']
def loadFeatures(featuresPath):
try:
features = json.load(featuresPath)
except ValueError:
# ... | Python | 0.999549 |
6454bca66b73efa6e124fce80634fc98bd0b9c25 | add new dependencies for python 3.7.6 | Back/setup.py | Back/setup.py | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
requires = [
'marshmallow==3.3.0',
'pyodbc==4.0.27',
'p... | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
requires = [
'pyodbc==4.0.28',
'pyramid==1.10.4',
'sqla... | Python | 0.000001 |
d9c9f9c363f5520f37800930efd9eaa1e43daed7 | bump version | ttt/__init__.py | ttt/__init__.py | # -*- coding: utf-8 -*-
__version__ = '0.3.2'
| # -*- coding: utf-8 -*-
__version__ = '0.3.1'
| Python | 0 |
c6c74870e6557dbd0523d1b01f377f14b05b632a | Add db check to makeTest to ensure we cover cases where an explicit path to a test function is passed | django_nose/plugin.py | django_nose/plugin.py | import os.path
import sys
from django.conf import settings
from django.db.models.loading import get_apps, load_app
from django.test.testcases import TransactionTestCase
class ResultPlugin(object):
"""
Captures the TestResult object for later inspection.
nose doesn't return the full test result object fro... | import os.path
import sys
from django.conf import settings
from django.db.models.loading import get_apps, load_app
from django.test.testcases import TransactionTestCase
class ResultPlugin(object):
"""
Captures the TestResult object for later inspection.
nose doesn't return the full test result object fro... | Python | 0 |
aa3a6dd01d7681f92d1be42fb2831126ced7a76e | Update __init__.py | django_su/__init__.py | django_su/__init__.py | import os
# The fake password we will use to authenticate su'ed users
SECRET_PASSWORD = os.urandom(64)
VERSION = (0, 4, 8)
__version__ = '.'.join([str(n) for n in VERSION])
| import os
# The fake password we will use to authenticate su'ed users
SECRET_PASSWORD = os.urandom(64)
__version__ = '0.4.8'
| Python | 0.000072 |
3566e996b350b1b5e74caa886b69c17b13ba4913 | Add HTTPs support to assertRedirectsTo | django_test_mixins.py | django_test_mixins.py | from django.test import TestCase
from django.core.cache import cache
import urlparse
class HttpCodeTestCase(TestCase):
# TODO: this should be a private method.
def assertHttpCode(self, response, code, code_description):
self.assertEqual(
response.status_code, code,
"Expected a... | from django.test import TestCase
from django.core.cache import cache
import urlparse
class HttpCodeTestCase(TestCase):
# TODO: this should be a private method.
def assertHttpCode(self, response, code, code_description):
self.assertEqual(
response.status_code, code,
"Expected a... | Python | 0 |
f860d338ae22c73ad7e313bf9cd268014be138db | Add Dense Layer to SpecGAN Discriminator | structures/SpecGAN.py | structures/SpecGAN.py | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | Python | 0.000001 |
f623312b5df6e8f201f641f87193075e8d3f70ea | Add version attribute | nuxeo-drive-client/nxdrive/__init__.py | nuxeo-drive-client/nxdrive/__init__.py | _version_ = '1.0.0-dev' | Python | 0 | |
c9277fa65afcf513c2e3000193d7837900ff8ee1 | Improve logging runtime state poll fail message | src/nodeconductor_openstack/tasks/base.py | src/nodeconductor_openstack/tasks/base.py | from celery import shared_task
from nodeconductor.core.tasks import Task
from .. import models
# TODO: move this signal to itacloud assembly application
@shared_task
def register_instance_in_zabbix(instance_uuid):
from nodeconductor.template.zabbix import register_instance
instance = models.Instance.objects... | from celery import shared_task
from nodeconductor.core.tasks import Task
from .. import models
# TODO: move this signal to itacloud assembly application
@shared_task
def register_instance_in_zabbix(instance_uuid):
from nodeconductor.template.zabbix import register_instance
instance = models.Instance.objects... | Python | 0.000001 |
f165ddf15914bd9b1c3720e99b3171fb73d331a3 | kNN remove l5 distance | ParamSklearn/components/classification/k_nearest_neighbors.py | ParamSklearn/components/classification/k_nearest_neighbors.py | import sklearn.neighbors
from HPOlibConfigSpace.configuration_space import ConfigurationSpace
from HPOlibConfigSpace.hyperparameters import CategoricalHyperparameter, \
Constant, UnParametrizedHyperparameter, UniformIntegerHyperparameter
from HPOlibConfigSpace.conditions import EqualsCondition
from ParamSklearn.c... | import sklearn.neighbors
from HPOlibConfigSpace.configuration_space import ConfigurationSpace
from HPOlibConfigSpace.hyperparameters import CategoricalHyperparameter, \
Constant, UnParametrizedHyperparameter, UniformIntegerHyperparameter
from HPOlibConfigSpace.conditions import EqualsCondition
from ParamSklearn.c... | Python | 0.999757 |
e3035fb91a96a3ff5627b6847203e3dc11fbc78f | Add libunwind-1.2.1 (#8145) | var/spack/repos/builtin/packages/libunwind/package.py | var/spack/repos/builtin/packages/libunwind/package.py | ##############################################################################
# Copyright (c) 2013-2018, 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-2018, 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.000002 |
77db7bb96686e3308a4061d24c257466d9987405 | add delete_project dashboard api. | rio/blueprints/dashboard.py | rio/blueprints/dashboard.py | # -*- coding: utf-8 -*-
from slugify import slugify
from flask import Blueprint
from flask import jsonify
from flask_wtf import Form
from wtforms import StringField
from wtforms.validators import DataRequired
from wtforms.validators import ValidationError
from wtforms.validators import Length
from rio.utils.user impor... | # -*- coding: utf-8 -*-
from slugify import slugify
from flask import Blueprint
from flask import jsonify
from flask_wtf import Form
from wtforms import StringField
from wtforms.validators import DataRequired
from wtforms.validators import ValidationError
from wtforms.validators import Length
from rio.utils.user impor... | Python | 0 |
91a77b860387ebed146b9e4e604d007bfabf0b9e | Fix potential bug in parameter passing | lib/ansible/plugins/action/normal.py | lib/ansible/plugins/action/normal.py | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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
# (at your option) any lat... | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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
# (at your option) any lat... | Python | 0.000001 |
e0db9a970c6ea778419cc1f20ca66adedffb7aae | Set HOME, allow errors to pass through to stdout/stderr | utils/mwm.py | utils/mwm.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
import os
import shutil
import subprocess
import tempfile
from string import Template
from .artifact import Artifact
LOG = logging.getLogger(__name__)
class MWM(object):
name = 'mwm'
description = 'maps.me MWM'
cmd = Template... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
import os
import shutil
import subprocess
import tempfile
from string import Template
from .artifact import Artifact
LOG = logging.getLogger(__name__)
class MWM(object):
name = 'mwm'
description = 'maps.me MWM'
cmd = Template... | Python | 0 |
bbcd5e00a4dcd991b9699ef6ae19339325bff7fd | Clean history bug resolved For a large data using batch size was not filtering proberly. So updated the batch logic LEARNER-2697 | ecommerce/core/management/commands/clean_history.py | ecommerce/core/management/commands/clean_history.py | from __future__ import unicode_literals
import logging
import time
from dateutil.parser import parse
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from oscar.core.loading import get_model
from ecommerce.courses.models import Course
from ecommerce.invoice.models i... | from __future__ import unicode_literals
import logging
import time
from dateutil.parser import parse
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from oscar.core.loading import get_model
from ecommerce.courses.models import Course
from ecommerce.invoice.models i... | Python | 0 |
33da474861334d361f3e990eda2518f919158726 | Fix reading from socket for Python 3 (PY-15772). | python/helpers/profiler/prof_io.py | python/helpers/profiler/prof_io.py | import traceback
from _prof_imports import TSerialization
from _prof_imports import TJSONProtocol
from _prof_imports import ProfilerRequest
from _prof_imports import IS_PY3K
from prof_util import ProfDaemonThread
import struct
def send_message(sock, message):
""" Send a serialized message (protobuf Message int... | import traceback
from _prof_imports import TSerialization
from _prof_imports import TJSONProtocol
from _prof_imports import ProfilerRequest
from _prof_imports import IS_PY3K
from prof_util import ProfDaemonThread
import struct
def send_message(sock, message):
""" Send a serialized message (protobuf Message int... | Python | 0 |
ee42b37a7dff1e111d7b4df71ece818e7c2f2d38 | set Keen.io settings | buildtimetrend/settings.py | buildtimetrend/settings.py | # vim: set expandtab sw=4 ts=4:
# pylint: disable=invalid-name,too-few-public-methods
'''
Manages settings of buildtime trend
Copyright (C) 2014 Dieter Adriaenssens <ruleant@users.sourceforge.net>
This file is part of buildtime-trend
<https://github.com/ruleant/buildtime-trend/>
This program is free software: you ca... | # vim: set expandtab sw=4 ts=4:
# pylint: disable=invalid-name,too-few-public-methods
'''
Manages settings of buildtime trend
Copyright (C) 2014 Dieter Adriaenssens <ruleant@users.sourceforge.net>
This file is part of buildtime-trend
<https://github.com/ruleant/buildtime-trend/>
This program is free software: you ca... | Python | 0 |
12efb71143a18e191e05a1b5f0e6d7c59854e0ba | fix brampton scraper class name | ca_on_brampton/__init__.py | ca_on_brampton/__init__.py | # coding: utf-8
from utils import CanadianJurisdiction
class Brampton(CanadianJurisdiction):
jurisdiction_id = u'ocd-jurisdiction/country:ca/csd:3521010/council'
geographic_code = 3521010
division_name = u'Brampton'
name = u'Brampton City Council'
url = 'http://www.brampton.ca'
| # coding: utf-8
from utils import CanadianJurisdiction
class London(CanadianJurisdiction):
jurisdiction_id = u'ocd-jurisdiction/country:ca/csd:3521010/council'
geographic_code = 3521010
division_name = u'Brampton'
name = u'Brampton City Council'
url = 'http://www.brampton.ca'
| Python | 0.000004 |
a4fbc3372a446861f086d847186726b80443f212 | add utils for printing results; add ndiff table | causalinference/results.py | causalinference/results.py | import numpy as np
from scipy.stats import norm
class Results(object):
def __init__(self, causal):
self.causal = causal
self.table_width = 80
def _varnames(self, varnums):
return ['X'+str(varnum+1) for varnum in varnums]
def _make_row(self, entries):
col_width = self.table_width // len(entries)
f... | import numpy as np
from scipy.stats import norm
class Results(object):
def __init__(self, causal):
self.causal = causal
def ndiff(self):
print self.causal.ndiff
def propensity(self):
if not hasattr(self.causal, 'pscore'):
self.causal.propensity()
print 'Coefficients:', self.causal.pscore['coeff... | Python | 0 |
d0ce2b074ffd603c507069d8a5ab1189fad0ca56 | Update a version number from trunk r9016 | pywikibot/families/wikia_family.py | pywikibot/families/wikia_family.py | # -*- coding: utf-8 -*-
__version__ = '$Id$'
import family
# The Wikia Search family
# user-config.py: usernames['wikia']['wikia'] = 'User name'
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = u'wikia'
self.langs = {
u'wikia': None,... | # -*- coding: utf-8 -*-
__version__ = '$Id$'
import family
# The Wikia Search family
# user-config.py: usernames['wikia']['wikia'] = 'User name'
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = u'wikia'
self.langs = {
u'wikia': None,... | Python | 0 |
9161e2dfe0edd27004ccd964a39c092275e9e5ab | Add derivation outlines | eqs_backend/eqs_backend.py | eqs_backend/eqs_backend.py | # Copyright (c) 2016, Herman Bergwerf. All rights reserved.
# Use of this source code is governed by an AGPL-3.0-style license
# that can be found in the LICENSE file.
from flask import Flask, request
from neo4j.v1 import GraphDatabase, basic_auth
from .helpers import *
# TODO: consider using http://flask-restful.re... | # Copyright (c) 2016, Herman Bergwerf. All rights reserved.
# Use of this source code is governed by an AGPL-3.0-style license
# that can be found in the LICENSE file.
from flask import Flask, request
from neo4j.v1 import GraphDatabase, basic_auth
from .helpers import *
# Define Flask server instance.
server = Flask(... | Python | 0.000005 |
27049d58b322bb50554198ecc64eab7731b86149 | add support for group metadata | zarr/meta.py | zarr/meta.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, division
import json
import numpy as np
from zarr.compat import PY2, text_type
from zarr.errors import MetadataError
ZARR_FORMAT = 2
def decode_array_metadata(b):
s = text_type(b, 'ascii')
meta = json.loads(s)
zarr_forma... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, division
import json
import numpy as np
from zarr.compat import PY2, text_type
from zarr.errors import MetadataError
def decode_metadata(b):
s = text_type(b, 'ascii')
meta = json.loads(s)
zarr_format = meta.get('zarr_forma... | Python | 0 |
1b2f9e8cff542868765f61d1af0eca004c1de791 | support skipping rows in the base processor | datapackage_pipelines_mojp/common/processors/base_processors.py | datapackage_pipelines_mojp/common/processors/base_processors.py | from itertools import chain
from datapackage_pipelines.wrapper import ingest, spew
from datapackage_pipelines_mojp import settings as mojp_settings
class BaseProcessor(object):
"""
all mojp processor should extend this class
it is pluggable into our unit tests to allow mocks and automated tests of process... | from itertools import chain
from datapackage_pipelines.wrapper import ingest, spew
from datapackage_pipelines_mojp import settings as mojp_settings
class BaseProcessor(object):
"""
all mojp processor should extend this class
it is pluggable into our unit tests to allow mocks and automated tests of process... | Python | 0 |
69642fbfa143d475b3dcc548bffbda8a6dd6c680 | Enable template caching in production | rotd/settings/production.py | rotd/settings/production.py | # -*- coding: utf-8 -*-
from .base import *
from .util import get_env_setting
DEBUG = False
DOMAIN = get_env_setting('ROTD_DOMAIN')
ALLOWED_HOSTS = [
DOMAIN,
]
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": get_env_setting('ROTD_DB_NAME'),
... | # -*- coding: utf-8 -*-
from .base import *
from .util import get_env_setting
DEBUG = False
DOMAIN = get_env_setting('ROTD_DOMAIN')
ALLOWED_HOSTS = [
DOMAIN,
]
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": get_env_setting('ROTD_DB_NAME'),
... | Python | 0 |
faaf1d64fc8c5b15c346f70288235426f0647757 | use /usr/bin/env python to run the script | FulltoSNP.py | FulltoSNP.py | #!/usr/bin/env python
import sys
import re
import itertools
import math
from Bio import SeqIO
#SNP alignment from full Alignment nexus file
#Check for correct commandline arguments
if len(sys.argv) != 4:
print("Usage: FulltoSNP.py <nexus file> <output file> <threshold>")
sys.exit(0)
#Get filenames
InFileNam... | #!/usr/bin/env python2.6
import sys
import re
import itertools
import math
from Bio import SeqIO
#SNP alignment from full Alignment nexus file
#Check for correct commandline arguments
if len(sys.argv) != 4:
print("Usage: FulltoSNP.py <nexus file> <output file> <threshold>")
sys.exit(0)
#Get filenames
InFile... | Python | 0.000001 |
4b7e77b51318522db03f0b8230e9f7400cb8a312 | Add remaining test api keys to view tests | evexml/tests/test_views.py | evexml/tests/test_views.py | """evexml app unittests for views
"""
import json
from django.conf import settings
from django.test import TestCase
from django.shortcuts import reverse
class AddAPIViewTest(TestCase):
"""Tests for the view which displays the "Add API" form.
"""
@classmethod
def setUpClass(cls):
super(AddAP... | import json
from django.conf import settings
from django.test import TestCase
from django.shortcuts import reverse
class AddAPIViewTest(TestCase):
"""Tests for the view which displays the "Add API" form.
"""
@classmethod
def setUpClass(cls):
super(AddAPIViewTest, cls).setUpClass()
da... | Python | 0 |
d01bb6e89c6fcfe8a17d90f3ace175ad26f921b5 | Support CSV files beginning with a byte order mark | git-keeper-core/gkeepcore/local_csv_files.py | git-keeper-core/gkeepcore/local_csv_files.py | # Copyright 2016 Nathan Sommer and Ben Coleman
#
# This program 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
# (at your option) any later version.
#
# This program is dis... | # Copyright 2016 Nathan Sommer and Ben Coleman
#
# This program 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
# (at your option) any later version.
#
# This program is dis... | Python | 0 |
1657e46cd5c2a81df4cbb73b292b0bf9072d5c51 | Fix test: make sure that Isolation Forest actually make a categorical split | h2o-py/tests/testdir_tree/pyunit_tree_irf.py | h2o-py/tests/testdir_tree/pyunit_tree_irf.py | import h2o
from h2o.tree import H2OTree
from h2o.estimators import H2OIsolationForestEstimator
from tests import pyunit_utils
def check_tree(tree, tree_number, tree_class = None):
assert tree is not None
assert len(tree) > 0
assert tree._tree_number == tree_number
assert tree._tree_class == tree_clas... | import h2o
from h2o.tree import H2OTree
from h2o.estimators import H2OIsolationForestEstimator
from tests import pyunit_utils
def check_tree(tree, tree_number, tree_class = None):
assert tree is not None
assert len(tree) > 0
assert tree._tree_number == tree_number
assert tree._tree_class == tree_clas... | Python | 0.000076 |
0500105b9dc148855b7957963b3949d89a7cc3b4 | Remove routes for PayPal | gratipay/models/exchange_route.py | gratipay/models/exchange_route.py | from __future__ import absolute_import, division, print_function, unicode_literals
import balanced
import braintree
from postgres.orm import Model
class ExchangeRoute(Model):
typname = "exchange_routes"
def __bool__(self):
return self.error != 'invalidated'
__nonzero__ = __bool__
@classme... | from __future__ import absolute_import, division, print_function, unicode_literals
import balanced
import braintree
from postgres.orm import Model
class ExchangeRoute(Model):
typname = "exchange_routes"
def __bool__(self):
return self.error != 'invalidated'
__nonzero__ = __bool__
@classme... | Python | 0.000001 |
7e5477682dfc0d907fe55a489c75179a6e4c832b | fix Swale import script | polling_stations/apps/data_collection/management/commands/import_swale.py | polling_stations/apps/data_collection/management/commands/import_swale.py | from data_collection.management.commands import BaseCsvStationsShpDistrictsImporter
class Command(BaseCsvStationsShpDistrictsImporter):
srid = 27700
council_id = 'E07000113'
districts_name = 'shp/Swale Polling Districts'
stations_name = 'Swale 21 Feb 2017 Polling scheme station numbers.csv'
electio... | from data_collection.management.commands import BaseShpStationsShpDistrictsImporter
class Command(BaseShpStationsShpDistrictsImporter):
srid = 27700
council_id = 'E07000113'
districts_name = 'shp/Swale Polling Districts'
stations_name = 'shp/Swale Polling Stations.shp'
#elections = ['local.kent.201... | Python | 0.000002 |
fc7f51877b6b991ad5a25afb755dd7a35e91dfea | Use get_or_create to avoid duplicate objects | cla_backend/apps/legalaid/migrations/0022_default_contact_for_research_methods.py | cla_backend/apps/legalaid/migrations/0022_default_contact_for_research_methods.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
import uuid
from cla_common.constants import RESEARCH_CONTACT_VIA
def create_default_contact_for_research_methods(apps, schema_editor):
ContactResearchMethods = apps.get_model("legalaid", "ContactResearchMethod")
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
import uuid
from cla_common.constants import RESEARCH_CONTACT_VIA
def create_default_contact_for_research_methods(apps, schema_editor):
ContactResearchMethods = apps.get_model("legalaid", "ContactResearchMethod")
... | Python | 0.000001 |
c8ccee311b5939b116987c1a6192cc2935f9ff3b | test bad query op | test/test_utility_functions.py | test/test_utility_functions.py | import testutils
import json
import psycopg2
class TestSplitQueries(testutils.BedquiltTestCase):
def _assert_examples(self, examples):
for query, match, specials in examples:
result = self._query("""
select * from bq_split_queries('{}'::jsonb)
""".format(json.dumps(que... | import testutils
import json
import psycopg2
class TestSplitQueries(testutils.BedquiltTestCase):
def _assert_examples(self, examples):
for query, match, specials in examples:
result = self._query("""
select * from bq_split_queries('{}'::jsonb)
""".format(json.dumps(que... | Python | 0.998676 |
d6a8e42cb3bd963632500541b5e4e71c700c246e | Fix migration | nodeconductor/cost_tracking/migrations/0006_add_pricelist_backend_ids.py | nodeconductor/cost_tracking/migrations/0006_add_pricelist_backend_ids.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0001_initial'),
('cost_tracking', '0005_expand_item_type_size'),
]
operations = [
migrations.RenameF... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0001_initial'),
('cost_tracking', '0005_expand_item_type_size'),
]
operations = [
migrations.RenameF... | Python | 0 |
3d8f627a25cb83a202878897607e5095270c332d | Convert ruuvi_rx beacon timestamp to UTC time. (#54) | ruuvitag_sensor/ruuvi_rx.py | ruuvitag_sensor/ruuvi_rx.py | from datetime import datetime
from multiprocessing import Manager
from threading import Thread
import time
from concurrent.futures import ProcessPoolExecutor
from rx.subjects import Subject
from ruuvitag_sensor.ruuvi import RuuviTagSensor, RunFlag
def _run_get_data_background(macs, queue, shared_data, bt_device):
... | from datetime import datetime
from multiprocessing import Manager
from threading import Thread
import time
from concurrent.futures import ProcessPoolExecutor
from rx.subjects import Subject
from ruuvitag_sensor.ruuvi import RuuviTagSensor, RunFlag
def _run_get_data_background(macs, queue, shared_data, bt_device):
... | Python | 0.999997 |
0b14f93121f3feaa4433eaf8275f5ad40c646b48 | Update NumberPathShuffled.py | _includes/NumberPathShuffled.py | _includes/NumberPathShuffled.py | from random import shuffle
N = 100
shufflePeriod = 10000000
print(N)
connected = [[]]
for i in range(N):
connected.append([])
for m in range(1,N+1):
# for n in range(1,N+1):
for n in range(N,0,-1):
if ((not m == n) and (m%n == 0 or n%m == 0)):
connected[m].append(n)
def explore(path):
global longestLength, l... | from random import shuffle
N = 100
shufflePeriod = 10000000
print(N)
connected = [[]]
for i in range(N):
connected.append([])
for m in range(1,N+1):
# for n in range(1,N+1):
for n in range(N,0,-1):
if ((not m == n) and (m%n == 0 or n%m == 0)):
connected[m].append(n)
def explore(path):
global longestLength, l... | Python | 0.000001 |
936382b1744c2a9b5f3082abe9a3e0f2fbba58d0 | Return None when an error while reading config occurs | src/config.py | src/config.py | import yaml
SECTION_APP = "app"
SECTION_DEVICE = "device"
KEY_DEFAULT = "default"
def read_value(section, key):
try:
with open(".adbons.yml", 'r') as ymlfile:
config = yaml.safe_load(ymlfile)
return config[section][key]
except:
pass
def write_value(section, key, value):
... | import yaml
SECTION_APP = "app"
SECTION_DEVICE = "device"
KEY_DEFAULT = "default"
def read_value(section, key):
with open(".adbons.yml", 'r') as ymlfile:
config = yaml.safe_load(ymlfile)
try:
return config[section][key]
except:
return ""
def write_value(section, key, value):
... | Python | 0.000002 |
4b5cc8e2c75ae191bc134a7b3c62aa9c67ebe837 | Use six.iteritems instead of iteritems() in psutil_compat | salt/utils/psutil_compat.py | salt/utils/psutil_compat.py | # -*- coding: utf-8 -*-
'''
Version agnostic psutil hack to fully support both old (<2.0) and new (>=2.0)
psutil versions.
The old <1.0 psutil API is dropped in psutil 3.0
Should be removed once support for psutil <2.0 is dropped. (eg RHEL 6)
Built off of http://grodola.blogspot.com/2014/01/psutil-20-porting.html
''... | # -*- coding: utf-8 -*-
'''
Version agnostic psutil hack to fully support both old (<2.0) and new (>=2.0)
psutil versions.
The old <1.0 psutil API is dropped in psutil 3.0
Should be removed once support for psutil <2.0 is dropped. (eg RHEL 6)
Built off of http://grodola.blogspot.com/2014/01/psutil-20-porting.html
''... | Python | 0 |
89a1a37e91ace4af2983e63ef68ff1d22811aa32 | Fix syntax error | hackeriet/cardreaderd/__init__.py | hackeriet/cardreaderd/__init__.py | #!/usr/bin/env python
from hackeriet import mifare
from hackeriet.mqtt import MQTT
from hackeriet.door import users
import os, logging
logging.basicConfig(level=logging.INFO, format='%(asctime)-15s %(message)s')
door_name = os.getenv("DOOR_NAME", 'hackeriet')
door_topic = "hackeriet/door/%s/open" % door_name
door_tim... | #!/usr/bin/env python
from hackeriet import mifare
from hackeriet.mqtt import MQTT
from hackeriet.door import users
import os, logging
logging.basicConfig(level=logging.INFO, format='%(asctime)-15s %(message)s')
door_name = os.getenv("DOOR_NAME", 'hackeriet')
door_topic = "hackeriet/door/%s/open" % door_name
door_tim... | Python | 0.000585 |
857a251c7491b626bf948b58806b917ab20e3d1b | Make concat_example always choose the device on to_gpu | chainer/dataset/convert.py | chainer/dataset/convert.py | import numpy
import six
from chainer import cuda
def concat_examples(batch, device=None, padding=None):
"""Concatenates a list of examples into array(s).
Dataset iterator yields a list of examples. If each example is an array,
this function concatenates them along the newly-inserted first axis (called
... | import numpy
import six
from chainer import cuda
def concat_examples(batch, device=None, padding=None):
"""Concatenates a list of examples into array(s).
Dataset iterator yields a list of examples. If each example is an array,
this function concatenates them along the newly-inserted first axis (called
... | Python | 0.000016 |
b7f790d03511c30bfab87f1db0afb30317a7ff2e | Add retry logic for 50x responses | acapi/resources/acquiadata.py | acapi/resources/acquiadata.py | """ Acquia Cloud API data resource. """
import json
import logging
import requests
import requests_cache
import time
from platform import python_version
from pprint import pformat
from ..version import __version__
LOGGER = logging.getLogger('acapi.resources.acquiadata')
class AcquiaData(object):
"""Acquia Clou... | """ Acquia Cloud API data resource. """
import json
import logging
import requests
import requests_cache
from platform import python_version
from pprint import pformat
from ..version import __version__
LOGGER = logging.getLogger('acapi.resources.acquiadata')
class AcquiaData(object):
"""Acquia Cloud API abstra... | Python | 0.000001 |
15403668edf9b81b9dbb2c3b0075416e422ce55c | bump version to dev55 | symposion/__init__.py | symposion/__init__.py | __version__ = "1.0b1.dev55"
| __version__ = "1.0b1.dev54"
| Python | 0 |
c25cf82668817996b45d824cff59eed3b37b9686 | Allow QVR Pro port to be optional on config (#33901) | homeassistant/components/qvr_pro/__init__.py | homeassistant/components/qvr_pro/__init__.py | """Support for QVR Pro NVR software by QNAP."""
import logging
from pyqvrpro import Client
from pyqvrpro.client import AuthenticationError, InsufficientPermissionsError
from requests.exceptions import ConnectionError as RequestsConnectionError
import voluptuous as vol
from homeassistant.components.camera import DOMA... | """Support for QVR Pro NVR software by QNAP."""
import logging
from pyqvrpro import Client
from pyqvrpro.client import AuthenticationError, InsufficientPermissionsError
from requests.exceptions import ConnectionError as RequestsConnectionError
import voluptuous as vol
from homeassistant.components.camera import DOMA... | Python | 0 |
508dca3ee509b1a7b8a5c79a0b00ade6dc959bb8 | Disable user related views for now | hubology/__init__.py | hubology/__init__.py | from flask import Flask
from flask import request, jsonify
from flask import render_template, current_app
from functools import wraps
import logging
import json
import urllib
import urllib2
import uuid
from flask.ext.login import LoginManager, current_user
# from hubology.models import HubUser
def geocode_location(l... | from flask import Flask
from flask import request, jsonify
from flask import render_template, current_app
from functools import wraps
import logging
import json
import urllib
import urllib2
import uuid
from flask.ext.login import LoginManager, current_user
from hubology.models import HubUser
def geocode_location(loc... | Python | 0 |
ec14293f02de84a12ce602d6a0dfbb3c21203bc4 | fix data types from ENV | channelstream/cli/utils.py | channelstream/cli/utils.py | import argparse
import copy
import logging
import json
import pkg_resources
import jinja2
import os
from channelstream.cli import CONFIGURABLE_PARAMS, SHARED_DEFAULTS
from channelstream.utils import set_config_types
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
def main():
config = copy.deepcopy(... | import argparse
import copy
import logging
import json
import pkg_resources
import jinja2
import os
from channelstream.cli import CONFIGURABLE_PARAMS, SHARED_DEFAULTS
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
def main():
config = copy.deepcopy(SHARED_DEFAULTS)
parser = argparse.ArgumentP... | Python | 0.000002 |
ac1f44247a2c3b943641e076154bacab3299ceec | Remove unused user.(show|hide)PastEvents (jsonrpc) | indico/MaKaC/services/implementation/user.py | indico/MaKaC/services/implementation/user.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... | Python | 0.000001 |
ae780b08e27f8567b028dd3411de8829f4f1bfed | Add an option for the number of dimensions in the external FSI config. | SU2_PY/FSI/io/FSI_config.py | SU2_PY/FSI/io/FSI_config.py | #!/usr/bin/env python
# -*-coding:utf-8 -*
# \file FSI_config.py
# \brief Python class for handling configuration file for FSI computation.
# \author THOMAS David, University of Liege, Belgium. Department of Aerospace and Mechanical Engineering
# \version BETA
# ------------------------------------------... | #!/usr/bin/env python
# -*-coding:utf-8 -*
# \file FSI_config.py
# \brief Python class for handling configuration file for FSI computation.
# \author THOMAS David, University of Liege, Belgium. Department of Aerospace and Mechanical Engineering
# \version BETA
# ------------------------------------------... | Python | 0 |
23fd2953a41d8b087fa5252df2de0baf36244e43 | remove stupid debug string | doc/readthedoc/conf.py | doc/readthedoc/conf.py | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | Python | 0.001727 |
f2181d50fb17be9e1db6129300d720139ca00636 | use absolute imports for compatibility with python 2.5 | scrapy/selector/__init__.py | scrapy/selector/__init__.py | """
XPath selectors
Two backends are currently available: libxml2 and lxml
To select the backend explicitly use the SELECTORS_BACKEND variable in your
project. Otherwise, libxml2 will be tried first. If libxml2 is not available,
lxml will be used.
"""
from scrapy.conf import settings
if settings['SELECTORS_BACKEND'... | """
XPath selectors
Two backends are currently available: libxml2 and lxml
To select the backend explicitly use the SELECTORS_BACKEND variable in your
project. Otherwise, libxml2 will be tried first. If libxml2 is not available,
lxml will be used.
"""
from scrapy.conf import settings
if settings['SELECTORS_BACKEND'... | Python | 0 |
f3da704e0c603574d7ff56b8b4d66ac2c34d015a | Output image fix | Server/src/server/reporters/tiled_brick_position_reporter.py | Server/src/server/reporters/tiled_brick_position_reporter.py | import cv2
from reporter import Reporter
class TiledBrickPositionReporter(Reporter):
def __init__(self, valid_locations, board_recognizer, board_descriptor, tile_brick_detector, camera):
"""
:param valid_locations Locations to search for brick in
:param board_recognizer Board recognizer
... | import cv2
from reporter import Reporter
class TiledBrickPositionReporter(Reporter):
def __init__(self, valid_locations, board_recognizer, board_descriptor, tile_brick_detector, camera):
"""
:param valid_locations Locations to search for brick in
:param board_recognizer Board recognizer
... | Python | 0.999992 |
d2cadcb9be08730f5ccefec5f3e0316265ebf307 | Check request ID value | integration-tests/features/src/json_utils.py | integration-tests/features/src/json_utils.py | """Functions for handling JSON responses returned by various API endpoints."""
import string
from src.attribute_checks import *
def get_value_using_path(obj, path):
"""Get the attribute value using the XMLpath-like path specification.
Return any attribute stored in the nested object and list hierarchy using... | """Functions for handling JSON responses returned by various API endpoints."""
import string
from src.attribute_checks import *
def get_value_using_path(obj, path):
"""Get the attribute value using the XMLpath-like path specification.
Return any attribute stored in the nested object and list hierarchy using... | Python | 0 |
de4e5a34aaa322b2ce83161dd4bce7897953ab73 | add Unix socket support to API collector | intelmq/bots/collectors/api/collector_api.py | intelmq/bots/collectors/api/collector_api.py | # SPDX-FileCopyrightText: 2018 tavi.poldma
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
API Collector bot
"""
from threading import Thread
from typing import Optional
import os
import socket
from intelmq.lib.bot import CollectorBot
from intelmq.lib.exceptions import MissingDependencyErro... | # SPDX-FileCopyrightText: 2018 tavi.poldma
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# -*- coding: utf-8 -*-
"""
API Collector bot
"""
from threading import Thread
from intelmq.lib.bot import CollectorBot
from intelmq.lib.exceptions import MissingDependencyError
try:
import tornado.web
from tornado.iolo... | Python | 0 |
5b9c9ab8f8aef01c53b761714bb6b7072fa01aa4 | clean up commandArgs construction for HadoopJob in Python client | genie-client/src/main/python/pygenie/jobs/hadoop.py | genie-client/src/main/python/pygenie/jobs/hadoop.py | """
genie.jobs.hadoop
This module implements creating Hadoop jobs.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import os
from .core import GenieJob
from .utils import (add_to_repr,
arg_string)
logger = logging.getLogger('com.netflix.g... | """
genie.jobs.hadoop
This module implements creating Hadoop jobs.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import os
from .core import GenieJob
from .utils import (add_to_repr,
arg_string)
logger = logging.getLogger('com.netflix.g... | Python | 0 |
7dc01fa4593e81448db2749d460737cbfa57b63d | Return normalized version | wger/__init__.py | wger/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
:license: GNU GPL, see LICENSE for more details.
"""
VERSION = (1, 9, 0, 'beta', 1)
RELEASE = False
def get_version(version=None, release=None):
"""Derives a PEP386-compliant version number from VERS... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
:license: GNU GPL, see LICENSE for more details.
"""
VERSION = (1, 9, 0, 'beta', 1)
RELEASE = False
def get_version(version=None, release=None):
"""Derives a PEP386-compliant version number from VERS... | Python | 0.000005 |
a7a14619f7662ccb510b6a0031a58647cf0b34e7 | Remove duplicated path for build script | whack/builder.py | whack/builder.py | import os
import subprocess
from . import downloads
from .tempdir import create_temporary_dir
from .common import WHACK_ROOT
from .files import mkdir_p, write_file
from .errors import FileNotFoundError
def build(package_request, package_dir):
with create_temporary_dir() as build_dir:
_build_in_dir(packag... | import os
import subprocess
from . import downloads
from .tempdir import create_temporary_dir
from .common import WHACK_ROOT
from .files import mkdir_p, write_file
from .errors import FileNotFoundError
def build(package_request, package_dir):
with create_temporary_dir() as build_dir:
_build_in_dir(packag... | Python | 0.000001 |
4c017462c41ad080c1f6a98f8be7ef843f379253 | Fix test name | tests/search_backend_sphinx.py | tests/search_backend_sphinx.py | from wolis.test_case import WolisTestCase
from wolis import utils
class SearchBackendSphinxTest(WolisTestCase):
@utils.restrict_database('mysql*', 'postgres')
@utils.restrict_phpbb_version('>=3.1.0')
def test_set_search_backend(self):
self.login('morpheus', 'morpheus')
self.acp_login('morph... | from wolis.test_case import WolisTestCase
from wolis import utils
class SearchBackendMysqlTest(WolisTestCase):
@utils.restrict_database('mysql*', 'postgres')
@utils.restrict_phpbb_version('>=3.1.0')
def test_set_search_backend(self):
self.login('morpheus', 'morpheus')
self.acp_login('morphe... | Python | 0.001029 |
58c6cf44fd73aa4d33d48f1defe2ec65e6f20c50 | Add debugging info. | docs/src/conf.py | docs/src/conf.py | # -*- coding: utf-8 -*-
import os
import shutil
import logging
from datetime import datetime
from subprocess import call, Popen, PIPE
log = logging.getLogger(__name__)
try:
import simplejson as json
except ImportError:
import json
def fake_ignore(cwd, contents):
for entry in contents:
log.info('... | # -*- coding: utf-8 -*-
import os
import shutil
from datetime import datetime
from subprocess import call, Popen, PIPE
try:
import simplejson as json
except ImportError:
import json
def prepare(globs, locs):
git = Popen('which git 2> %s' % os.devnull, shell=True, stdout=PIPE
).stdout.rea... | Python | 0 |
b3ef8f04fa7abd688d7c8669b4f1dfeda2a55c81 | test fixed | tests/test_resource_manager.py | tests/test_resource_manager.py | # from . import ManagerTestBase
# from flask import json
# import datetime
# from app import db
# from stargate.resource_info import resource_info
# from stargate.const import ResourceInfoConst
# from app.models import TestPrimaryKey
# from app import init_app, db
# from functools import partial
# class TestResourceMa... | from . import ManagerTestBase
from flask import json
import datetime
from app import db
from stargate.resource_info import resource_info
from stargate.const import ResourceInfoConst
from app.models import TestPrimaryKey
from app import init_app, db
from functools import partial
class TestResourceManager(ManagerTestBas... | Python | 0 |
e721511a24f98e57e8bfeb45a953d7d42cf78f33 | increase the max length of a link that is to be shortenend to 500 characters | teeny_weeny/models.py | teeny_weeny/models.py | from django.db import models
from django.utils import timezone
class ShortLink(models.Model):
short = models.CharField(max_length=128, unique=True)
link = models.URLField(max_length=500)
hit = models.BigIntegerField(default=0)
date = models.DateTimeField(default=timezone.now)
def __unicode__(self)... | from django.db import models
from django.utils import timezone
class ShortLink(models.Model):
short = models.CharField(max_length=128, unique=True)
link = models.URLField()
hit = models.BigIntegerField(default=0)
date = models.DateTimeField(default=timezone.now)
def __unicode__(self):
retu... | Python | 0.000061 |
517ffe9a3d2ca3608b8044e88d74d16fe5e65db1 | Use new Sphinx Autodoc mock import path (#17634) | docs/exts/docroles.py | docs/exts/docroles.py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | Python | 0 |
027c9d24ecf00a8435ad012fdab9e64b4201ed42 | fix migration conflict, re #7128 | arches/app/models/migrations/7128_resource_instance_filter.py | arches/app/models/migrations/7128_resource_instance_filter.py | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('models', '7442_delete_manifest_images_table'),
]
operations = [
migrations.RunSQL("""
UPDATE d_data_types
SET defaultconfig = defaultconfig || '{"searchString": "", ... | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('models', '7262_report_template_data_fetch_bool'),
]
operations = [
migrations.RunSQL("""
UPDATE d_data_types
SET defaultconfig = defaultconfig || '{"searchString": "... | Python | 0 |
e987a010f2242735ad60008774d25c00b7f89f76 | Tweak CI report | CI/CITests.py | CI/CITests.py | import os
from OMPython import OMCSessionZMQ
class CITests():
'''
Python class used to run CI tests
'''
def __init__(self, rootPath):
'''
Constructor starts omc and loads MSL
'''
self.rootPath = rootPath
self.omc = OMCSessionZMQ()
os.chdir(self.rootPath)
... | import os
from OMPython import OMCSessionZMQ
class CITests():
'''
Python class used to run CI tests
'''
def __init__(self, rootPath):
'''
Constructor starts omc and loads MSL
'''
self.rootPath = rootPath
self.omc = OMCSessionZMQ()
os.chdir(self.rootPath)
... | Python | 0 |
31a607f13536fcaefa8decffe1769d1dc66e78e4 | Use empty dict for default package description | whack/sources.py | whack/sources.py | import os
import json
import shutil
import tempfile
import uuid
import blah
from .hashes import Hasher
from .files import mkdir_p, copy_dir
class PackageSourceNotFound(Exception):
def __init__(self, package_name):
message = "Could not find source for package: {0}".format(package_name)
Exception.... | import os
import json
import shutil
import tempfile
import uuid
import blah
from .hashes import Hasher
from .files import mkdir_p, copy_dir
class PackageSourceNotFound(Exception):
def __init__(self, package_name):
message = "Could not find source for package: {0}".format(package_name)
Exception.... | Python | 0 |
7725821156795b613340bd8098583fdbb189a6d3 | fix minor bug and update response msg | wildlife/rest.py | wildlife/rest.py | from wildlife import WildApp
import os
from flask import jsonify, make_response
from wildlife import kz_exceptions
import logging
import json
import exceptions
import functools
# change to current directory
os.chdir(os.path.dirname(os.path.realpath(__file__)))
conf_path = "./config/wildlife.yml"
app = WildApp("wildl... | from wildlife import WildApp
import os
from flask import jsonify, make_response
from wildlife import kz_exceptions
import logging
import json
import exceptions
import functools
# change to current directory
os.chdir(os.path.dirname(os.path.realpath(__file__)))
conf_path = "./config/wildlife.yml"
app = WildApp("wildl... | Python | 0 |
33c51e6a0612aece239bf01236f110ef9fb40c86 | Add some uncovered code | wordcount_lib.py | wordcount_lib.py | def consume(filename):
chars = 0
words = 0
lines = 0
with open(filename, 'rt') as fp:
for line in fp:
lines += 1
words += len(line.strip().split())
chars += len(line)
return chars, words, lines
def daaaangerous(param=0):
print("I'm the most dangerou... | def consume(filename):
chars = 0
words = 0
lines = 0
with open(filename, 'rt') as fp:
for line in fp:
lines += 1
words += len(line.strip().split())
chars += len(line)
return chars, words, lines
| Python | 0.000002 |
610446ee84b02372bdd98e4530e9be9e6898c3ec | Fix #3 issue. | textmagic/rest/models/chats.py | textmagic/rest/models/chats.py | from . import Model, CollectionModel
class ChatMessage(Model):
"""
A Chat Message object model
.. attribute:: id
.. attribute:: direction
.. attribute:: sender
.. attribute:: messageTime
.. attribute:: text
.. attribute:: receiver
.. attribute:: deleted
.. attribute:: u... | from . import Model, CollectionModel
class ChatMessage(Model):
"""
A Chat Message object model
.. attribute:: id
.. attribute:: direction
.. attribute:: sender
.. attribute:: messageTime
.. attribute:: text
.. attribute:: receiver
.. attribute:: deleted
.. attribute:: u... | Python | 0 |
05cb079fd4e6b7a9bfd32c1470c9c638af5b7bc9 | Add comments clarifying implementation choices | importlib_metadata/_py39compat.py | importlib_metadata/_py39compat.py | """
Compatibility layer with Python 3.8/3.9
"""
from typing import TYPE_CHECKING, Any, Optional, Tuple
if TYPE_CHECKING: # -> prevent circular imports on runtime.
from . import Distribution, EntryPoint
else:
Distribution = EntryPoint = Any
def normalized_name(dist: Distribution) -> Optional[str]:
"""
... | """
Compatibility layer with Python 3.8/3.9
"""
from typing import TYPE_CHECKING, Any, Optional, Tuple
if TYPE_CHECKING:
from . import Distribution, EntryPoint
else:
Distribution = EntryPoint = Any
def normalized_name(dist: Distribution) -> Optional[str]:
"""
Honor name normalization for distributio... | Python | 0 |
4bd53d96be49c01c04a30d2c064774bac23fc20a | Rewrite entry update in DatabaseStorage without explicit update call | speedinfo/storage/database/storage.py | speedinfo/storage/database/storage.py | # coding: utf-8
from django.db import IntegrityError
from django.db.models import ExpressionWrapper, F, FloatField, IntegerField
from django.forms import model_to_dict
from speedinfo.models import ViewProfiler
from speedinfo.storage.base import AbstractStorage
from speedinfo.storage.database.models import Storage
c... | # coding: utf-8
from django.db import IntegrityError
from django.db.models import ExpressionWrapper, F, FloatField, IntegerField
from django.forms import model_to_dict
from speedinfo.models import ViewProfiler
from speedinfo.storage.base import AbstractStorage
from speedinfo.storage.database.models import Storage
c... | Python | 0 |
5cd0ad7e865794401506dbc9358261b5fa020704 | Move and name region_lookup | saau/sections/age/median.py | saau/sections/age/median.py | import logging
from operator import itemgetter
from matplotlib.cm import get_cmap
import matplotlib as mpl
import cartopy.crs as ccrs
from ...utils.download.abs import get_generic_data, abs_data_to_dataframe
from ..image_provider import ImageProvider
from ...utils.header import render_header_to
DATASETID = 'ABS_CENS... | import logging
from operator import itemgetter
from matplotlib.cm import get_cmap
import matplotlib as mpl
import cartopy.crs as ccrs
from ...utils.download.abs import get_generic_data, abs_data_to_dataframe
from ..image_provider import ImageProvider
from ...utils.header import render_header_to
DATASETID = 'ABS_CENS... | Python | 0.000001 |
953d83119005075b9bc59d040389c209208263d5 | Integrate LLVM at llvm/llvm-project@7354a73945f1 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "7354a73945f1c123d66b01f51374ecbdba18fab3"
LLVM_SHA256 = "73a86e6f9d263a812bfdda5120b8f08467bd8ee39564b75da752854328a72803"
tfrt_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "7f2b016b820487f2fb69b93e784fff5d8297dea0"
LLVM_SHA256 = "348e586173038ab248e76be34d4a3e5667d56429350150a4a8130fba5a318e05"
tfrt_http_archive(
... | Python | 0.000001 |
509a542fd5e3171979fb74aec9226c057d289623 | Integrate LLVM at llvm/llvm-project@04a5ca862bb9 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "04a5ca862bb989acdd2729d0991b4e5a104bf244"
LLVM_SHA256 = "10a0c150c477a36eff25d49f0f50379fddf626a7d87a2b1846fb101173c742c9"
tfrt_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "b3a0bed5fb8766dcf27583ab1f73edc6e7232657"
LLVM_SHA256 = "0ee751d5754af930e05cea8b54b061e819e4254e06f64d211e07f2faf3395adf"
tfrt_http_archive(
... | Python | 0.000001 |
94fbcf6224624810a30a17cc9bc8d4c1f3458954 | Integrate LLVM at llvm/llvm-project@5c7b43aa8298 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "5c7b43aa8298a389b906d72c792941a0ce57782e"
LLVM_SHA256 = "e34534a864e2bedaff6811effb757d2eed3a50c9c1e540515ed1568addf1815d"
tfrt_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "9ba661f91276dd8cc728f9b2e82905b78c0119b4"
LLVM_SHA256 = "f89c033b0e8e6d4e6ff5ce3883aadc82a502b063a830cd685672cec4bea3dfb1"
tfrt_http_archive(
... | Python | 0.000001 |
fda8088ec3330ec5bc6ea7769c79d2fb9f227728 | Fix bug with valid hostnames with dashes. I added underscores even though they aren't valid just for good measure | salmon/apps/monitor/urls.py | salmon/apps/monitor/urls.py | from django.conf.urls import patterns, url
from . import views
urlpatterns = patterns('',
url(r'^$', views.dashboard, name="dashboard"),
url(r'^(?P<name>[-\w\._]*)$', views.history, name="history"),
)
| from django.conf.urls import patterns, url
from . import views
urlpatterns = patterns('',
url(r'^$', views.dashboard, name="dashboard"),
url(r'^(?P<name>[\w\.]*)$', views.history, name="history"),
)
| Python | 0.000003 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.