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 |
|---|---|---|---|---|---|---|---|
f03b47e987ed2259b10e21123ed8bca711b8bf15 | Add -D_REENTRANT to cflags as per Gemfire docs | binding.gyp | binding.gyp | # vim: set ft=javascript
{
# NOTE: 'module_name' and 'module_path' come from the 'binary' property in package.json
# node-pre-gyp handles passing them down to node-gyp when you build from source
"targets": [
{
"target_name": "<(module_name)",
"include_dirs": [ "include" ],
"sources": [ "src/binding.cpp"... | # vim: set ft=javascript
{
# NOTE: 'module_name' and 'module_path' come from the 'binary' property in package.json
# node-pre-gyp handles passing them down to node-gyp when you build from source
"targets": [
{
"target_name": "<(module_name)",
"include_dirs": [ "include" ],
"sources": [ "src/binding.cpp"... | Python | 0 |
726e70910e72f68085ecc7cdcc2d474c2ba99c6a | add source dir to include_dirs | binding.gyp | binding.gyp | {
"variables": {
"source_dir": "src",
},
"targets": [
{
"target_name": "node_mifare",
"dependencies": ["node_modules/libfreefare-pcsc/binding.gyp:freefare_pcsc"],
"conditions": [
['OS=="linux"', {
"defines": [
"USE_LIBNFC",
],
... | {
"targets": [
{
"target_name": "node_mifare",
"dependencies": ["node_modules/libfreefare-pcsc/binding.gyp:freefare_pcsc"],
"conditions": [
['OS=="linux"', {
"defines": [
"USE_LIBNFC",
],
}]
],
"sources": [
"src/mif... | Python | 0.000001 |
7dc9a5518db6a8176f04ee63681d65a9ad6f7974 | fix python 3.2 compat | teamcity/nose_report.py | teamcity/nose_report.py | # coding=utf-8
import os
from teamcity import is_running_under_teamcity
from teamcity.unittestpy import TeamcityTestResult
from teamcity.common import is_string, split_output, limit_output
# from nose.util.ln
def _ln(label):
label_len = len(label) + 2
chunk = (70 - label_len) // 2
out = '%s %s %s' % ('-'... | # coding=utf-8
import os
from teamcity import is_running_under_teamcity
from teamcity.unittestpy import TeamcityTestResult
from teamcity.common import is_string, split_output, limit_output
# from nose.util.ln
def _ln(label):
label_len = len(label) + 2
chunk = (70 - label_len) // 2
out = '%s %s %s' % ('-'... | Python | 0.99899 |
0b7eca03c652b5afefb7eabd48011310b122acbc | Fix #47 contect handling | envelope/templatetags/envelope_tags.py | envelope/templatetags/envelope_tags.py | # -*- coding: utf-8 -*-
"""
Template tags related to the contact form.
"""
from __future__ import unicode_literals
from django import template
register = template.Library()
try:
import honeypot
# Register antispam_fields as an inclusion tag
t = template.Template('{% load honeypot %}{% render_honeypot_f... | # -*- coding: utf-8 -*-
"""
Template tags related to the contact form.
"""
from __future__ import unicode_literals
from django import template
register = template.Library()
try:
import honeypot
# Register antispam_fields as an inclusion tag
t = template.Template('{% load honeypot %}{% render_honeypot_f... | Python | 0 |
444baf986cf90a952f5d2406b5aba60113494349 | Add FloatingIP object implementation | nova/objects/__init__.py | nova/objects/__init__.py | # Copyright 2013 IBM Corp.
#
# 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 agree... | # Copyright 2013 IBM Corp.
#
# 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 agree... | Python | 0.000002 |
7dd346572cdccfdd2d1b0fae04241e252bb39e74 | Add CLI test for invalid format | numba/tests/test_help.py | numba/tests/test_help.py | from __future__ import print_function
import sys
import subprocess
import types as pytypes
import os.path
import numpy as np
from numba.six.moves import builtins
from numba import types
from .support import TestCase, temp_directory
from numba.help.inspector import inspect_function, inspect_module
class TestInspect... | from __future__ import print_function
import sys
import subprocess
import types as pytypes
import os.path
import numpy as np
from numba.six.moves import builtins
from numba import types
from .support import TestCase, temp_directory
from numba.help.inspector import inspect_function, inspect_module
class TestInspect... | Python | 0 |
4f7590ea19036ceb358c323d796be0046f33327e | move config.json to correct location | omtk/core/preferences.py | omtk/core/preferences.py | """
Provide a Preference class to store the user preferences of the local installation.
"""
import os
import inspect
import json
import logging
log = logging.getLogger('omtk')
CONFIG_FILENAME = 'config.json'
def get_path_preferences():
"""
:return: The search path of the configuration file.
"""
curren... | """
Provide a Preference class to store the user preferences of the local installation.
"""
import os
import inspect
import json
import logging
log = logging.getLogger('omtk')
CONFIG_FILENAME = 'config.json'
def get_path_preferences():
"""
:return: The search path of the configuration file.
"""
curren... | Python | 0.000002 |
cae6e403efdef67af23a3b8a6c80082fa9efe4bd | Fix test | bluebottle/files/views.py | bluebottle/files/views.py | import mimetypes
import magic
from django.conf import settings
from django.http import HttpResponse
from rest_framework.exceptions import ValidationError
from rest_framework.parsers import FileUploadParser
from rest_framework.permissions import IsAuthenticated
from rest_framework_json_api.views import AutoPrefetchMixi... | import mimetypes
import magic
from django.conf import settings
from django.core.exceptions import ValidationError
from django.http import HttpResponse
from rest_framework.parsers import FileUploadParser
from rest_framework.permissions import IsAuthenticated
from rest_framework_json_api.views import AutoPrefetchMixin
f... | Python | 0.000004 |
ab4351afae1f1a16206cce6801d114b047babf76 | Update main to use tag and reuse_mesage | bot/main.py | bot/main.py | #!/usr/bin/env python3
import logging
from telegram.ext import Updater, CommandHandler, CallbackQueryHandler, InlineQueryHandler
from game.api.server import start_api_server
from game.chooser import inline_query_game_chooser_handler
from game.launch import callback_query_game_launcher_handler
from tools import confi... | #!/usr/bin/env python3
import logging
from telegram.ext import Updater, CommandHandler, CallbackQueryHandler, InlineQueryHandler
from game.api.server import start_api_server
from game.chooser import inline_query_game_chooser_handler
from game.launch import callback_query_game_launcher_handler
from tools import confi... | Python | 0 |
23a1922afac917b06dbd6772fefc3b8a7c53c5ff | fix linespacing in footnotes (part of #3) | backends.py | backends.py | class LaTeX:
def preamble(self, typeface):
return """
\\documentclass[a4paper,12pt]{{article}}
\\usepackage{{setspace}}
\\usepackage{{fontspec}}
\\usepackage{{dblfnote}}
\\usepackage{{pfnote}}
\\setromanfont{{{typeface}}}
\\linespread{{1.5}}
\\onehalfspacing
\\begin{{document}}
""".format(typeface=type... | class LaTeX:
def preamble(self, typeface):
return """
\\documentclass[a4paper,12pt]{{article}}
\\usepackage{{fontspec}}
\\usepackage{{dblfnote}}
\\usepackage{{pfnote}}
\\setromanfont{{{typeface}}}
\\linespread{{1.5}}
\\spaceskip 0.5em
\\begin{{document}}
""".format(typeface=typeface)
def chapter_v... | Python | 0 |
a24d41a3868cca15b3682590eb033f492a9b8293 | Remove multi-step decoding process before parsing HTML meta. | openid/yadis/discover.py | openid/yadis/discover.py | # -*- test-case-name: openid.test.test_yadis_discover -*-
__all__ = ['discover', 'DiscoveryResult', 'DiscoveryFailure']
import cgi
from io import StringIO
import urllib.error
from openid import fetchers
from openid.yadis import etxrd
from openid.yadis.constants import \
YADIS_HEADER_NAME, YADIS_CONTENT_TYPE, YAD... | # -*- test-case-name: openid.test.test_yadis_discover -*-
__all__ = ['discover', 'DiscoveryResult', 'DiscoveryFailure']
from io import StringIO
import urllib.error
from openid import fetchers
from openid.yadis import etxrd
from openid.yadis.constants import \
YADIS_HEADER_NAME, YADIS_CONTENT_TYPE, YADIS_ACCEPT_H... | Python | 0 |
96d17640a1aef57f35f22620fe45028bf1c0f6fb | Fix error with Django admin urls | openquake/server/urls.py | openquake/server/urls.py | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2014-2018 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2014-2018 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | Python | 0.000072 |
b5416d4e68e273ce7164fc177d99f7c5b29e8ca4 | Handle OSError on sendall, re-connect socket when error occurred. | opentsdb/tsdb_connect.py | opentsdb/tsdb_connect.py | import threading
import logging
import socket
import time
logger = logging.getLogger('opentsdb-py')
class TSDBConnect:
def __init__(self, host: str, port: int, check_tsdb_alive: bool=False):
self.tsdb_host = host
self.tsdb_port = int(port)
if check_tsdb_alive:
self.is_alive(... | import threading
import logging
import socket
import time
logger = logging.getLogger('opentsdb-py')
class TSDBConnect:
def __init__(self, host: str, port: int, check_tsdb_alive: bool=False):
self.tsdb_host = host
self.tsdb_port = int(port)
if check_tsdb_alive:
self.is_alive(... | Python | 0 |
207fbc64fc9001abc62d0e687beefb3e3a25ef73 | fix exception error | orator/exceptions/orm.py | orator/exceptions/orm.py | # -*- coding: utf-8 -*-
class ModelNotFound(RuntimeError):
def __init__(self, model):
self._model = model
self.message = 'No query results found for model [%s]' % self._model.__name__
def __str__(self):
return self.message
class MassAssignmentError(RuntimeError):
pass
class ... | # -*- coding: utf-8 -*-
class ModelNotFound(RuntimeError):
def __init__(self, model):
self._model = model
self.message = 'No query results found for model [%s]' % self._model.__name__
def __str__(self):
return self.message
class MassAssignmentError(RuntimeError):
pass
class ... | Python | 0.000054 |
a26ad106dba7ce2f00a0b9438629abf32a15a061 | Improve reliability of test by clearing cache | orgviz/tests/test_web.py | orgviz/tests/test_web.py | import os
import tempfile
import shutil
import unittest
import textwrap
import json
import datetime
from .. import web
TMP_PREFIX = 'orgviz-test-'
def totimestamp(dt):
zero = datetime.datetime.fromtimestamp(0)
return (dt - zero).total_seconds()
class TestWebEventsData(unittest.TestCase):
@classmethod... | import os
import tempfile
import shutil
import unittest
import textwrap
import json
import datetime
from .. import web
TMP_PREFIX = 'orgviz-test-'
def totimestamp(dt):
zero = datetime.datetime.fromtimestamp(0)
return (dt - zero).total_seconds()
class TestWebEventsData(unittest.TestCase):
@classmethod... | Python | 0.000001 |
6147a5229f67874179f371ded2e835c318a2bd56 | correct prob formulation for secondary user beamforming | examples/secondary_user_beamforming.py | examples/secondary_user_beamforming.py | #!/usr/bin/python
# Secondary user multicast beamforming
# minimize ||w||^2
# subject to |h_i^H w|^2 >= tau
# |g_i^H w|^2 <= eta
# with variable w in complex^n.
# Data vectors h_i and g_i are also in complex^n.
# The script below expands out the complex part and
# works with real numbers only.
import... | #!/usr/bin/python
# Secondary user multicast beamforming
# minimize ||w||^2
# subject to |h_i^H w|^2 >= tau
# |g_i^H w|^2 <= eta
# with variable w in complex^n
import numpy as np
import cvxpy as cvx
import qcqp
n = 10
m = 8
l = 2
tau = 10
eta = 1
np.random.seed(1)
H = np.random.randn(m, n)
G = np.... | Python | 0 |
183e08be99fae2ba521c5fb60b7205d3c3c5b520 | Add grappelli styles to make inlines collapsible | winthrop/books/admin.py | winthrop/books/admin.py | from django.contrib import admin
from winthrop.common.admin import NamedNotableAdmin
from .models import Subject, Language, Publisher, OwningInstitution, \
Book, Catalogue, BookSubject, BookLanguage, CreatorType, Creator, \
PersonBook, PersonBookRelationshipType
class NamedNotableBookCount(NamedNotableAdmin)... | from django.contrib import admin
from winthrop.common.admin import NamedNotableAdmin
from .models import Subject, Language, Publisher, OwningInstitution, \
Book, Catalogue, BookSubject, BookLanguage, CreatorType, Creator, \
PersonBook, PersonBookRelationshipType
class NamedNotableBookCount(NamedNotableAdmin)... | Python | 0 |
f0fab0c0add34e6b74583f524c86a3b42a7c7c54 | remove 'fml' | plugins/games.py | plugins/games.py | """
games.py: Creates a bot providing a few simple games.
"""
import random
from pylinkirc import utils
from pylinkirc.log import log
mydesc = "The \x02Games\x02 plugin provides simple games for IRC."
gameclient = utils.registerService("Games", manipulatable=True, desc=mydesc)
reply = gameclient.reply # TODO find a... | """
games.py: Create a bot that provides game functionality (dice, 8ball, etc).
"""
import random
import urllib.request
import urllib.error
from xml.etree import ElementTree
from pylinkirc import utils
from pylinkirc.log import log
mydesc = "The \x02Games\x02 plugin provides simple games for IRC."
gameclient = utils... | Python | 0 |
4b0d846fc782ad80399adcbeb6bbea725e0b68f5 | Fix find and read up | salt/wheel/file_roots.py | salt/wheel/file_roots.py | '''
Read in files from the file_root and save files to the file root
'''
# Import python libs
import os
# Import salt libs
import salt.utils
def find(path, env='base'):
'''
Return a dict of the files located with the given path and environment
'''
# Return a list of paths + text or bin
ret = []
... | '''
Read in files from the file_root and save files to the file root
'''
# Import python libs
import os
# Import salt libs
import salt.utils
def find(path, env='base'):
'''
Return a dict of the files located with the given path and environment
'''
# Return a list of paths + text or bin
ret = []
... | Python | 0 |
a40c80eea715626616ef280b87de6bbcc7b73b7f | use relative imports | transport_information/model/__init__.py | transport_information/model/__init__.py | # -*- coding: utf-8 -*-
from . import transport_mode
from . import transport_vehicle
| # -*- coding: utf-8 -*-
import transport_mode
import transport_vehicle
| Python | 0.000001 |
08cf82852ab19417f9521af45f2fb296d9e223d6 | Update batch processing example | batch_eg.py | batch_eg.py | """Example of using nbparameterise API to substitute variables in 'batch mode'
"""
from nbparameterise import code
import nbformat
from nbconvert.preprocessors.execute import ExecutePreprocessor
from nbconvert.exporters.notebook import NotebookExporter
from nbconvert.writers import FilesWriter
stock_names = ['YHOO', ... | """Example of using nbparameterise API to substitute variables in 'batch mode'
"""
from nbparameterise import code
from IPython.nbformat import current as nbformat
from IPython.nbconvert.preprocessors.execute import ExecutePreprocessor
from IPython.nbconvert.exporters.notebook import NotebookExporter
from IPython.nbco... | Python | 0 |
97939c334543d9ca4d717a7bc75ae30e848c8a09 | Replace native.git_repository with skylark rule | bazlets.bzl | bazlets.bzl | load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
NAME = "com_googlesource_gerrit_bazlets"
def load_bazlets(
commit,
local_path = None):
if not local_path:
git_repository(
name = NAME,
remote = "https://gerrit.googlesource.com/bazlets",
... | NAME = "com_googlesource_gerrit_bazlets"
def load_bazlets(
commit,
local_path = None):
if not local_path:
native.git_repository(
name = NAME,
remote = "https://gerrit.googlesource.com/bazlets",
commit = commit,
)
else:
native.local_rep... | Python | 0.000381 |
36cc738308b8ae4435d6becac38fa3c4e96dc491 | Remove useless code | patchboard/patchboard.py | patchboard/patchboard.py | # patchboard.py
#
# Copyright 2014 BitVault.
from __future__ import print_function
import json
from resource import Resource
from api import API
from schema_manager import SchemaManager
from client import Client
from util import to_camel_case
def discover(url):
"""
Retrieve the API definition from the gi... | # patchboard.py
#
# Copyright 2014 BitVault.
from __future__ import print_function
import json
from api import API
from schema_manager import SchemaManager
from client import Client
from util import to_camel_case
def discover(url):
"""
Retrieve the API definition from the given URL and construct
a Pa... | Python | 0.001027 |
382a715ec78d9bcc53e949e9536bdb1077d3ed98 | Update docstring | pathvalidate/__init__.py | pathvalidate/__init__.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
import re
import dataproperty
__INVALID_PATH_CHARS = '\:*?"<>|'
def validate_filename(filename):
"""
:param str filename: Filename to validate.
:raises ValueError:
If the ``filename`` is empty or includes invali... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>
"""
import re
import dataproperty
__INVALID_PATH_CHARS = '\:*?"<>|'
def validate_filename(filename):
"""
:param str filename: Filename to validate.
:raises ValueError:
If ``filename`` is empty or include invalid cha... | Python | 0.000001 |
8065d5677e63d17a231e362115738bc278f00a77 | Add new tests cases for signature and orders parsing. | payu/tests/test_forms.py | payu/tests/test_forms.py | import pytest
from payu.forms import PayULiveUpdateForm, OrdersField
@pytest.mark.parametrize("payload,signature", [
({
'ORDER_REF': 112457,
'ORDER_DATE': '2012-05-01 15:51:35',
'ORDER': [
{
'PNAME': 'MacBook Air 13 inch',
'PCODE': 'MBA13',
... | import pytest
from payu.forms import PayULiveUpdateForm, OrdersField
@pytest.mark.parametrize("payload,signature", [
({
'ORDER_REF': 112457,
'ORDER_DATE': '2012-05-01 15:51:35',
'ORDER': [
{
'PNAME': 'MacBook Air 13 inch',
'PCODE': 'MBA13',
... | Python | 0 |
58d701a99eae46464c280478a7949f964e05f3d2 | Load testing database URI from environmental variable if set | portal/config.py | portal/config.py | """Configuration"""
import os
from flask.ext.script import Server
from flask import Config
class BaseConfig(object):
"""Base configuration - override in subclasses"""
ANONYMOUS_USER_ACCOUNT = True
CELERY_BROKER_URL = 'redis://localhost:6379/0'
CELERY_IMPORTS = ('portal.tasks', )
CELERY_RESULT_BACK... | """Configuration"""
import os
from flask.ext.script import Server
from flask import Config
class BaseConfig(object):
"""Base configuration - override in subclasses"""
ANONYMOUS_USER_ACCOUNT = True
CELERY_BROKER_URL = 'redis://localhost:6379/0'
CELERY_IMPORTS = ('portal.tasks', )
CELERY_RESULT_BACK... | Python | 0 |
798639f4d22bec341667a4067db7a18095d36beb | Add missing doc string values. | flask_jsondash/data_utils/wordcloud.py | flask_jsondash/data_utils/wordcloud.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
flask_jsondash.data_utils.wordcloud
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities for working with wordcloud formatted data.
:copyright: (c) 2016 by Chris Tabor.
:license: MIT, see LICENSE for more details.
"""
from collections import Counter
# Py2/3 compat.
try:
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
flask_jsondash.data_utils.wordcloud
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utilities for working with wordcloud formatted data.
:copyright: (c) 2016 by Chris Tabor.
:license: MIT, see LICENSE for more details.
"""
from collections import Counter
# Py2/3 compat.
try:
... | Python | 0.000001 |
253361e56ad2b1e331691f0bf3c9010c22c0c9aa | Fix tests | test/test_blacklists.py | test/test_blacklists.py | #!/usr/bin/env python3
from glob import glob
from helpers import only_blacklists_changed
def test_blacklist_integrity():
for bl_file in glob('bad_*.txt') + glob('blacklisted_*.txt'):
with open(bl_file, 'r') as lines:
seen = dict()
for lineno, line in enumerate(lines, 1):
... | #!/usr/bin/env python3
from glob import glob
from helpers import only_blacklists_changed
def test_blacklist_integrity():
for bl_file in glob('bad_*.txt') + glob('blacklisted_*.txt'):
with open(bl_file, 'r') as lines:
seen = dict()
for lineno, line in enumerate(lines, 1):
... | Python | 0.000003 |
e13cfe7a7e215f43e8210fb6d116ccafe80c8756 | fix names of functions | gary/observation/tests/test_rrlyrae.py | gary/observation/tests/test_rrlyrae.py | # coding: utf-8
"""
Test the RR Lyrae helper functions.
"""
from __future__ import absolute_import, unicode_literals, division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import os, sys
# Third-party
import astropy.units as u
import numpy as np
import pytest
from ..core imp... | # coding: utf-8
"""
Test the RR Lyrae helper functions.
"""
from __future__ import absolute_import, unicode_literals, division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import os, sys
# Third-party
import astropy.units as u
import numpy as np
import pytest
from ..core imp... | Python | 0.999104 |
ff2cfb51b1fa30d0103bc782843f69fea08e0d51 | Fix formatting for table declaration | girder/utility/assetstore_utilities.py | girder/utility/assetstore_utilities.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2013 Kitware Inc.
#
# Licensed under the Apache License, Version 2.0 ( the "License" );
# you may not use this file except in compliance with the License.
# You may obtain a cop... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2013 Kitware Inc.
#
# Licensed under the Apache License, Version 2.0 ( the "License" );
# you may not use this file except in compliance with the License.
# You may obtain a cop... | Python | 0.000042 |
38e224c282c62ad358c753eb707cf71ad1f00aff | fix os x gyp settings | binding.gyp | binding.gyp | {
"targets": [
{
"target_name": "detection",
"sources": [
"src/detection.cpp",
"src/detection.h",
"src/deviceList.cpp"
],
"include_dirs" : [
"<!(node -e \"require('nan')\")"
],
'conditions': [
['OS=="win"',
{
'source... | {
"targets": [
{
"target_name": "detection",
"sources": [
"src/detection.cpp",
"src/detection.h",
"src/deviceList.cpp"
],
"include_dirs" : [
"<!(node -e \"require('nan')\")"
],
'conditions': [
['OS=="win"',
{
'source... | Python | 0 |
de0180ccccdd3e2b83c6a7188fd2688c64c70580 | add rpath linker option in binding.gyp when --sqlite option is used with a custom sqlite | binding.gyp | binding.gyp | {
'includes': [ 'deps/common-sqlite.gypi' ],
'variables': {
'sqlite%':'internal',
},
'targets': [
{
'target_name': 'node_sqlite3',
'conditions': [
['sqlite != "internal"', {
'libraries': [
'-L<@(sqlite)/lib',
'-lsqlite3'
],
... | {
'includes': [ 'deps/common-sqlite.gypi' ],
'variables': {
'sqlite%':'internal',
},
'targets': [
{
'target_name': 'node_sqlite3',
'conditions': [
['sqlite != "internal"', {
'libraries': [
'-L<@(sqlite)/lib',
'-lsqlite3'
],
... | Python | 0 |
c908f4f9b602dcfea81847144cfd4e43fe308798 | Bump OSX minimum to 10.11 | binding.gyp | binding.gyp | {
'variables': {
'libsass_ext%': '',
},
'targets': [
{
'target_name': 'binding',
'win_delay_load_hook': 'true',
'sources': [
'src/binding.cpp',
'src/create_string.cpp',
'src/custom_function_bridge.cpp',
'src/custom_importer_bridge.cpp',
'src/sass... | {
'variables': {
'libsass_ext%': '',
},
'targets': [
{
'target_name': 'binding',
'win_delay_load_hook': 'true',
'sources': [
'src/binding.cpp',
'src/create_string.cpp',
'src/custom_function_bridge.cpp',
'src/custom_importer_bridge.cpp',
'src/sass... | Python | 0.000015 |
3fe8dd01906fe2d8e3e52b537acd34f65073ca01 | remove the cflags | binding.gyp | binding.gyp | {
"targets": [
{
"target_name": "objc",
"sources": [
"src/binding/objc.cc",
"src/binding/Proxy.cc",
"src/binding/utils.cc",
"src/binding/Invocation.cc",
"src/binding/constants.cpp"
],
"include_dirs": [
"<!(node -e \"require('nan')\")",
... | {
"targets": [
{
"target_name": "objc",
"sources": [
"src/binding/objc.cc",
"src/binding/Proxy.cc",
"src/binding/utils.cc",
"src/binding/Invocation.cc",
"src/binding/constants.cpp"
],
"include_dirs": [
"<!(node -e \"require('nan')\")",
... | Python | 0.998747 |
0a90376144ee5568e6e140cbf657d7e85070f1f1 | remove the matplotlib agg setting | tests/base/test_view.py | tests/base/test_view.py | from __future__ import print_function
import matplotlib
import unittest
import numpy as np
import matplotlib.pyplot as plt
import discretize
from discretize import Tests, utils
import warnings
import pytest
np.random.seed(16)
TOL = 1e-1
class Cyl3DView(unittest.TestCase):
def setUp(self):
self.mesh =... | from __future__ import print_function
import matplotlib
matplotlib.use('Agg')
import unittest
import numpy as np
import matplotlib.pyplot as plt
import discretize
from discretize import Tests, utils
import warnings
import pytest
np.random.seed(16)
TOL = 1e-1
class Cyl3DView(unittest.TestCase):
def setUp(self... | Python | 0.000001 |
a114325be4f81cd34438f96fbc134a7881d5fe7a | Add link to get_input_var_names | bmi/vars.py | bmi/vars.py | #! /usr/bin/env python
class BmiVars(object):
"""Defines an interface for converting a standalone model into an
integrated modeling framework component.
"""
def get_var_type(self, long_var_name):
"""Returns the type of the given variable.
Parameters
----------
long_va... | #! /usr/bin/env python
class BmiVars(object):
"""Defines an interface for converting a standalone model into an
integrated modeling framework component.
"""
def get_var_type(self, long_var_name):
"""Returns the type of the given variable.
Parameters
----------
long_va... | Python | 0.000001 |
390059007169b964649b3ec8af84503b38e41e97 | refactor date formatting | postweb/utils.py | postweb/utils.py | import bleach
from django.conf import settings
import dateutil.parser
import markdown
markdown = markdown.Markdown()
# Tags suitable for rendering markdown
# From https://github.com/yourcelf/bleach-allowlist/blob/main/bleach_allowlist/bleach_allowlist.py
MARKDOWN_TAGS = [
"h1",
"h2",
"h3",
"h4",
... | import bleach
from django.conf import settings
import dateutil.parser
import markdown
markdown = markdown.Markdown()
# Tags suitable for rendering markdown
# From https://github.com/yourcelf/bleach-allowlist/blob/main/bleach_allowlist/bleach_allowlist.py
MARKDOWN_TAGS = [
"h1",
"h2",
"h3",
"h4",
... | Python | 0.000001 |
d0ac7153cd9a88c5a9c6edef4f6d415b4d88143b | make admin classes overridable | pinax/referrals/admin.py | pinax/referrals/admin.py | from django.contrib import admin
from .models import Referral, ReferralResponse
@admin.register(Referral)
class ReferralAdmin(admin.ModelAdmin):
list_display = [
"user",
"code",
"label",
"redirect_to",
"target_content_type",
"target_object_id"
]
readonly_fi... | from django.contrib import admin
from .models import Referral, ReferralResponse
admin.site.register(
Referral,
list_display=[
"user",
"code",
"label",
"redirect_to",
"target_content_type",
"target_object_id"
],
readonly_fields=["code", "created_at"],
... | Python | 0.000001 |
51cf3706504adb6b1772b491c6d9d612a64e49ab | fix check mention | yubari/bots/qq_watch.py | yubari/bots/qq_watch.py | #!/usr/bin/env python
# coding: utf-8
import time
import logging
from yubari.config import QQ_GROUP, MENTION_NAME, QQ_ME
from yubari.lib.qq import qqbot
logger = logging.getLogger(__name__)
def check_mention_self(content):
for word in MENTION_NAME:
if word in content:
return True
retur... | #!/usr/bin/env python
# coding: utf-8
import time
import logging
from yubari.config import QQ_GROUP, MENTION_NAME
from yubari.lib.qq import qqbot
logger = logging.getLogger(__name__)
def run():
continue_count = 0
last_msg = ""
last_call = 0
for msg in qqbot.poll():
logger.info(msg)
... | Python | 0 |
eda12e10ae41dce8a34903709afb7a0c73fcd3e2 | Add dict merging and fix wrapped | src/server/blueprints/rest/restutil.py | src/server/blueprints/rest/restutil.py | """
Utilities specific to REST blueprints.
"""
from enum import Enum
from collections.abc import MutableMapping
from util import get_current_app
from flask import Response
from functools import wraps
import re
class ClientType(str, Enum):
BROWSER = "browser" # most useful in debug
CURL = "cURL" # also usefu... | """
Utilities specific to REST blueprints.
"""
from enum import Enum
from util import get_current_app
from functools import wraps
import re
class ClientType(str, Enum):
BROWSER = "browser" # most useful in debug
CURL = "cURL" # also useful in debug
OTHER = "other" # usually production apps
browsers =... | Python | 0 |
13e22652473eac3d2b8e700f674cfcd03a5f2155 | Remove the library dependency for the cluster command. | haascli/cluster.py | haascli/cluster.py | import click
import boto3
import executor
from executor.ssh.client import RemoteCommand
class ClusterTopology(object):
@staticmethod
def parse(stack_name):
client = boto3.client('cloudformation')
client_autoscaling = boto3.client('autoscaling')
client_ec2 = boto3.client('ec2')
... | import click
import boto3
import executor
from executor.ssh.client import RemoteCommand
class ClusterTopology(object):
@staticmethod
def parse(stack_name):
client = boto3.client('cloudformation')
client_autoscaling = boto3.client('autoscaling')
client_ec2 = boto3.client('ec2')
... | Python | 0 |
77921afc66e68a65d5cd8992a49550896b491082 | Load random state test is fixed. | tests/core/test_base.py | tests/core/test_base.py | import unittest
import os
import numpy as np
from examples.game_of_life import GameOfLife, GOLExperiment
class TestCellularAutomaton(unittest.TestCase):
num_steps = 1000
num_runs = 3
def test_single_ca(self):
for i in range(self.num_runs):
ca = GameOfLife(GOLExperiment)
... | import unittest
import os
import numpy as np
from examples.game_of_life import GameOfLife, GOLExperiment
class TestCellularAutomaton(unittest.TestCase):
num_steps = 1000
num_runs = 3
def test_single_ca(self):
for i in range(self.num_runs):
ca = GameOfLife(GOLExperiment)
... | Python | 0 |
74ad5c935abd69b7408a0c1ba2d7cc4ed57e3bd9 | test solely running linkcheck as it requires the html to be built | tests/docs/test_docs.py | tests/docs/test_docs.py | import subprocess
import unittest
import os
import platform
class Doc_Test(unittest.TestCase):
@property
def path_to_docs(self):
dirname, file_name = os.path.split(os.path.abspath(__file__))
return dirname.split(os.path.sep)[:-2] + ["docs"]
# def test_html(self):
# wd = os.getcwd(... | import subprocess
import unittest
import os
import platform
class Doc_Test(unittest.TestCase):
@property
def path_to_docs(self):
dirname, file_name = os.path.split(os.path.abspath(__file__))
return dirname.split(os.path.sep)[:-2] + ["docs"]
def test_html(self):
wd = os.getcwd()
... | Python | 0 |
a80ac141b7341e867f1395858e0bdccaa9a83b37 | Fix for Py2 test. | tests/filesys_test_7.py | tests/filesys_test_7.py | # -*- coding: utf-8 -*-
##==============================================================#
## SECTION: Imports #
##==============================================================#
from testlib import *
from auxly.filesys import File
##========================================... | # -*- coding: utf-8 -*-
##==============================================================#
## SECTION: Imports #
##==============================================================#
from testlib import *
from auxly.filesys import File
##========================================... | Python | 0 |
e883d625bf78c52d4f1206f13ef64e53df23c3dd | Add a tool for getting the current schema. Not sure if this could break things. Concurrency might be a bitch. | multi_schema/schema.py | multi_schema/schema.py | from django.db import models
from .models import Schema
def get_schema():
cursor = models.connection.cursor()
cursor.execute('SHOW search_path')
search_path = cursor.fetchone()[0]
return Schema.objects.get(schema=search_path.split(',')[0])
| Python | 0.000001 | |
6306288b7b65481a7e0706d3515d673b2344d2f0 | Bump version | hbmqtt/__init__.py | hbmqtt/__init__.py | # Copyright (c) 2015 Nicolas JOUANIN
#
# See the file license.txt for copying permission.
VERSION = (0, 3, 0, 'alpha', 0)
| # Copyright (c) 2015 Nicolas JOUANIN
#
# See the file license.txt for copying permission.
VERSION = (0, 2, 0, 'final', 0)
| Python | 0 |
eebafcf8a7a34108fbae12645e469979496403ab | Add documentation and clean up daemon code. | myDevices/os/daemon.py | myDevices/os/daemon.py | """
This module provides a class for restarting the agent if errors occur and exiting on critical failures.
"""
from sys import exit
from datetime import datetime
from myDevices.utils.logger import exception, info, warn, error, debug
from myDevices.os.services import ServiceManager
#defining reset timeout in seconds
R... | #!/usr/bin/env python
from sys import exit
from datetime import datetime
from os.path import getmtime
from myDevices.utils.logger import exception, info, warn, error, debug
from myDevices.os.services import ServiceManager
#defining reset timeout in seconds
RESET_TIMEOUT=30
FAILURE_COUNT=1000
PYTHON_BIN='/usr/bin/pytho... | Python | 0 |
6076b6a7824072b97936aaa3da3ba1acf2bc87d6 | Bump version | mythril/__version__.py | mythril/__version__.py | """This file contains the current Mythril version.
This file is suitable for sourcing inside POSIX shell, e.g. bash as well
as for importing into Python.
"""
__version__ = "v0.21.7"
| """This file contains the current Mythril version.
This file is suitable for sourcing inside POSIX shell, e.g. bash as well
as for importing into Python.
"""
__version__ = "v0.21.6"
| Python | 0 |
4d072bf3e1042bd7996f54c9a173bf39ed67c283 | Remove unused imports | promgen/forms.py | promgen/forms.py | import datetime
from django import forms
from promgen import models, plugins
class ImportConfigForm(forms.Form):
config = forms.CharField(
widget=forms.Textarea(attrs={'rows': 5, 'class': 'form-control'}),
required=False)
url = forms.CharField(
widget=forms.TextInput(attrs={'class': ... | import datetime
from django import forms
from django.core.exceptions import ValidationError
from promgen import models, plugins, prometheus
class ImportConfigForm(forms.Form):
config = forms.CharField(
widget=forms.Textarea(attrs={'rows': 5, 'class': 'form-control'}),
required=False)
url = f... | Python | 0.000001 |
e906e108ab5118ec1c8856a54b8ebe1fd69484ac | Add shebang to and update permissions of servefiles.py | servefiles/servefiles.py | servefiles/servefiles.py | #!/bin/python
import os
import socket
import struct
import sys
import threading
import time
import urllib
try:
from SimpleHTTPServer import SimpleHTTPRequestHandler
from SocketServer import TCPServer
from urlparse import urljoin
from urllib import pathname2url, quote
except ImportError:
from http.server import Si... | import os
import socket
import struct
import sys
import threading
import time
import urllib
try:
from SimpleHTTPServer import SimpleHTTPRequestHandler
from SocketServer import TCPServer
from urlparse import urljoin
from urllib import pathname2url, quote
except ImportError:
from http.server import SimpleHTTPReques... | Python | 0 |
d45e2237cccf9a29db93fd485de34b9cc4dc3cfe | Update gpio.py | 02traffic_python/gpio.py | 02traffic_python/gpio.py | ##########################################################
# * Python GPIO Functions for Traffic Signal Simulation
# * using Baglebone Black running Debian 7 Linux distribution
##########################################################
import sys
import os
SYSFS_GPIO_DIR = "/sys/class/gpio"
def gpioUnexport (gpio):... | ##########################################################
# * Python GPIO Functions for Traffic Signal Simulation
# * using Baglebone Black running Debian 7 Linux distribution
##########################################################
# * Developed by MicroEmbedded Technologies
########################################... | Python | 0.000001 |
1aa45fa857a6af15a7e29eab08a63ac594738c6e | clean up | html_cluster/commands/download_html.py | html_cluster/commands/download_html.py | import os
import json
import base64
import click
import requests
import htmlmin
from html_cluster.settings import (
HTML_CLUSTER_DATA_DIRECTORY, SPLASH_URL, USER_AGENT, SPLASH_TIMEOUT
)
from html_cluster.utils.common import file_name
from html_cluster.utils.html import is_html_page_from_string
from html_cluster.u... | import os
import json
import base64
import click
import requests
import htmlmin
from html_cluster.settings import (
HTML_CLUSTER_DATA_DIRECTORY, SPLASH_URL, USER_AGENT, SPLASH_TIMEOUT
)
from html_cluster.utils.common import file_name
from html_cluster.utils.html import is_html_page_from_string
from html_cluster.u... | Python | 0.000001 |
22ab27f9966c19c1f3496e445e460f9ac6400de7 | Fix doubling order admin when custom order model used | shop/admin/orderadmin.py | shop/admin/orderadmin.py | #-*- coding: utf-8 -*-
from django.contrib import admin
from django.contrib.admin.options import ModelAdmin
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from shop.models.ordermodel import (Order, OrderItem,
OrderExtraInfo, ExtraOrderPriceField, OrderPayment)
class ... | #-*- coding: utf-8 -*-
from django.contrib import admin
from django.contrib.admin.options import ModelAdmin
from django.utils.translation import ugettext_lazy as _
from shop.models.ordermodel import (Order, OrderItem,
OrderExtraInfo, ExtraOrderPriceField, OrderPayment)
class OrderExtraInfoInline(admin.Tabula... | Python | 0 |
1b3e5d52911f3c623b8f320adadea2d8f3ee226a | Implement web service based Pathway Commons client | indra/biopax/pathway_commons_client.py | indra/biopax/pathway_commons_client.py | import urllib, urllib2
from indra.java_vm import autoclass, JavaException
pc2_url = 'http://www.pathwaycommons.org/pc2/'
def send_request(kind, source, target=None):
kind_str = kind.lower()
if kind not in ['neighborhood', 'pathsbetween', 'pathsfromto']:
print 'Invalid query type %s' % kind_str
... | from indra.java_vm import autoclass, JavaException
def run_pc_query(query_type, source_genes, target_genes=None, neighbor_limit=1):
cpath_client = autoclass('cpath.client.CPathClient').\
newInstance('http://www.pathwaycommons.org/pc2/')
query = cpath_client.createGraphQuery()
query.kind(query_type)... | Python | 0 |
a7062bb3d87954478f4be23a8ac2cc3d125804e7 | resolve #13: consecutive blank row are preserved | tests/test_bug_fixes.py | tests/test_bug_fixes.py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import os
from pyexcel_ods import get_data, save_data
from nose.tools import raises, eq_
def test_bug_fix_for_issue_1():
data = get_data(os.path.join("tests", "fixtures", "repeated.ods"))
assert data["Sheet1"] == [['repeated', 'repeated', 'repeated', 'repeated']]
... | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import os
from pyexcel_ods import get_data, save_data
from nose.tools import raises
def test_bug_fix_for_issue_1():
data = get_data(os.path.join("tests", "fixtures", "repeated.ods"))
assert data["Sheet1"] == [['repeated', 'repeated', 'repeated', 'repeated']]
def t... | Python | 0.005453 |
2fb41f6e9e6ba69181707b0699a4c6735737c7fa | Add CLI test for imxim create and extract boot image | tests/test_cli_imxim.py | tests/test_cli_imxim.py | # Copyright (c) 2019 Martin Olejar
#
# SPDX-License-Identifier: BSD-3-Clause
# The BSD-3-Clause license for this file can be found in the LICENSE file included with this distribution
# or at https://spdx.org/licenses/BSD-3-Clause.html#licenseText
import os
import pytest
import shutil
# Used Directories
DATA_DIR = os.... | # Copyright (c) 2019 Martin Olejar
#
# SPDX-License-Identifier: BSD-3-Clause
# The BSD-3-Clause license for this file can be found in the LICENSE file included with this distribution
# or at https://spdx.org/licenses/BSD-3-Clause.html#licenseText
import os
import pytest
import shutil
# Used Directories
DATA_DIR = os.... | Python | 0 |
cc32b41359c044556c76007dbb1772e3564acfc6 | Add more tests | tests/test_endpoints.py | tests/test_endpoints.py | from tests import SuperTestCase
from flask import jsonify
from manage import app
import json
class TestEndPoints(SuperTestCase):
""" Endpoints being tested:
/api/v1/bucketlists/
/api/v1/bucketlists/<bucket_list_id>
/api/v1/bucketlists/<bucketlist_id>/items/
/api/v1/bucketlists/<buck... | from tests import SuperTestCase
from flask import jsonify
from manage import app
import json
class TestEndPoints(SuperTestCase):
""" Endpoints being tested:
/api/v1/bucketlists/
/api/v1/bucketlists/<bucket_list_id>
/api/v1/bucketlists/<bucketlist_id>/items/
/api/v1/bucketlists/<buck... | Python | 0 |
12d244ce9bd15d95817d4c4d774a1ab1758db894 | fix broken build | tests/test_extension.py | tests/test_extension.py | from nose.tools import raises
class TestExt:
def test_test(self):
"""test test"""
from pyexcel.ext import test
from pyexcel.io import READERS
from pyexcel.io import WRITERS
assert READERS['test'] == 'test'
assert WRITERS['test'] == 'test'
@raises(ImportErr... | from nose.tools import raises
class TestExt:
def test_test(self):
"""test test"""
from pyexcel.ext import test
from pyexcel.io import READERS
from pyexcel.io import WRITERS
assert READERS['test'] == 'test'
assert WRITERS['test'] == 'test'
@raises(ImportErr... | Python | 0.000001 |
47b32b1b2d5fe81dcf86c78d61690c1f0572b8ea | Add failing name and docstring test for things exported | tests/test_interface.py | tests/test_interface.py | import pkgutil
import pytest
import funcy
from funcy.cross import PY2, PY3
from funcy.py2 import cat
from funcy import py2, py3
py = py2 if PY2 else py3
# Introspect all modules
exclude = ('cross', '_inspect', 'py2', 'py3', 'simple_funcs', 'funcmakers')
module_names = list(name for _, name, _ in pkgutil.iter_module... | import pkgutil
import pytest
import funcy
from funcy.cross import PY2, PY3
from funcy.py2 import cat
from funcy import py2, py3
py = py2 if PY2 else py3
# Introspect all modules
exclude = ('cross', '_inspect', 'py2', 'py3', 'simple_funcs', 'funcmakers')
module_names = list(name for _, name, _ in pkgutil.iter_module... | Python | 0 |
5baa216b615b39fe5d9bf5bb71e9ae8048ef4dc0 | delete samples on metric delete | holodeck/models.py | holodeck/models.py | import uuid
from django.contrib.auth.models import User
from django.db import models
from django.db.models.signals import post_delete
from django.dispatch import receiver
from holodeck.utils import get_widget_type_choices, load_class_by_string, \
metric_to_shard_mapper, sample_to_shard_mapper
class Dashboard(mod... | import uuid
from django.db import models
from holodeck.utils import get_widget_type_choices, load_class_by_string, \
metric_to_shard_mapper, sample_to_shard_mapper
from django.contrib.auth.models import User
class Dashboard(models.Model):
name = models.CharField(max_length=255)
owner = models.ForeignKey(... | Python | 0 |
62150ec45c9c062397f0ac0270466b4497d459de | Fix world time plugin | will/plugins/productivity/world_time.py | will/plugins/productivity/world_time.py | import datetime
import pytz
import requests
import time
from will.plugin import WillPlugin
from will.decorators import respond_to, periodic, hear, randomly, route, rendered_template, require_settings
from will import settings
def get_location(place):
payload = {'address': place, 'sensor': False}
r = requests... | import datetime
import requests
from will.plugin import WillPlugin
from will.decorators import respond_to, periodic, hear, randomly, route, rendered_template, require_settings
from will import settings
class TimePlugin(WillPlugin):
@respond_to("what time is it in (?P<place>.*)")
def what_time_is_it_in(self, ... | Python | 0 |
47bb5b64dfec5ea4718d8eac4c204f8e61dd60f8 | Add test that checks relative variable initialisation | tests/test_particles.py | tests/test_particles.py | from parcels import Grid, ScipyParticle, JITParticle, Variable
import numpy as np
import pytest
from operator import attrgetter
ptype = {'scipy': ScipyParticle, 'jit': JITParticle}
@pytest.fixture
def grid(xdim=100, ydim=100):
U = np.zeros((xdim, ydim), dtype=np.float32)
V = np.zeros((xdim, ydim), dtype=np.... | from parcels import Grid, ScipyParticle, JITParticle, Variable
import numpy as np
import pytest
ptype = {'scipy': ScipyParticle, 'jit': JITParticle}
@pytest.fixture
def grid(xdim=100, ydim=100):
U = np.zeros((xdim, ydim), dtype=np.float32)
V = np.zeros((xdim, ydim), dtype=np.float32)
lon = np.linspace(0... | Python | 0.000008 |
def480fd6b44e85cb85bcb3ed8cc0b98d771ee97 | Rework test. | src/test/ed/lang/python/import4_test.py | src/test/ed/lang/python/import4_test.py | '''
Copyright (C) 2008 10gen Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License, version 3,
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but ... | '''
Copyright (C) 2008 10gen Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License, version 3,
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but ... | Python | 0 |
519ad83f47ead62549c2e0a533ffd3ff5488e384 | Add lint test and format generated code (#4114) | java-asset/google-cloud-asset/synth.py | java-asset/google-cloud-asset/synth.py | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | Python | 0 |
286d0d577921126512263e8d16a01a75878ee453 | Add missing import | jenkinsapi/utils/urlopener_kerberos.py | jenkinsapi/utils/urlopener_kerberos.py | import urllib2
import kerberos as krb
from urlparse import urlparse
class KerberosAuthHandler(urllib2.BaseHandler):
"""
A BaseHandler class that will add Kerberos Auth headers to a request
"""
def __init__(self,tgt):
self.tgt = tgt
def http_request(self,req):
req.add_unredirected_h... | import urllib2
import kerberos as krb
class KerberosAuthHandler(urllib2.BaseHandler):
"""
A BaseHandler class that will add Kerberos Auth headers to a request
"""
def __init__(self,tgt):
self.tgt = tgt
def http_request(self,req):
req.add_unredirected_header('Authorization', 'Negoti... | Python | 0.000466 |
f95555ee63323d4046444f14395813a415aa0683 | implement just enough of mtrand to make tests start passing | numpy/random/mtrand.py | numpy/random/mtrand.py | import random
from numpy import zeros
def random_sample(length=0):
if length == 0:
return random.random()
ret = zeros((length,))
for x in xrange(length):
ret[x] = random.random()
return ret
def randn(length=0):
if length == 0:
return random.gauss(0., 1.)
ret = zeros((len... | random_sample = None
| Python | 0 |
92162564fb95ba20090b230695b52d4ddb41a38b | Add support for reading SSH keys from file. | cog/util.py | cog/util.py | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Activision Publishing, Inc.
# the cog project is free software under 3-clause BSD licence
# see the LICENCE file in the project root for copying terms
# miscellaneous utility functions, mostly borrowed
import os
import pwd
import string
import random
import keyring
impo... | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Activision Publishing, Inc.
# the cog project is free software under 3-clause BSD licence
# see the LICENCE file in the project root for copying terms
# miscellaneous utility functions, mostly borrowed
import os
import pwd
import string
import random
import keyring
impo... | Python | 0 |
422e5e71767df502e504d3f0482e6c8981c7eb25 | Update rng.py | cogs/rng.py | cogs/rng.py | # -*- coding: utf-8 -*-
from discord.ext import commands
import random as rng
import copy
class RNG:
"""Utilities that provide pseudo-RNG."""
el_fractions=['necro', 'walkers', 'xyuecro', 'lords']
def __init__(self, bot):
self.bot = bot
self.el_pull = copy.copy(RNG.el_frections)
@com... | # -*- coding: utf-8 -*-
from discord.ext import commands
import random as rng
import copy
class RNG:
"""Utilities that provide pseudo-RNG."""
el_fractions=['necro', 'walkers', 'xyuecro', 'lords']
def __init__(self, bot):
self.bot = bot
self.el_pull = copy.copy(RNG.el_frections)
@com... | Python | 0.000001 |
65998c13dfa7f1b13cc2332eeceec186e9d6af1c | fix syntax | channels.py | channels.py | channels = {
"#huggle":
lambda x: x.get("X-Bugzilla-Product", None) == "Huggle",
"#pywikibot":
lambda x: x.get("X-Bugzilla-Product", None) == "Pywikibot",
"#wikimedia-corefeatures":
lambda x: (x.get("X-Bugzilla-Product", None) == "MediaWiki extensions") and \
(x.get... | channels = {
"#huggle":
lambda x: x.get("X-Bugzilla-Product", None) == "Huggle",
"#pywikibot":
lambda x: x.get("X-Bugzilla-Product", None) == "Pywikibot",
"#wikimedia-corefeatures":
lambda x: (x.get("X-Bugzilla-Product", None) == "MediaWiki extensions") and \
(x.get... | Python | 0.999704 |
0b048cef1f0efd190d8bf8f50c69df35c59b91a3 | Add verbosity on JSON compare fail | xdc-plugin/tests/compare_output_json.py | xdc-plugin/tests/compare_output_json.py | #!/usr/bin/env python3
"""
This script extracts the top module cells and their corresponding parameters
from json files produced by Yosys.
The return code of this script is used to check if the output is equivalent.
"""
import sys
import json
parameters = ["IOSTANDARD", "DRIVE", "SLEW", "IN_TERM"]
def read_cells(js... | #!/usr/bin/env python3
"""
This script extracts the top module cells and their corresponding parameters
from json files produced by Yosys.
The return code of this script is used to check if the output is equivalent.
"""
import sys
import json
def read_cells(json_file):
with open(json_file) as f:
data = j... | Python | 0 |
fa28919d3d968fead742138484fcc81a6fca46d4 | Add tests for hubsync.sync.yesno_as_boolean | tests/unit/sync_test.py | tests/unit/sync_test.py | """Sync module tests"""
import unittest
from hubsync import sync
class SyncTestCase(unittest.TestCase):
def test_yesno_as_boolean_yes(self):
self.assertTrue(sync.yesno_as_boolean("yes"))
def test_yesno_as_boolean_no(self):
self.assertFalse(sync.yesno_as_boolean("no"))
class ZipPairsTestCas... | """Sync module tests"""
import unittest
from hubsync import sync
class ZipPairsTestCase(unittest.TestCase):
def test_empty_lists(self):
self.assertEqual(
[],
list(sync.zip_pairs([], []))
)
def test_empty_first_list(self):
self.assertEqual(
[(1, Non... | Python | 0.001036 |
816d6bcd5660d539c4482ea76f1adcf69c23cc92 | add inverse test | streams/coordinates/tests/test_core.py | streams/coordinates/tests/test_core.py | # coding: utf-8
"""
Test conversions in core.py
"""
from __future__ import absolute_import, division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
import os
import pytest
import numpy as np
import astropy.coordinates as coord
import astropy.units as u
from astropy.io import ascii
from ..core im... | # coding: utf-8
"""
Test conversions in core.py
"""
from __future__ import absolute_import, division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
import os
import pytest
import numpy as np
import astropy.coordinates as coord
import astropy.units as u
from astropy.io import ascii
from ..core im... | Python | 0.999869 |
675f3cdb2080fb71136b1da18a47321111a34fd9 | Fix Python version check, fix formatting | updates.py | updates.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Mikhail Fedosov (tbs.micle@gmail.com)"
__version__ = "0.1.4"
# http://code.activestate.com/recipes/577708-check-for-package-updates-on-pypi-works-best-in-pi/
# http://stackoverflow.com/questions/287871/print-in-terminal-with-colors-using-python
import pip
i... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Mikhail Fedosov (tbs.micle@gmail.com)"
__version__ = "0.1.4"
# http://code.activestate.com/recipes/577708-check-for-package-updates-on-pypi-works-best-in-pi/
# http://stackoverflow.com/questions/287871/print-in-terminal-with-colors-using-python
import pip
i... | Python | 0.000001 |
2a4adaa7e5bca8bc8bd3f552f23a46d73ef04a86 | fix authentication bug in token_Data and start_session | cheezapi.py | cheezapi.py | from flask import url_for, session
import os
import requests
def redirect_uri():
redirect_uri = url_for('cheez', _external=True)
# API includes protocol as part of URL matching. Use this to force HTTPS:
if os.environ.get('FORCE_HTTPS') == 'True':
redirect_uri = redirect_uri.replace('http://', 'http... | from flask import url_for, session
import os
import requests
def redirect_uri():
redirect_uri = url_for('cheez', _external=True)
# API includes protocol as part of URL matching. Use this to force HTTPS:
if os.environ.get('FORCE_HTTPS') == 'True':
redirect_uri = redirect_uri.replace('http://', 'http... | Python | 0.000001 |
b4eb149099b64bcfccc8a8f2fd0c5008c74a4fe0 | move write() out of the scope of an IOError catch clause not meant for it | oonib/deck/handlers.py | oonib/deck/handlers.py | import glob
import json
import os
import re
import yaml
from oonib import errors as e
from oonib.handlers import OONIBHandler
from oonib import log
from oonib.config import config
class DeckDescHandler(OONIBHandler):
def get(self, deckID):
# note:
# we don't have to sanitize deckID, because it's a... | import glob
import json
import os
import re
import yaml
from oonib import errors as e
from oonib.handlers import OONIBHandler
from oonib import log
from oonib.config import config
class DeckDescHandler(OONIBHandler):
def get(self, deckID):
# note:
# we don't have to sanitize deckID, because it's a... | Python | 0 |
fd456d55ceb4cd084c9ca754771c7b12235dcb5e | reset key | s.py | s.py | #encoding: utf-8
import os
from apscheduler.schedulers.blocking import BlockingScheduler
import requests
MAILGUN_KEY = os.environ.get('MAILGUN_KEY')
sched = BlockingScheduler()
@sched.scheduled_job('cron', day_of_week='mon-fri', hour=12)
def add_egg():
print(send_mail(get_text(get_price())))
@sched.schedul... | #encoding: utf-8
import os
from apscheduler.schedulers.blocking import BlockingScheduler
import requests
MAILGUN_KEY = os.environ.get('MAILGUN_KEY')
sched = BlockingScheduler()
@sched.scheduled_job('cron', day_of_week='mon-fri', hour=12)
def add_egg():
print(send_mail(get_text(get_price())))
@sched.schedul... | Python | 0.000003 |
c81ecba98638666c19659832aa197a4d1f0c79f1 | Change filter-thread-sanitizer-output.py python script printing settings to print full trace on skip | tools/filter-thread-sanitizer-output.py | tools/filter-thread-sanitizer-output.py | """
You can pipe clang-thread-sanitizer output to this program, and it'll filter it, removig false positives indicated in the blacklist file below
You run neblio-qt with, as an example:
neblio-qt --noquicksync 2<&1 | python tools/filter-thread-sanitizer-output.py | tee output.txt
"""
import sys
import os
import fnmatc... | """
You can pipe clang-thread-sanitizer output to this program, and it'll filter it, removig false positives indicated in the blacklist file below
You run neblio-qt with, as an example:
neblio-qt --noquicksync 2<&1 | python tools/filter-thread-sanitizer-output.py | tee output.txt
"""
import sys
import os
import fnmatc... | Python | 0 |
d83e0a34161d3783c12a271608c81780dd6f14dd | fix path to 'kmip_server' module | kmip/tests/integration/utils/server.py | kmip/tests/integration/utils/server.py | # Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | # Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | Python | 0.000007 |
0b4bd61d4e89618bd4950aca8fa1f5e154104297 | Remove unused import | cli/main.py | cli/main.py | #! /usr/bin/python
import sys
import argparse
from cli.built_in_commands import BuildInCommand
from cli.commands import CommandList
from cli.crypto import KeyPair
from cli.network import generateTransaction, sendTx
import cli.file_io as file_io
BASE_NAME = "iroha-cli"
TARGET = "iroha"
class ChiekuiCli:
class C... | #! /usr/bin/python
import sys
import readline
import argparse
from cli.built_in_commands import BuildInCommand
from cli.commands import CommandList
from cli.crypto import KeyPair
from cli.exception import CliException
from cli.network import generateTransaction, sendTx
import cli.file_io as file_io
import cli.comple... | Python | 0.000001 |
c3fb87846d1f1a38fe2e37521464dea59832ff6c | remove unused import from distutils | pywt/__init__.py | pywt/__init__.py | # flake8: noqa
# Copyright (c) 2006-2012 Filip Wasilewski <http://en.ig.ma/>
# Copyright (c) 2012-2016 The PyWavelets Developers
# <https://github.com/PyWavelets/pywt>
# See COPYING for license details.
"""
Discrete forward and inverse wavelet transform, stationary wavelet transform,
wavelet p... | # flake8: noqa
# Copyright (c) 2006-2012 Filip Wasilewski <http://en.ig.ma/>
# Copyright (c) 2012-2016 The PyWavelets Developers
# <https://github.com/PyWavelets/pywt>
# See COPYING for license details.
"""
Discrete forward and inverse wavelet transform, stationary wavelet transform,
wavelet p... | Python | 0 |
dafd492d7a91d8001b7ae2a1bddc2f0e18466c2c | Allow for chosing quotes | quotes/quotes.py | quotes/quotes.py | import discord
from random import choice as randchoice
from redbot.core import commands, checks, Config, bot
from redbot.core.utils.chat_formatting import box, humanize_list
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
# https://red-discordbot.readthedocs.io/en/latest/framework_utils.html
# https://githu... | import discord
from random import choice as randchoice
from redbot.core import commands, checks, Config, bot
from redbot.core.utils.chat_formatting import box, humanize_list
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
# https://red-discordbot.readthedocs.io/en/latest/framework_utils.html
# https://githu... | Python | 0 |
b82f21ea92aad44ca101744a3f5300280f081524 | Fix site when logged in | sweettooth/review/context_processors.py | sweettooth/review/context_processors.py |
from extensions.models import ExtensionVersion
def n_unreviewed_extensions(request):
if not request.user.has_perm("review.can-review-extensions"):
return dict()
return dict(n_unreviewed_extensions=ExtensionVersion.objects.unreviewed().count())
|
from extensions.models import ExtensionVersion
def n_unreviewed_extensions(request):
if not request.user.has_perm("review.can-review-extensions"):
return dict()
return dict(n_unreviewed_extensions=ExtensionVersion.unreviewed().count())
| Python | 0 |
898016cbde52392d6e85156f8e7f7084698475f1 | Fix API change in make_test_data.py | tools/make_test_data.py | tools/make_test_data.py | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright © 2012 New Dream Network, LLC (DreamHost)
#
# Author: Doug Hellmann <doug.hellmann@dreamhost.com>
#
# 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 o... | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright © 2012 New Dream Network, LLC (DreamHost)
#
# Author: Doug Hellmann <doug.hellmann@dreamhost.com>
#
# 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 o... | Python | 0.000008 |
885c4e4ae1a0cebc6cc08affeabf7232870307c0 | Add station and line as optional variables | web/app.py | web/app.py | import os
from flask import Flask
from flask import render_template
from flask import request
from helpers.tube import line_status, station_open
from helpers.metoffice import get_forcast
app = Flask(__name__)
app.debug = True
def get_value(station, line):
result = 100
forcast = get_forcast()
print "Feel... | import os
from flask import Flask
from flask import render_template
from helpers.tube import line_status, station_open
from helpers.metoffice import get_forcast
app = Flask(__name__)
app.debug = True
def get_value():
result = 100
forcast = get_forcast()
print "Feels Like Temperature: %s" % forcast['... | Python | 0 |
13ab494e0caaca6a460a49528c3aae4c7707042a | add a bit more docstring | pyecharts/custom/page.py | pyecharts/custom/page.py | #!/usr/bin/env python
# coding=utf-8
from pyecharts import template
class Page(object):
def __init__(self):
self.__charts = []
def add(self, achart_or_charts):
"""
Append chart(s) to the rendering page
:param achart_or_charts:
:return:
"""
if isinsta... | #!/usr/bin/env python
# coding=utf-8
from pyecharts import template
class Page(object):
def __init__(self):
self.__charts = []
def add(self, achart_or_charts):
"""
:param achart_or_charts:
:return:
"""
if isinstance(achart_or_charts, list):
self.... | Python | 0 |
a9e5edd24d0c92dc13dcca8607aae93d4277d9c0 | reformat TaskTaskLogAssociation | pyfarm/models/tasklog.py | pyfarm/models/tasklog.py | # No shebang line, this module is meant to be imported
#
# Copyright 2014 Ambient Entertainment GmbH & Co. KG
# Copyright 2015 Oliver Palmer
#
# 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
#
... | # No shebang line, this module is meant to be imported
#
# Copyright 2014 Ambient Entertainment GmbH & Co. KG
#
# 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/lice... | Python | 0.999998 |
96e3d2720a805a08190936a78c91a8c9746daab9 | Update Keras.py | Depthwise-Separable-Convolution/Keras.py | Depthwise-Separable-Convolution/Keras.py | from keras.datasets import mnist
from keras.initializers import RandomUniform
from keras.layers import Conv2D, Dense, DepthwiseConv2D, Flatten, MaxPooling2D
from keras.models import Sequential
from keras.optimizers import SGD
from keras.utils import to_categorical
# input image dimensions
img_rows, img_cols =... | from keras.datasets import mnist
from keras.initializers import RandomUniform
from keras.layers import Conv2D, Dense, DepthwiseConv2D, Flatten, MaxPooling2D
from keras.models import Sequential
from keras.optimizers import SGD
from keras.utils import to_categorical
# input image dimensions
img_rows, img_cols =... | Python | 0 |
efbb841bb0968abeb2d3bba5a535cb8619131b2b | Remove dupe licence header | touchdown/config/ini.py | touchdown/config/ini.py | # Copyright 2015 Isotoma Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | # Copyright 2015 Isotoma Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | Python | 0 |
4a1eeebc753dde28e2d9c29b532730e531a04d77 | write results after each test to save memory | pytest_cagoule/plugin.py | pytest_cagoule/plugin.py | from coverage import coverage
import six
from .db import get_connection
from .git_parser import get_changes
from .select import get_node_ids
def pytest_addoption(parser):
parser.addoption(
'--cagoule-capture', action='store_true', dest='cagoule_capture',
help='capture coverage info for cagoule',
... | from coverage import coverage
import six
from .db import get_connection
from .git_parser import get_changes
from .select import get_node_ids
def pytest_addoption(parser):
parser.addoption(
'--cagoule-capture', action='store_true', dest='cagoule_capture',
help='capture coverage info for cagoule',
... | Python | 0.000001 |
1e21ba5101fe1e47fec5acacd8ac9329a71fc9bb | Change __init__ | __init__.py | __init__.py | from .mygmm import *
| from .mygmm.mygmm import * | Python | 0.000028 |
c26c44f044a2e48cc53a0f52adce366807c87e2d | Add version number. | __init__.py | __init__.py | __version__ = '1.0'
from .Averager import Averager
from .Config import Config
from .RateTicker import RateTicker
from .Ring import Ring
from .SocketTalk import SocketTalk
from .SortedList import SortedList
from .String import string2time, time2string, time2levels, time2dir, time2fname
from .Timer import Timer
from .Use... | from .Averager import Averager
from .Config import Config
from .RateTicker import RateTicker
from .Ring import Ring
from .SocketTalk import SocketTalk
from .SortedList import SortedList
from .String import string2time, time2string, time2levels, time2dir, time2fname
from .Timer import Timer
from .UserInput import user_i... | Python | 0 |
08da61299b9ae970194c57748741a27fa77bf6f9 | Fix bug: modify devices type. from dict_items to list | uitester/test_manager/device_manager.py | uitester/test_manager/device_manager.py | from uitester.test_manager import adb
from uitester.test_manager import rpc_server
from threading import Thread
from queue import Queue
class Device:
BLANK = 0x0, 'Default status'
OFFLINE = 0x1, 'Device is offline'
ONLINE = 0x2, 'Device is online'
RUNNING = 0x3, 'Device is running tests'
def __in... | from uitester.test_manager import adb
from uitester.test_manager import rpc_server
from threading import Thread
from queue import Queue
class Device:
BLANK = 0x0, 'Default status'
OFFLINE = 0x1, 'Device is offline'
ONLINE = 0x2, 'Device is online'
RUNNING = 0x3, 'Device is running tests'
def __in... | Python | 0.000001 |
bde3b3d1d90338e23e2550bc6fdd317e5e696f0f | Add command-line arguments: root, hosts and name with regexp | zk-find.py | zk-find.py | #
# This is a FIND utility for Zookeeper
#
# Author: Aleksandr Vinokurov <aleksandr.vin@gmail.com>
# Url: https://github.com/aleksandr-vin/zk-find
#
import logging
import logging.config
import argparse
try:
logging.config.fileConfig('logging.conf')
except:
logging.basicConfig()
logger = logging.getLogger(... | #
# This is a FIND utility for Zookeeper
#
# Author: Aleksandr Vinokurov <aleksandr.vin@gmail.com>
# Url: https://github.com/aleksandr-vin/zk-find
#
import logging
import logging.config
try:
logging.config.fileConfig('logging.conf')
except:
logging.basicConfig()
logger = logging.getLogger('zk-find')
from... | Python | 0.000002 |
04ee8994563ee5bdbb9ae48604b2911197c54afd | Add environment variable to opt out of log collection (#2176) | conftest.py | conftest.py | """ This file configures python logging for the pytest framework
integration tests
Note: pytest must be invoked with this file in the working directory
E.G. py.test frameworks/<your-frameworks>/tests
"""
import logging
import os
import os.path
import sys
import pytest
import sdk_diag
import sdk_utils
import teamcity
... | """ This file configures python logging for the pytest framework
integration tests
Note: pytest must be invoked with this file in the working directory
E.G. py.test frameworks/<your-frameworks>/tests
"""
import logging
import os
import os.path
import sys
import pytest
import sdk_diag
import sdk_utils
import teamcity
... | Python | 0 |
b6da8865c9a12b9ce88d809d2fa4dfb601be01d0 | make sure same timezone is used when calculating delta | reboot_required/check.py | reboot_required/check.py | # vim: ts=4:sw=4:et
# (C) Datadog, Inc. 2010-2017
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# project
from checks import AgentCheck
from os import stat, utime, remove
from os.path import isfile
from stat import ST_MTIME
from datetime import datetime, timedelta
class RebootRequiredCh... | # vim: ts=4:sw=4:et
# (C) Datadog, Inc. 2010-2017
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# project
from checks import AgentCheck
from os import stat, utime, remove
from os.path import isfile
from stat import ST_MTIME
from datetime import datetime, timedelta
class RebootRequiredCh... | Python | 0.000003 |
6f7fc9067df57c4c15204a3208768acf4b76ed85 | Update version to 0.2.0.dev0 | bfg9000/version.py | bfg9000/version.py | version = '0.2.0.dev0'
| version = '0.1.0'
| Python | 0.000001 |
ef156eca331203696f38b2f829314c48eeb5f207 | Update version to 0.1.0 | bfg9000/version.py | bfg9000/version.py | version = '0.1.0'
| version = '0.1.0-dev'
| Python | 0.000001 |
8099c35b31e67643e14dcd3cd30fa104fcca6fb5 | Revert accidental change out of version.py | scikits/image/version.py | scikits/image/version.py | version='unbuilt-dev'
| # THIS FILE IS GENERATED FROM THE SCIKITS.IMAGE SETUP.PY
version='0.2dev'
| Python | 0.000001 |
fc51c36b636d4a396faac02285605dafe0779104 | Bump version to 18.0.0a5 | resolwe_bio/__about__.py | resolwe_bio/__about__.py | """Central place for package metadata."""
# NOTE: We use __title__ instead of simply __name__ since the latter would
# interfere with a global variable __name__ denoting object's name.
__title__ = 'resolwe-bio'
__summary__ = 'Bioinformatics pipelines for the Resolwe platform'
__url__ = 'https://github.com/genial... | """Central place for package metadata."""
# NOTE: We use __title__ instead of simply __name__ since the latter would
# interfere with a global variable __name__ denoting object's name.
__title__ = 'resolwe-bio'
__summary__ = 'Bioinformatics pipelines for the Resolwe platform'
__url__ = 'https://github.com/genial... | Python | 0 |
15a2ed134f32cefcba5e38fa9d043ab80fc36172 | work on getClasses() | scheduler.py | scheduler.py | # Scheduler.py by Jon Paul, 2014
# Handles user input and returns all schedules fitting user filters
""" Global Variables """
# schedules = [] # all schedules fit to user criteria
# courses = [] # all courses within a schedule
""" Classes """
# Course object representing a class entry
class Course:
def __init__(... | # Scheduler.py by Jon Paul, 2014
# Handles user input and returns all schedules fitting user filters
from array import *
""" Global Variables """
schedules = [] # all schedules fit to user criteria
courses = [] # all courses within a schedule
""" Classes """
# Course object representing a class entry
class Cours... | Python | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.