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
bbf6df137f4b9b37e733750937e58131f36c6aa3
Clean old todos
guicore/guievents/alertevents.py
guicore/guievents/alertevents.py
from guicore.displayscreen import EventDispatch import guicore.guiutils as guiutils from controlevents import CEvent import debug import logsupport from logsupport import ConsoleDetail, ConsoleWarning from utils import timers import alertsystem.alerttasks as alerttasks import guicore.switcher as switcher import screens...
from guicore.displayscreen import EventDispatch import guicore.guiutils as guiutils from controlevents import CEvent import debug import logsupport from logsupport import ConsoleDetail, ConsoleWarning from utils import timers import alertsystem.alerttasks as alerttasks import guicore.switcher as switcher import screens...
Python
0.000002
f149baa8ca7a401f8d2d390d84fc85960edd743d
Work in progress
dius.py
dius.py
#!python3 # Copyright (c) 2016 Petr Veprek """Disk Usage""" import math import operator import os import string import sys import time TITLE = "Disk Usage" VERSION = "0.0.0" VERBOSE = False WIDTH = 80 COUNT = 20 def now(on="on", at="at"): return "{}{} {}{}".format(on + " " if on != "" else "", time.strftime("%Y-...
#!python3 # Copyright (c) 2016 Petr Veprek """Disk Usage""" import math import operator import os import string import sys import time TITLE = "Disk Usage" VERSION = "0.0.0" VERBOSE = False def now(on="on", at="at"): return "{}{} {}{}".format(on + " " if on != "" else "", time.strftime("%Y-%m-%d"), at + " " if a...
Python
0.000003
9ec49083879831d7b2cfd863ea139e0e86d42c36
Bump release version
debreach/__init__.py
debreach/__init__.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from distutils import version __version__ = '1.4.0' version_info = version.StrictVersion(__version__).version default_app_config = 'debreach.apps.DebreachConfig'
# -*- coding: utf-8 -*- from __future__ import unicode_literals from distutils import version __version__ = '1.3.1' version_info = version.StrictVersion(__version__).version default_app_config = 'debreach.apps.DebreachConfig'
Python
0
206e8c2da4677532add03deadac03e88a7cd0da8
update __init__
cleverhans/__init__.py
cleverhans/__init__.py
"""The CleverHans adversarial example library""" from cleverhans.devtools.version import append_dev_version # If possible attach a hex digest to the version string to keep track of # changes in the development branch __version__ = append_dev_version('3.0.0')
"""The CleverHans adversarial example library""" from cleverhans.devtools.version import append_dev_version # If possible attach a hex digest to the version string to keep track of # changes in the development branch __version__ = append_dev_version('2.0.0')
Python
0.000004
878db5485946935f8784c6c9f15decbe15c0dfbc
Remove catchall redirect
democracylab/urls.py
democracylab/urls.py
"""democracylab URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Cla...
"""democracylab URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Cla...
Python
0
491a99aa56d27d5c37af4e0538e808d2ec47d8a6
update problem
hackerrank/016_lisas_workbook.py
hackerrank/016_lisas_workbook.py
#!/bin/python3 """ https://www.hackerrank.com/challenges/bear-and-workbook?h_r=next-challenge&h_v=zen Lisa just got a new math workbook. A workbook contains exercise problems, grouped into chapters. * There are n chapters in Lisa's workbook, numbered from 1 to n. * The i-th chapter has ti problems, numbered ...
#!/bin/python3 """ https://www.hackerrank.com/challenges/bear-and-workbook?h_r=next-challenge&h_v=zen Lisa just got a new math workbook. A workbook contains exercise problems, grouped into chapters. * There are n chapters in Lisa's workbook, numbered from 1 to n. * The i-th chapter has ti problems, numbered ...
Python
0.000001
7be087d4bd62557acd64a9e703443a8df404e3e3
Make storage size an int
director/sessions_/providers/ec2.py
director/sessions_/providers/ec2.py
import time from django.conf import settings import boto.ec2 class EC2: ''' Amazon EC2 provider for session Workers ''' def connection(self): ''' Get a EC2 connection to use in start() and stop() ''' return boto.ec2.connect_to_region( 'us-west-2', ...
import time from django.conf import settings import boto.ec2 class EC2: ''' Amazon EC2 provider for session Workers ''' def connection(self): ''' Get a EC2 connection to use in start() and stop() ''' return boto.ec2.connect_to_region( 'us-west-2', ...
Python
0.000123
a369a9648e1c0bc2cb2a4964fd2f5814d0950902
echo 4
echo.py
echo.py
import IPython import warnings # These are actually used for the application import collections import time from golix import Ghid from hypergolix.service import HypergolixLink hgxlink = HypergolixLink(threaded=True) desktop = Ghid(algo=1, address=b'\xc0TZ\x15+\x9a\x8e\x01\xbbvw\x83\xc8%\xd5RG\x9c8<\xf7\x1f\xa4e\x08...
import IPython import warnings # These are actually used for the application import collections from golix import Ghid from hypergolix.service import HypergolixLink hgxlink = HypergolixLink(threaded=True) desktop = Ghid(algo=1, address=b'\xc0TZ\x15+\x9a\x8e\x01\xbbvw\x83\xc8%\xd5RG\x9c8<\xf7\x1f\xa4e\x08\xc4\x9a\xa0...
Python
0.999988
4d86d5ffa27f5ee365bc832113cd6605a23d10d3
Update src/acquisition/covidcast_nowcast/load_sensors.py
src/acquisition/covidcast_nowcast/load_sensors.py
src/acquisition/covidcast_nowcast/load_sensors.py
from shutil import move import time import delphi.operations.secrets as secrets import pandas as pd import sqlalchemy from delphi.epidata.acquisition.covidcast.csv_importer import CsvImporter SENSOR_CSV_PATH = "/common/covidcast-nowcast/receiving/" TABLE_NAME = "covidcast_nowcast" DB_NAME = "epidata" CSV_DTYPES = {"g...
from shutil import move import time import delphi.operations.secrets as secrets import pandas as pd import sqlalchemy from delphi.epidata.acquisition.covidcast.csv_importer import CsvImporter SENSOR_CSV_PATH = "/common/covidcast-nowcast/receiving/" TABLE_NAME = "covidcast_nowcast" DB_NAME = "epidata" CSV_DTYPES = {"g...
Python
0
a82b3b5ba8d6fba12df1a3c1993325955da893b6
Fix a typo in comment. Thanks for tmm1 for watching after me.
lib/carbon/util.py
lib/carbon/util.py
import os import pwd from os.path import abspath, basename, dirname, join from twisted.python.util import initgroups from twisted.scripts.twistd import runApp from twisted.scripts._twistd_unix import daemonize daemonize = daemonize # Backwards compatibility def dropprivs(user): uid, gid = pwd.getpwnam(user)[2:4...
import os import pwd from os.path import abspath, basename, dirname, join from twisted.python.util import initgroups from twisted.scripts.twistd import runApp from twisted.scripts._twistd_unix import daemonize daemonize = daemonize # Backwards compatibility def dropprivs(user): uid, gid = pwd.getpwnam(user)[2:4...
Python
0.000001
e611e9518945fa38165e8adf7103561f438b70b1
Add subcommand to process directory
interdiagram/bin/interdiagram.py
interdiagram/bin/interdiagram.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from pathlib import Path from typing import Iterable, List, TypeVar from typing.io import IO import click import yaml from ..models import Diagram click.disable_unicode_literals_warning = True FileType = TypeVar('FileType', IO, Path) def _is_file_obj( f: File...
#!/usr/bin/env python # -*- coding: utf-8 -*- from typing import List import click import yaml from ..models import Diagram click.disable_unicode_literals_warning = True # TODO: Correct documentation schema once it's frozen @click.command() @click.argument('yaml-file', nargs=-1, type=click.File()) @click.argument...
Python
0
2163478d2d927c4e50fcef65a88ca9c81b9d245b
Remove print from tests
menpodetect/tests/opencv_test.py
menpodetect/tests/opencv_test.py
from menpodetect.opencv import (load_opencv_frontal_face_detector, load_opencv_eye_detector) import menpo.io as mio takeo = mio.import_builtin_asset.takeo_ppm() def test_frontal_face_detector(): takeo_copy = takeo.copy() opencv_detector = load_opencv_frontal_face_detector() ...
from menpodetect.opencv import (load_opencv_frontal_face_detector, load_opencv_eye_detector) import menpo.io as mio takeo = mio.import_builtin_asset.takeo_ppm() def test_frontal_face_detector(): takeo_copy = takeo.copy() opencv_detector = load_opencv_frontal_face_detector() ...
Python
0.000002
475552061da6a58c6953c387a639d5b4e941600b
Fix shell completion
metakernel/magics/shell_magic.py
metakernel/magics/shell_magic.py
# Copyright (c) Metakernel Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import print_function from metakernel import Magic, pexpect from metakernel.replwrap import cmd, bash import os import sys class ShellMagic(Magic): def __init__(self, kernel): super(Sh...
# Copyright (c) Metakernel Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import print_function from metakernel import Magic, pexpect from metakernel.replwrap import cmd, bash import os import sys class ShellMagic(Magic): def __init__(self, kernel): super(Sh...
Python
0.000002
e8ad2ca0fc2ddec71645bef31686d9de2001dd88
add translate type
modularodm/fields/StringField.py
modularodm/fields/StringField.py
from . import Field from ..validators import StringValidator class StringField(Field): # default = '' translate_type = str validate = StringValidator() def __init__(self, *args, **kwargs): super(StringField, self).__init__(*args, **kwargs)
from . import Field from ..validators import StringValidator class StringField(Field): # default = '' validate = StringValidator() def __init__(self, *args, **kwargs): super(StringField, self).__init__(*args, **kwargs)
Python
0.000017
df5ac0a7f2246e5fbbb5f7d87903a5232e94fe87
Test deprecation.
morepath/tests/test_autosetup.py
morepath/tests/test_autosetup.py
from collections import namedtuple from morepath.autosetup import ( caller_module, caller_package, autoscan, morepath_packages, import_package) from base.m import App import morepath import pytest def setup_module(module): with pytest.deprecated_call(): morepath.disable_implicit() def test_impor...
from collections import namedtuple from morepath.autosetup import ( caller_module, caller_package, autoscan, morepath_packages, import_package) from base.m import App import morepath import pytest def setup_module(module): morepath.disable_implicit() def test_import(): import base import sub ...
Python
0.000001
e1184f70abd477ae2d0c304321231c908c67882b
add comment to authorize() that uname and pw are saved in plain text
msl/package_manager/authorize.py
msl/package_manager/authorize.py
""" Create the GitHub authorization file. """ import getpass from .utils import log, get_username, _get_input, _GITHUB_AUTH_PATH WARNING_MESSAGE = """ Your username and password are saved in plain text in the file that is created. You should set the file permissions provided by your operating system to ensure that y...
""" Create the GitHub authorization file. """ import getpass from .utils import log, get_username, _get_input, _GITHUB_AUTH_PATH WARNING_MESSAGE = """ Your username and password are saved in plain text in the file that is created. You should set the file permissions provided by your operating system to ensure that y...
Python
0
47b97cf311c36b993b59235dedc06993a6d58b6f
make TestVecSim subclass object
new_pmlib/TestVectorSimulator.py
new_pmlib/TestVectorSimulator.py
#========================================================================= # TestVectorSimulator #========================================================================= # This class simplifies creating unit tests which simply set certain # inputs and then check certain outputs every cycle. A user simply needs # to i...
#========================================================================= # TestVectorSimulator #========================================================================= # This class simplifies creating unit tests which simply set certain # inputs and then check certain outputs every cycle. A user simply needs # to i...
Python
0
0cd4862062bbe19aec5bb2a23563e03eb8ca8cb7
Fix stable release script
make_stable_release.py
make_stable_release.py
from robot.libdoc import libdoc from src.WhiteLibrary.version import VERSION import git import sys VERSION_FILE = './src/WhiteLibrary/version.py' def change_stable(from_stable, to_stable): with open(VERSION_FILE, 'r') as file: filedata = file.read() filedata = filedata.replace('STABLE = {0}'.format(...
from robot.libdoc import libdoc from src.WhiteLibrary.version import VERSION import git import sys VERSION_FILE = './src/WhiteLibrary/version.py' def change_stable(from_stable, to_stable): with open(VERSION_FILE, 'r') as file : filedata = file.read() filedata = filedata.replace('STABLE = {0}'.format...
Python
0.000001
6d910ea91b550864f445fe33d0a29ef11a82f762
Replace iteritmes() with items()
malcolm/core/method.py
malcolm/core/method.py
#!/bin/env dls-python from collections import OrderedDict from malcolm.core.loggable import Loggable class Method(Loggable): """Exposes a function with metadata for arguments and return values""" def __init__(self, name): super(Method, self).__init__(logger_name=name) self.name = name ...
#!/bin/env dls-python from collections import OrderedDict from malcolm.core.loggable import Loggable class Method(Loggable): """Exposes a function with metadata for arguments and return values""" def __init__(self, name): super(Method, self).__init__(logger_name=name) self.name = name ...
Python
0.99999
ef5ed1bedd80ae03b9174088e579b5d85507266c
Update forms.py
app/auth/forms.py
app/auth/forms.py
from flask.ext.wtf import Form from wtforms import StringField, PasswordField, BooleanField, SubmitField, ValidationError from wtforms.validators import Required, Email, Length, Regexp, EqualTo from ..models import User from app.exceptions import ValidationError class LoginForm(Form): email = StringField('Email',...
from flask.ext.wtf import Form from wtforms import StringField, PasswordField, BooleanField, SubmitField, ValidationError from wtforms.validators import Required, Email, Length, Regexp, EqualTo from ..models import User class LoginForm(Form): email = StringField('Email', validators=[Required(), Length(1, 64), Ema...
Python
0.000001
58bab9291c85edc3f13d3dc0659eff3c17201eb1
Improve pixelcnn namings and comments
eva/models/pixelcnn.py
eva/models/pixelcnn.py
from keras.models import Model from keras.layers import Input, Convolution2D, Activation, Flatten, Dense, Reshape, Lambda from keras.layers.advanced_activations import PReLU from keras.engine.topology import merge from keras.optimizers import Nadam import keras.backend.tensorflow_backend as K from eva.layers.residual_...
from keras.models import Model from keras.layers import Input, Convolution2D, Activation, Flatten, Dense, Reshape, Lambda from keras.layers.advanced_activations import PReLU from keras.engine.topology import merge from keras.optimizers import Nadam import keras.backend.tensorflow_backend as K from eva.layers.residual_...
Python
0
79b258dedda23c9130dda6d4d674f077ac52683e
Add select field for food type
app/main/forms.py
app/main/forms.py
import datetime from dateutil.parser import parse from flask.ext.wtf import Form from wtforms import StringField, TextAreaField, BooleanField, SelectField,\ DateTimeField, SubmitField from wtforms.validators import Required, Length, Email from wtforms import ValidationError from ..models import User, Event, Location ...
import datetime from dateutil.parser import parse from flask.ext.wtf import Form from wtforms import StringField, TextAreaField, BooleanField, SelectField,\ DateTimeField, SubmitField from wtforms.validators import Required, Length, Email from wtforms import ValidationError from ..models import User, Event, Location ...
Python
0.000001
41b3bfdbaa7540e85d74aa6d248e6214f17fe432
Converted to Python 3 code using 2to3 command
django-os2webscanner/os2webscanner/migrations/0003_organization_do_notify_all_scans.py
django-os2webscanner/os2webscanner/migrations/0003_organization_do_notify_all_scans.py
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('os2webscanner', '0002_auto_20160401_0817'), ] operations = [ migrations.AddField( model_name='organization', name='do_notify_all_scans', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('os2webscanner', '0002_auto_20160401_0817'), ] operations = [ migrations.AddField( model_name='organization', ...
Python
0.999973
060b124888953d302d8611c459f978ef9201ae96
update g95 version pattern
numpy/distutils/fcompiler/g95.py
numpy/distutils/fcompiler/g95.py
# http://g95.sourceforge.net/ import os import sys from numpy.distutils.cpuinfo import cpu from numpy.distutils.fcompiler import FCompiler class G95FCompiler(FCompiler): compiler_type = 'g95' # version_pattern = r'G95 \((GCC (?P<gccversion>[\d.]+)|.*?) \(g95!\) (?P<version>.*)\).*' # $ g95 --version ...
# http://g95.sourceforge.net/ import os import sys from numpy.distutils.cpuinfo import cpu from numpy.distutils.fcompiler import FCompiler class G95FCompiler(FCompiler): compiler_type = 'g95' version_pattern = r'G95 \((GCC (?P<gccversion>[\d.]+)|.*?) \(g95!\) (?P<version>.*)\).*' # $ g95 --version ...
Python
0
594da79c98f360331613f786918f08957c39d13c
apply train_hook.gradients()
hypergan/trainers/simultaneous_trainer.py
hypergan/trainers/simultaneous_trainer.py
import tensorflow as tf import numpy as np import hyperchamber as hc import inspect from hypergan.trainers.base_trainer import BaseTrainer TINY = 1e-12 class SimultaneousTrainer(BaseTrainer): """ Steps G and D simultaneously """ def _create(self): gan = self.gan config = self.config ...
import tensorflow as tf import numpy as np import hyperchamber as hc import inspect from hypergan.trainers.base_trainer import BaseTrainer TINY = 1e-12 class SimultaneousTrainer(BaseTrainer): """ Steps G and D simultaneously """ def _create(self): gan = self.gan config = self.config ...
Python
0
adfe91d2f6066d8f28aeca9574465be452fcd20e
Correct excel file extension
octoprint_printhistory/export.py
octoprint_printhistory/export.py
# coding=utf-8 __author__ = "Jarek Szczepanski <imrahil@imrahil.com>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 Jarek Szczepanski - Released under terms of the AGPLv3 License" def exportHistoryData(self, exportType): import f...
# coding=utf-8 __author__ = "Jarek Szczepanski <imrahil@imrahil.com>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 Jarek Szczepanski - Released under terms of the AGPLv3 License" def exportHistoryData(self, exportType): import f...
Python
0
ee330d0b0092e1a8fe7c25cbe170973647d59baa
enable staff with clearance to create own office hours
web/impact/impact/v1/serializers/office_hours_serializer.py
web/impact/impact/v1/serializers/office_hours_serializer.py
from datetime import timedelta from rest_framework.serializers import ( ModelSerializer, ValidationError, ) from accelerator_abstract.models.base_clearance import ( CLEARANCE_LEVEL_STAFF ) from accelerator_abstract.models.base_user_utils import is_employee from accelerator.models import ( MentorProgram...
from datetime import timedelta from rest_framework.serializers import ( ModelSerializer, ValidationError, ) from accelerator_abstract.models.base_user_utils import is_employee from accelerator.models import ( MentorProgramOfficeHour, UserRole ) from .location_serializer import LocationSerializer from ...
Python
0
7e8e5ceb765189974bcaee86e15c26b94ac05f3a
Update modulation.py
examples/modulation.py
examples/modulation.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import initExample import os from lase.core import KClient # Driver to use from lase.drivers import Oscillo # Modules to import import numpy as np import matplotlib.pyplot as plt import time # Load the oscillo instrument host = os.getenv('HOST','192.168.1.100') password...
#!/usr/bin/env python # -*- coding: utf-8 -*- import initExample import os from lase.core import KClient # Driver to use from lase.drivers import Oscillo # Modules to import import numpy as np import matplotlib.pyplot as plt import time # Connect to Lase host = os.getenv('HOST','192.168.1.100') client = KClient(hos...
Python
0.000001
d876ce9e7b50b6e5f1161a937097f00b6fafe09f
update test
myideas/core/tests/test_views.py
myideas/core/tests/test_views.py
from django.test import TestCase from django.shortcuts import resolve_url as r from django.contrib.auth import get_user_model from myideas.core.forms import IdeasForm from myideas.core.models import Ideas class HomeTest(TestCase): def setUp(self): self.response = self.client.get(r('home')) def test_...
from django.test import TestCase from django.shortcuts import resolve_url as r from django.contrib.auth import get_user_model from myideas.core.forms import IdeasForm from myideas.core.models import Ideas class HomeTest(TestCase): def setUp(self): self.response = self.client.get(r('home')) def test...
Python
0.000001
2bc474b83f0e3ad340127f626cfe6597cbd2ba4e
Allow for interactive inputs
cal_pipe/manual_flagging.py
cal_pipe/manual_flagging.py
import sys ''' Plot visibility data for each spw to allow for easy manual flags ''' try: vis = sys.argv[1] field = sys.argv[2] corrstring = sys.argv[3] except IndexError: vis = raw_input("MS Name? : ") field = raw_input("Field Name/Number? : ") corrstring = raw_input("Corrstring? : ") tb.ope...
import sys ''' Plot visibility data for each spw to allow for easy manual flags ''' vis = sys.argv[1] field = sys.argv[2] corrstring = sys.argv[3] tb.open(vis + '/SPECTRAL_WINDOW') freqs = tb.getcol('REF_FREQUENCY') nchans = tb.getcol('NUM_CHAN') tb.close() spws = range(0, len(freqs)) for spw in spws: nchan ...
Python
0.000002
6dbcc892f8b659a22a33fce3836cb082b64dd817
load order
campos_event/__openerp__.py
campos_event/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of CampOS Event, # an Odoo module. # # Copyright (c) 2015 Stein & Gabelgaard ApS # http://www.steingabelgaard.dk # Hans Henrik Gaelgaard ...
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of CampOS Event, # an Odoo module. # # Copyright (c) 2015 Stein & Gabelgaard ApS # http://www.steingabelgaard.dk # Hans Henrik Gaelgaard ...
Python
0.000001
1908abeb6aa0082fb49428185c340a7231cdd467
fix typo in binaryoperator
emu/processes/wps_binaryoperator.py
emu/processes/wps_binaryoperator.py
from pywps import Process, LiteralInput, LiteralOutput from pywps.app.Common import Metadata import logging logger = logging.getLogger("PYWPS") class BinaryOperator(Process): def __init__(self): inputs = [ LiteralInput('inputa', 'Input 1', data_type='float', abstract=...
from pywps import Process, LiteralInput, LiteralOutput from pywps.app.Common import Metadata import logging logger = logging.getLogger("PYWPS") class BinaryOperator(Process): def __init__(self): inputs = [ LiteralInput('inputa', 'Input 1', data_type='float', abstract=...
Python
0.0171
9911604243a1fb3612317fda91a61653ae396e20
Fix script permissions
Source/Documentation/Runme.py
Source/Documentation/Runme.py
#!/usr/bin/python import os import sys import shutil import subprocess def create_page(orig_path, page_name, page_header): orig = open(orig_path) dest = open("Temp/" + os.path.split(orig_path)[1] + ".txt", "w") dest.write("/** @page " + page_name + " " + page_header + "\n") dest.write(orig.read()) ...
#!/usr/bin/python import os import sys import shutil import subprocess def create_page(orig_path, page_name, page_header): orig = open(orig_path) dest = open("Temp/" + os.path.split(orig_path)[1] + ".txt", "w") dest.write("/** @page " + page_name + " " + page_header + "\n") dest.write(orig.read()) ...
Python
0.000001
00c07a76185aff4873abe3eb814b847b6d02f58f
fix date
02_BasicDataTypes/04_find-second-maximum-number-in-a-list.py
02_BasicDataTypes/04_find-second-maximum-number-in-a-list.py
#!/usr/bin/python3.6 """Jerod Gawne, 2017-09-28 Find the Second Largest Number https://www.hackerrank.com/challenges/find-second-maximum-number-in-a-list/ Editorial: - There are many ways to solve this problem. This can be solved by maintaining two variables max and second_max. Iterate through the list and fi...
#!/usr/bin/python3.6 """Jerod Gawne, 2017-09-12 Find the Second Largest Number https://www.hackerrank.com/challenges/find-second-maximum-number-in-a-list/ Editorial: - There are many ways to solve this problem. This can be solved by maintaining two variables max and second_max. Iterate through the list and fi...
Python
0.00188
0c305e8bd8624af2d2ce1ca292bb26095d0e1dcc
Fix __eq__ method on ExecuteContainer to compare only proper classes
cekit/descriptor/execute.py
cekit/descriptor/execute.py
import yaml import cekit from cekit.descriptor import Descriptor execute_schemas = [yaml.safe_load(""" map: name: {type: str} script: {type: str} user: {type: text}""")] container_schemas = [yaml.safe_load(""" seq: - {type: any}""")] class Execute(Descripto...
import yaml import cekit from cekit.descriptor import Descriptor execute_schemas = [yaml.safe_load(""" map: name: {type: str} script: {type: str} user: {type: text}""")] container_schemas = [yaml.safe_load(""" seq: - {type: any}""")] class Execute(Descripto...
Python
0
b0d88fccf51f240800fda462bddb9d934931c078
Update tests.py
intermediate_words_search_python/tests.py
intermediate_words_search_python/tests.py
# imports from solution from main import solution, LOCAL_DICTIONARY from utils import show_path from time import time TEST_CASES = ( # start word, target word, minimal path length ( 'cat', 'dog', 4 ), ( 'cat', 'mistrial', 9 ), ( 'strong', 'weak', 7 ), ( 'hot', 'cold'...
# imports from solution from main import solution from utils import show_path def tests(): for search_method in ('BFS', 'A*'): opts = { 'search_method': search_method } assert solution('cat', 'dog', opts) == ('cat', 'cot', 'dot', 'dog') assert solution('cat', 'dot', opts) == ('cat', 'cot...
Python
0.000001
446d578ec9765a22478abecc7df526f666f5e57c
remove 'devel' in filename and add 'runtime'
cerbero/packages/android.py
cerbero/packages/android.py
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
Python
0
22f7c82d63fb7ccc9226d734bdacd4a47e96da89
Fix the `clear_app` command for Django 1.8
ixdjango/management/commands/clear_app.py
ixdjango/management/commands/clear_app.py
""" Management command to clear specified app's models of data. .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ from __future__ import print_function from django.core.management.base import BaseCommand from django.core.management.color import no_style from django.db import connec...
""" Management command to clear specified app's models of data. .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ from __future__ import print_function from django.core.management.base import BaseCommand from django.core.management.color import no_style from django.db import connec...
Python
0.00069
6c4219e92611ed0f6721e86ca3d24a28c30825c2
add 15 min total
cgi-bin/precip/snetRates.py
cgi-bin/precip/snetRates.py
#!/mesonet/python/bin/python import mx.DateTime, cgi, sys from pyIEM import iemdb i = iemdb.iemdb() mydb = i['snet'] def diff(nowVal, pastVal, mulli): if (nowVal < 0 or pastVal < 0): return "%5s," % ("M") differ = nowVal - pastVal if differ < 0: return "%5s," % ("M") return "%5.2f," % (differ * mulli) def ...
#!/mesonet/python/bin/python import mx.DateTime, cgi, sys from pyIEM import iemdb i = iemdb.iemdb() mydb = i['snet'] def diff(nowVal, pastVal, mulli): if (nowVal < 0 or pastVal < 0): return "%5s," % ("M") differ = nowVal - pastVal if differ < 0: return "%5s," % ("M") return "%5.2f," % (differ * mulli) def ...
Python
0.000229
32e83559e00b7d5a363585d599cd087af854c445
Support custom initializer in links.CRF1d
chainer/links/loss/crf1d.py
chainer/links/loss/crf1d.py
from chainer.functions.loss import crf1d from chainer import link from chainer import variable class CRF1d(link.Link): """Linear-chain conditional random field loss layer. This link wraps the :func:`~chainer.functions.crf1d` function. It holds a transition cost matrix as a parameter. Args: ...
from chainer.functions.loss import crf1d from chainer import link from chainer import variable class CRF1d(link.Link): """Linear-chain conditional random field loss layer. This link wraps the :func:`~chainer.functions.crf1d` function. It holds a transition cost matrix as a parameter. Args: ...
Python
0
8214d516b3feba92ab3ad3b1f2fa1cf253e83012
Remove use of deprecated `scan_plugins` method
pyexcel/internal/__init__.py
pyexcel/internal/__init__.py
""" pyexcel.internal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pyexcel internals that subjected to change :copyright: (c) 2015-2017 by Onni Software Ltd. :license: New BSD License """ from lml.loader import scan_plugins from pyexcel.internal.plugins import PARSER, RENDERER # noqa from pyexcel.int...
""" pyexcel.internal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pyexcel internals that subjected to change :copyright: (c) 2015-2017 by Onni Software Ltd. :license: New BSD License """ from lml.loader import scan_plugins from pyexcel.internal.plugins import PARSER, RENDERER # noqa from pyexcel.int...
Python
0.000004
708e105713d7fd480b4b45d3ef31a46e35e63a8e
annotate calculate_tx_fee.
pypeerassets/transactions.py
pypeerassets/transactions.py
'''transaction assembly/dissasembly''' from time import time from math import ceil from btcpy.structs.address import Address from btcpy.structs.transaction import TxOut, TxIn, Sequence, Locktime, MutableTransaction from btcpy.structs.script import StackData, ScriptSig, NulldataScript, ScriptSig, ScriptPubKey from btc...
'''transaction assembly/dissasembly''' from time import time from math import ceil from btcpy.structs.address import Address from btcpy.structs.transaction import TxOut, TxIn, Sequence, Locktime, MutableTransaction from btcpy.structs.script import StackData, ScriptSig, NulldataScript, ScriptSig, ScriptPubKey from btc...
Python
0.000001
56e4c14ea6e2266bb8fa6f25ef1c0a3b2123f5ad
fix py3k
pystacia/image/_impl/blur.py
pystacia/image/_impl/blur.py
# coding: utf-8 # pystacia/image/_impl/blur.py # Copyright (C) 2011-2012 by Paweł Piotr Przeradowski # This module is part of Pystacia and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from future_builtins import zip def _make_radius_strength_bias(c_name, names, order=Non...
# coding: utf-8 # pystacia/image/_impl/blur.py # Copyright (C) 2011-2012 by Paweł Piotr Przeradowski # This module is part of Pystacia and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php def _make_radius_strength_bias(c_name, names, order=None): def function(image, *args)...
Python
0.000002
27273335422781dcee950ee081ed13e53816e6d6
Bump version
pytablewriter/__version__.py
pytablewriter/__version__.py
__author__ = "Tsuyoshi Hombashi" __copyright__ = f"Copyright 2016, {__author__}" __license__ = "MIT License" __version__ = "0.63.0" __maintainer__ = __author__ __email__ = "tsuyoshi.hombashi@gmail.com"
__author__ = "Tsuyoshi Hombashi" __copyright__ = f"Copyright 2016, {__author__}" __license__ = "MIT License" __version__ = "0.62.0" __maintainer__ = __author__ __email__ = "tsuyoshi.hombashi@gmail.com"
Python
0
349f975e257192458b1944753d4f609869b9e8d6
use yield_fixture to support pytest on py2.7
python-cim/tests/fixtures.py
python-cim/tests/fixtures.py
import os import pytest import cim import cim.objects @pytest.fixture def repopath(): """ Returns: str: path to the repos/win7/deleted-instance repository """ cd = os.path.dirname(os.path.abspath(__file__)) return os.path.join(cd, 'repos', 'win7', 'deleted-instance') @pytest.fixture de...
import os import pytest import cim import cim.objects @pytest.fixture def repopath(): """ Returns: str: path to the repos/win7/deleted-instance repository """ cd = os.path.dirname(os.path.abspath(__file__)) return os.path.join(cd, 'repos', 'win7', 'deleted-instance') @pytest.fixture de...
Python
0
fe4c66b2e50035ab2701923d6a2cd0cb82e63780
Fix call mkl gemm in mkldnn.py (#7007)
python/tvm/contrib/mkldnn.py
python/tvm/contrib/mkldnn.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
a2097bf7c3103ec6e0482bb34f3b33c753ea7889
Enable QtNetwork test for PySide
qtpy/tests/test_qtnetwork.py
qtpy/tests/test_qtnetwork.py
from __future__ import absolute_import import pytest from qtpy import PYSIDE, PYSIDE2, QtNetwork def test_qtnetwork(): """Test the qtpy.QtNetwork namespace""" assert QtNetwork.QAbstractNetworkCache is not None assert QtNetwork.QNetworkCacheMetaData is not None if not PYSIDE and not PYSIDE2: a...
from __future__ import absolute_import import pytest from qtpy import PYSIDE, PYSIDE2, QtNetwork @pytest.mark.skipif(PYSIDE2 or PYSIDE, reason="It fails on PySide/PySide2") def test_qtnetwork(): """Test the qtpy.QtNetwork namespace""" assert QtNetwork.QAbstractNetworkCache is not None assert QtNetwork.QN...
Python
0
cd323386b61cd280fcf3e599ae6a02b889f81a40
Remove support for old style api urls
raven/contrib/django/urls.py
raven/contrib/django/urls.py
""" raven.contrib.django.urls ~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import try: from django.conf.urls import url except ImportError: # for Django version less than 1...
""" raven.contrib.django.urls ~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import try: from django.conf.urls import url except ImportError: # for Django version less than 1...
Python
0
d3e9e7f6873e54f9657d1fdc9c3339b49c4936ae
Update tests to use required request argument
rcamp/tests/test_lib_auth.py
rcamp/tests/test_lib_auth.py
from django.conf import settings import mock import pam from lib.pam_backend import PamBackend from tests.utilities.ldap import ( LdapTestCase, get_ldap_user_defaults ) from accounts.models import ( RcLdapUser, User ) # This test case covers functionality in the custom PAM Auth Backend class PamBacken...
from django.conf import settings import mock import pam from lib.pam_backend import PamBackend from tests.utilities.ldap import ( LdapTestCase, get_ldap_user_defaults ) from accounts.models import ( RcLdapUser, User ) # This test case covers functionality in the custom PAM Auth Backend class PamBacken...
Python
0
15865668659ebee4cb49a28d09f9ff1d67d2a96d
Set issue to in progress when sending issue
rdmo/projects/views/issue.py
rdmo/projects/views/issue.py
import logging from django.conf import settings from django.core.mail import EmailMessage from django.http import HttpResponseRedirect from django.views.generic import DetailView, UpdateView from rdmo.core.views import ObjectPermissionMixin, RedirectViewMixin from ..forms import IssueMailForm from ..models import Iss...
import logging from django.conf import settings from django.core.mail import EmailMessage from django.http import HttpResponseRedirect from django.views.generic import DetailView, UpdateView from rdmo.core.views import ObjectPermissionMixin, RedirectViewMixin from ..forms import IssueMailForm from ..models import Iss...
Python
0
80c0f29d7b81a68d14e261ce1c062d37a0e6d4f7
Increase ARM process startup time baseline
tests/integration_tests/performance/test_process_startup_time.py
tests/integration_tests/performance/test_process_startup_time.py
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Test that the process startup time up to socket bind is within spec.""" import json import os import platform import time import host_tools.logging as log_tools MAX_STARTUP_TIME_CPU_US = {'x86_64': 5500...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Test that the process startup time up to socket bind is within spec.""" import json import os import platform import time import host_tools.logging as log_tools MAX_STARTUP_TIME_CPU_US = {'x86_64': 5500...
Python
0
0a80fa2e610637a6c657f99c8eac5d99e33b5844
Use /usr/bin/env in #!
lines2jsonarray.py
lines2jsonarray.py
#!/usr/bin/env python from __future__ import print_function import sys print('[') for i, line in enumerate(sys.stdin): if i != 0: print(',') print(line) print(']')
#!/usr/bin/python from __future__ import print_function import sys print('[') for i, line in enumerate(sys.stdin): if i != 0: print(',') print(line) print(']')
Python
0
6cae1c77094f91443781f33b04abe96541739599
hello2
robo/test/visual_test.py
robo/test/visual_test.py
import GPy import matplotlib; matplotlib.use('GTKAgg') import matplotlib.pyplot as plt import numpy as np import os from robo.models.GPyModel import GPyModel from robo.acquisition.EI import EI from robo.maximizers.maximize import stochastic_local_search from robo.recommendation.incumbent import compute_incumbent from r...
import GPy import matplotlib; matplotlib.use('GTKAgg') import matplotlib.pyplot as plt import numpy as np import os from robo.models.GPyModel import GPyModel from robo.acquisition.EI import EI from robo.maximizers.maximize import stochastic_local_search from robo.recommendation.incumbent import compute_incumbent from r...
Python
0.999986
14884a18b42dab22e5893c619164049a475888cc
fix traceback on bank accounts creation
addons/account_bank_statement_import/wizard/setup_wizards.py
addons/account_bank_statement_import/wizard/setup_wizards.py
# -*- coding: utf-8 -*- from odoo import models, fields, api class SetupBarBankConfigWizard(models.TransientModel): _inherit = 'account.setup.bank.manual.config' def validate(self): """ Default the bank statement source of new bank journals as 'file_import' """ super(SetupBarBankConf...
# -*- coding: utf-8 -*- from odoo import models, fields, api class SetupBarBankConfigWizard(models.TransientModel): _inherit = 'account.setup.bank.manual.config' def validate(self): """ Default the bank statement source of new bank journals as 'file_import' """ super(SetupBarBankConf...
Python
0.000001
0b707c137aef4c6ad6ddd27b00585388b152666c
fix skitaid shutdown
skitai/skitaid.py
skitai/skitaid.py
#!/usr/bin/python3 # 2014. 12. 9 by Hans Roh hansroh@gmail.com __version__ = "0.8.8.1" version_info = tuple (map (lambda x: not x.isdigit () and x or int (x), __version__.split ("."))) import sys import subprocess import os import signal import time from aquests.lib import confparse, logger, flock, pathtool from s...
#!/usr/bin/python3 # 2014. 12. 9 by Hans Roh hansroh@gmail.com __version__ = "0.8.8.1" version_info = tuple (map (lambda x: not x.isdigit () and x or int (x), __version__.split ("."))) import sys import subprocess import os import signal import time from aquests.lib import confparse, logger, flock, pathtool from s...
Python
0.000015
8fbdced7a4c8ea61116e8c978e420c30b8a1f1dc
update for urls.py
slothauth/urls.py
slothauth/urls.py
from django.conf.urls import include, url from rest_framework.routers import DefaultRouter from .views import change_email, login, logout, password_reset, profile, signup, passwordless_signup,\ passwordless_login, AccountViewSet, AuthViewSet from . import settings router = DefaultRouter() router....
from django.conf.urls import include, url from rest_framework.routers import DefaultRouter from .views import change_email, login, logout, password_reset, profile, signup, passwordless_signup,\ passwordless_login, AccountViewSet, AuthViewSet from . import settings router = DefaultRouter() router....
Python
0
ac765968a9a83685c28244200958164d2a0fc81e
fix typo
smartmin/email.py
smartmin/email.py
from django.conf import settings from django.template import Context from django.utils.module_loading import import_string def link_components(request, user=None): protocol = 'https' if request.is_secure() else 'http' hostname = getattr(settings, 'HOSTNAME', request.get_host()) return {"protocol": proto...
from django.conf import settings from django.template import Context from django.utils.module_loading import import_string def link_components(request, user=None): protocol = 'https' if request.is_secure() else 'http' hostname = getattr(settings, 'HOSTNAME', request.get_host()) return {"protocol": proto...
Python
0.999991
091735fce650d6326e73ca6fb224a77ae68bb601
Add data written to message
salaryzenaggr/manager.py
salaryzenaggr/manager.py
# -*- coding: utf-8 -*- # 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, softw...
# -*- coding: utf-8 -*- # 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, softw...
Python
0.000007
1dd8ce20632d8a6b857a06136b89ac11b27c8f07
Update documentation
letters/models.py
letters/models.py
from django.db import models from common.models import Citation class Letter(models.Model): """A letter from one of Pliny's books of personal correspondence Attributes: book (PositiveSmallIntegerField): book number. manuscript_correspondent_name (CharField): override if manuscript ...
from django.db import models from common.models import Citation class Letter(models.Model): """A letter from one of Pliny's books of personal correspondence""" book = models.PositiveSmallIntegerField() manuscript_correspondent_name = models.CharField(blank=True, max_length=255) letter = models.Positiv...
Python
0
e7f5efafbdbd674adfb60bbadac6665860dd23a0
Update __main__.py
snake/__main__.py
snake/__main__.py
import argparse import sys from .assembler import Assembler from .vm import System def assembler(): parser = argparse.ArgumentParser(description='A 2 pass assembler.', formatter_class=argparse.ArgumentDefaultsHelpFormatter) # Take action depending on whether or not this is being pipelined if...
import argparse import sys from .assembler import Assembler from .vm import System def assembler(): parser = argparse.ArgumentParser(description='A 2 pass assembler.', formatter_class=argparse.ArgumentDefaultsHelpFormatter) # Take action depending on whether or not this is being pipelined if...
Python
0.000063
c1be270c96ef07faa7ceecf4117890ce06af65a8
Update setup.py
wrappers/python/setup.py
wrappers/python/setup.py
from setuptools import setup, find_packages from setuptools.dist import Distribution # _version.py should be generated by running find_librs_version.py and copied to pyrealsense2 folder from pyrealsense2._version import __version__ import os import io package_name = "pyrealsense2" package_data = {} print("version =...
from setuptools import setup, find_packages from setuptools.dist import Distribution # _version.py should be generated by running find_librs_version.py and copied to pyrealsense2 folder from pyrealsense2._version import __version__ import os import io package_name = "pyrealsense2" package_data = {} print("version =...
Python
0.000001
26af472f187de01f6e0d8d609f2d857e6557c984
allow case insensitive menu in top url only
mapannotations/urls.py
mapannotations/urls.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2016 University of Dundee. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2016 University of Dundee. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your...
Python
0
c56466243a582acde695ebb2a75d709a4b7672b3
Reduce lines
Solver/Beginner/WhiteFaceSolver.py
Solver/Beginner/WhiteFaceSolver.py
from .. import Solver from Move import Move class WhiteFaceSolver(Solver): def solution(self): solution = [] # There are 4 down-corners for i in range(4): front_color = self.cube.cubies['F'].facings['F'] right_color = self.cube.cubies['R'].facings['R'] g...
from .. import Solver from Move import Move class WhiteFaceSolver(Solver): def solution(self): solution = [] # There are 4 down-corners for i in range(4): front_color = self.cube.cubies['F'].facings['F'] right_color = self.cube.cubies['R'].facings['R'] g...
Python
0.999865
60ccc393fc428d609e772b838c5a4c4002e3ec49
Add sendError method
snp/SNProtocol.py
snp/SNProtocol.py
from twisted.internet import defer from twisted.protocols.basic import NetstringReceiver import json class SNError(Exception): def __init__(self, *args, **kwargs): Exception.__init__(self, args, kwargs) self.code = args[1] self.request = args[2] class SNProtocol(NetstringReceiver): i...
from twisted.internet import defer from twisted.protocols.basic import NetstringReceiver import json class SNError(Exception): def __init__(self, *args, **kwargs): Exception.__init__(self, args, kwargs) self.code = args[1] self.request = args[2] class SNProtocol(NetstringReceiver): i...
Python
0.000001
b223865ded88b5467c1088abbf628048e39e564c
Test str_cat() schema; use fixtures for exception tests
blaze/expr/tests/test_strings.py
blaze/expr/tests/test_strings.py
import pytest from datashape import dshape from blaze import symbol dshapes = ['var * {name: string}', 'var * {name: ?string}', 'var * string', 'var * ?string', 'string'] lhsrhs_ds = ['var * {name: string, comment: string[25]}', 'var * {name: string[10], comme...
import pytest from datashape import dshape from blaze import symbol dshapes = ['var * {name: string}', 'var * {name: ?string}', 'var * string', 'var * ?string', 'string'] @pytest.mark.parametrize('ds', dshapes) def test_like(ds): t = symbol('t', ds) expr = getattr(...
Python
0
09fffb062b45e4715c092c0899a6d4f89cf0b4e1
Fix toolbarbox test
bokeh/models/tests/test_tools.py
bokeh/models/tests/test_tools.py
from __future__ import absolute_import from bokeh.models.layouts import Box from bokeh.models.tools import Toolbar, ToolbarBox # TODO (bev) validate entire list of props def test_Toolbar(): tb = Toolbar() assert tb.active_drag == 'auto' assert tb.active_scroll == 'auto' assert tb.active_tap == 'aut...
from __future__ import absolute_import from bokeh.models.layouts import Box from bokeh.models.tools import Toolbar, ToolbarBox # TODO (bev) validate entire list of props def test_Toolbar(): tb = Toolbar() assert tb.active_drag == 'auto' assert tb.active_scroll == 'auto' assert tb.active_tap == 'aut...
Python
0.000001
7daf7440b271c923e4a210a47ba4ba87d76181a3
Add more assertions to rendering test
communication/tests.py
communication/tests.py
from communication.mail import SUBJECT, TEXT, HTML, send_email, render_blocks from mock import Mock, patch, sentinel from unittest2 import TestCase from django.template.loader_tags import BlockNode class SendEmailTestCase(TestCase): def setUp(self): patcher = patch('communication.mail.settings') ...
from communication.mail import SUBJECT, TEXT, HTML, send_email, render_blocks from mock import Mock, patch, sentinel from unittest2 import TestCase from django.template.loader_tags import BlockNode class SendEmailTestCase(TestCase): def setUp(self): patcher = patch('communication.mail.settings') ...
Python
0
32720b2cc4e2599a57ddf81ec1d9c334d71b29f1
Add Schedule to the system job migration
awx/main/migrations/0010_v300_create_system_job_templates.py
awx/main/migrations/0010_v300_create_system_job_templates.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.utils.timezone import now from awx.api.license import feature_enabled def create_system_job_templates(apps, schema_editor): ''' Create default system job templates if not present. Create default sche...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.utils.timezone import now from awx.api.license import feature_enabled def create_system_job_templates(apps, schema_editor): ''' Create default system job templates if not present. Create default sche...
Python
0
a98ebc7728947e77d92378cdf867c500212738ca
Update dbx_email_alerts.py
Sharing/dbx_email_alerts.py
Sharing/dbx_email_alerts.py
#install the dropbox SDK with 'pip install dropbox' import dropbox import datetime import time import smtplib import requests #requires Dropbox Business API token with 'Team Auditing' permission token = "<enter token here>" cursor = None # instantiating dropbox team object dbxt = dropbox.DropboxTeam(token) # Full li...
#install the dropbox SDK with 'pip install dropbox' import dropbox import datetime import time import smtplib import requests #requires Dropbox Business API token with 'Team Auditing' permission token = "<enter token here>" cursor = None # instantiating dropbox team object dbxt = dropbox.DropboxTeam(token) # Full li...
Python
0.000006
9fbab30f5d32d96460c7c8188f21a94aa050e0cb
add baomihua.com
extractors/baomihua.py
extractors/baomihua.py
#!/usr/bin/env python3 import re import sys import json sys.path.append('..') from define import * from utils import * from extractor import BasicExtractor import urllib.parse class BaoMiHuaExtractor(BasicExtractor): ''' ku6下载器 ''' def __init__(self,c): super(BaoMiHuaExtractor,self).__init__(c, BAOMIHUA) def d...
#!/usr/bin/env python3
Python
0.000001
edb1c61a7ded49b63e272bd409fcbf6468173948
remove comment
bitbots_head_behavior/src/bitbots_head_behavior/head_node.py
bitbots_head_behavior/src/bitbots_head_behavior/head_node.py
#!/usr/bin/env python3 """ This is the ROS-Node which contains the head behavior, starts the appropriate DSD, initializes the HeadBlackboard and subscribes to head_behavior specific ROS-Topics. """ import os import rospy from bitbots_blackboard.blackboard import HeadBlackboard from dynamic_stack_decider.dsd import DS...
#!/usr/bin/env python3 """ This is the ROS-Node which contains the head behavior, starts the appropriate DSD, initializes the HeadBlackboard and subscribes to head_behavior specific ROS-Topics. """ import os import rospy from bitbots_blackboard.blackboard import HeadBlackboard from dynamic_stack_decider.dsd import DS...
Python
0
a65c57b85ecd57fdb8d0521c1b6ce3ecda5d3916
Add library to list of types to upgrade.
src/encoded/commands/upgrade.py
src/encoded/commands/upgrade.py
"""\ Run this to upgrade the site. Examples To update on the production server: %(prog)s production.ini For the development.ini you must supply the paster app name: %(prog)s development.ini --app-name app """ from contextlib import contextmanager import logging EPILOG = __doc__ logger = logging.getLogge...
"""\ Run this to upgrade the site. Examples To update on the production server: %(prog)s production.ini For the development.ini you must supply the paster app name: %(prog)s development.ini --app-name app """ from contextlib import contextmanager import logging EPILOG = __doc__ logger = logging.getLogge...
Python
0
f93ce7ca0c73946e1997572576b28436d53ef970
Update to V2 API
salt/modules/opsgenie.py
salt/modules/opsgenie.py
# -*- coding: utf-8 -*- ''' Module for sending data to OpsGenie .. versionadded:: 2018.3.0 :configuration: This module can be used in Reactor System for posting data to OpsGenie as a remote-execution function. For example: .. code-block:: yaml opsgenie_event_poster: local.opsgenie.pos...
# -*- coding: utf-8 -*- ''' Module for sending data to OpsGenie .. versionadded:: 2018.3.0 :configuration: This module can be used in Reactor System for posting data to OpsGenie as a remote-execution function. For example: .. code-block:: yaml opsgenie_event_poster: local.opsgenie.pos...
Python
0
0fceb297dc4855cd5617daaf9821fb3a332c19ed
Fix descriptions
mediacrush/slimdown.py
mediacrush/slimdown.py
from functools import partial from markdown import Markdown, odict from markdown.blockprocessors import build_block_parser from markdown.preprocessors import build_preprocessors from markdown.inlinepatterns import build_inlinepatterns from markdown.treeprocessors import build_treeprocessors slimdown = Markdown(safe_m...
from functools import partial from markdown import Markdown, odict from markdown.blockprocessors import build_block_parser from markdown.preprocessors import build_preprocessors from markdown.inlinepatterns import build_inlinepatterns from markdown.treeprocessors import build_treeprocessors slimdown = Markdown(safe_m...
Python
0.00079
2871d4d45c70cb3619bbf12ed77a8a94e038702e
Set default language to finnish should the mail be sent to admins
ckanext/ytp/request/mail.py
ckanext/ytp/request/mail.py
from ckan.lib.i18n import set_lang, get_lang from ckan.lib.mailer import mail_user from pylons import i18n from ckan.common import _ import logging log = logging.getLogger(__name__) _SUBJECT_MEMBERSHIP_REQUEST = lambda: _( "New membership request (%(organization)s)") _MESSAGE_MEMBERSHIP_REQUEST = lambda: _("""\ U...
from ckan.lib.i18n import set_lang, get_lang from ckan.lib.mailer import mail_user from pylons import i18n from ckan.common import _ import logging log = logging.getLogger(__name__) _SUBJECT_MEMBERSHIP_REQUEST = lambda: _( "New membership request (%(organization)s)") _MESSAGE_MEMBERSHIP_REQUEST = lambda: _("""\ U...
Python
0
9f26c83b1ba25d8c64a8e9418310f5dd0e6cb9bd
refactor clean
estudios_socioeconomicos/views.py
estudios_socioeconomicos/views.py
from django.shortcuts import render, get_object_or_404 from django.contrib.auth.decorators import login_required, user_passes_test import django_excel as excel from administracion.models import Escuela, Colegiatura from becas.models import Beca from captura.utils import get_study_info from captura.models import Retro...
import csv import json from collections import OrderedDict from django.shortcuts import render, get_object_or_404 from django.contrib.auth.decorators import login_required, user_passes_test from django.http import HttpResponse from rest_framework.response import Response import django_excel as excel from administrac...
Python
0.000278
a23a1050501563889c2806a514fe2994a2ebe3a8
Add python3 support in example
example/consume_many_csv_files.py
example/consume_many_csv_files.py
from __future__ import print_function from itertools import chain try: from itertools import imap except ImportError: # if python 3 imap = map import karld from karld.path import i_walk_csv_paths def main(): """ Consume many csv files as if one. """ import pathlib input_dir = pathl...
from __future__ import print_function from itertools import chain from itertools import imap import karld from karld.path import i_walk_csv_paths def main(): """ Consume many csv files as if one. """ import pathlib input_dir = pathlib.Path('test_data/things_kinds') # # Use a generator expr...
Python
0.000001
d27c34c65198280e324c37acda7f33ece07c2c92
make text field usage consistnt
examples/plotting/server/markers.py
examples/plotting/server/markers.py
# The plot server must be running # Go to http://localhost:5006/bokeh to view this plot from numpy.random import random from bokeh.plotting import * def mscatter(p, x, y, typestr): p.scatter(x, y, marker=typestr, line_color="#6666ee", fill_color="#ee6666", fill_alpha=0.5, size=12) def mtext(p, x, y,...
# The plot server must be running # Go to http://localhost:5006/bokeh to view this plot from numpy.random import random from bokeh.plotting import * def mscatter(p, x, y, typestr): p.scatter(x, y, marker=typestr, line_color="#6666ee", fill_color="#ee6666", fill_alpha=0.5, size=12) def mtext(p, x, y,...
Python
0.000004
0051b5a5e287057cab06452d4f178e4c04cbd0c5
Put the win_osinfo classes in a helper function
salt/utils/win_osinfo.py
salt/utils/win_osinfo.py
# -*- coding: utf-8 -*- ''' Get Version information from Windows ''' # http://stackoverflow.com/questions/32300004/python-ctypes-getting-0-with-getversionex-function from __future__ import absolute_import # Import Third Party Libs import ctypes try: from ctypes.wintypes import BYTE, WORD, DWORD, WCHAR HAS_WIN3...
# -*- coding: utf-8 -*- ''' Get Version information from Windows ''' # http://stackoverflow.com/questions/32300004/python-ctypes-getting-0-with-getversionex-function from __future__ import absolute_import # Import Third Party Libs import ctypes try: from ctypes.wintypes import BYTE, WORD, DWORD, WCHAR HAS_WIN3...
Python
0.000002
be29826ded5f20f56a7996464a186ccc3f68c0d0
Switch the default backend from amqp:// (deprecated) to rpc://
openquake/engine/celeryconfig.py
openquake/engine/celeryconfig.py
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 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) 2010-2016 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
e79e0240165bf2aa77612be2f1227ca7bb3c5fc7
add empty return docs
lib/ansible/modules/extras/system/make.py
lib/ansible/modules/extras/system/make.py
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Linus Unnebäck <linus@folkdatorn.se> # # This file is part of Ansible # # This module 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 ...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Linus Unnebäck <linus@folkdatorn.se> # # This file is part of Ansible # # This module 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 ...
Python
0.000926
1cc1df8c00a7a956b0a1207f99928f731714541a
add main path reminder in TaskLog
TaskList/TaskLog/TaskLog.py
TaskList/TaskLog/TaskLog.py
#!/usr/bin/python3.4 # -*-coding:Utf-8 -* '''module to manage task running log''' import xml.etree.ElementTree as xmlMod from TaskList.TaskLog.GroupLog import * from Preferences.PresetList.Preset.Preset import * from Preferences.PresetList.Preset.Metapreset import * class TaskLog: '''class to manage task running lo...
#!/usr/bin/python3.4 # -*-coding:Utf-8 -* '''module to manage task running log''' import xml.etree.ElementTree as xmlMod from TaskList.TaskLog.GroupLog import * from Preferences.PresetList.Preset.Preset import * from Preferences.PresetList.Preset.Metapreset import * class TaskLog: '''class to manage task running lo...
Python
0
de2aab06efd9cc5673ad517d453e5f660ef6fcf7
Disable test_socket_ssl timeout test on Windows.
Lib/test/test_socket_ssl.py
Lib/test/test_socket_ssl.py
# Test just the SSL support in the socket module, in a moderately bogus way. import sys from test import test_support import socket # Optionally test SSL support. This requires the 'network' resource as given # on the regrtest command line. skip_expected = not (test_support.is_resource_enabled('network') and ...
# Test just the SSL support in the socket module, in a moderately bogus way. from test import test_support import socket # Optionally test SSL support. This requires the 'network' resource as given # on the regrtest command line. skip_expected = not (test_support.is_resource_enabled('network') and ...
Python
0
32ab2353d7a7f64300445688b0bd583fbe1a13fb
Improve keystone.conf [endpoint_policy] documentation
keystone/conf/endpoint_policy.py
keystone/conf/endpoint_policy.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Python
0.000001
29384b927b620b7e943343409f62511451bb3059
Fix problem with Hopfield energy function for Python 2.7
neupy/algorithms/memory/utils.py
neupy/algorithms/memory/utils.py
from numpy import where, inner from numpy.core.umath_tests import inner1d __all__ = ('sign2bin', 'bin2sign', 'hopfield_energy') def sign2bin(matrix): return where(matrix == 1, 1, 0) def bin2sign(matrix): return where(matrix == 0, -1, 1) def hopfield_energy(weight, input_data, output_data): return -0...
from numpy import where __all__ = ('sign2bin', 'bin2sign', 'hopfield_energy') def sign2bin(matrix): return where(matrix == 1, 1, 0) def bin2sign(matrix): return where(matrix == 0, -1, 1) def hopfield_energy(weight, input_data, output_data): energy_output = -0.5 * input_data.dot(weight).dot(output_da...
Python
0.001066
bf28376f252fd474d594e5039d0b2f2bb1afc26a
Add proper warnings on use of the backwards compatibility shim.
IPython/frontend.py
IPython/frontend.py
""" Shim to maintain backwards compatibility with old frontend imports. We have moved all contents of the old `frontend` subpackage into top-level subpackages (`html`, `qt` and `terminal`). This will let code that was making `from IPython.frontend...` calls continue working, though a warning will be printed. """ #--...
import sys import types class ShimModule(types.ModuleType): def __getattribute__(self, key): exec 'from IPython import %s' % key return eval(key) sys.modules['IPython.frontend'] = ShimModule('frontend')
Python
0
d8ceaa6cc9e475292633dae3927cf29f3783f9af
Update some comments
conda_tools/updater.py
conda_tools/updater.py
#!/usr/bin/env python # # updater.py # # Updates all packages in all installed conda environments. # This script should be run under the root conda environment. import os.path import subprocess import conda_api from utils import get_root_prefix def update_all(update_root=True, *blacklist_envs): """Updates all c...
#!/usr/bin/env python # # updater.py # # Updates all packages in all installed conda environments. # This script should be run under the root conda environment. import os.path import subprocess import conda_api from utils import get_root_prefix def update_all(update_root=True, *blacklist_envs): """Updates all c...
Python
0
7f800ee03790d28a25f0f5989c8f6a15401af172
remove print statement
django/crashreport/symbols/views.py
django/crashreport/symbols/views.py
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # from django.shortcuts import rende...
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # from django.shortcuts import rende...
Python
0.999999
f782633c857932803283dd9c26621e69f6ccb44e
fix version
l10n_es_aeat_sii/__manifest__.py
l10n_es_aeat_sii/__manifest__.py
# -*- coding: utf-8 -*- # Copyright 2017 Ignacio Ibeas <ignacio@acysos.com> # (c) 2017 Diagram Software S.L. # Copyright (c) 2017-TODAY MINORISA <ramon.guiu@minorisa.net> # (c) 2017 Studio73 - Pablo Fuentes <pablo@studio73.es> # (c) 2017 Studio73 - Jordi Tolsà <jordi@studio73.es> # License AGPL-3.0 or later (http://www...
# -*- coding: utf-8 -*- # Copyright 2017 Ignacio Ibeas <ignacio@acysos.com> # (c) 2017 Diagram Software S.L. # Copyright (c) 2017-TODAY MINORISA <ramon.guiu@minorisa.net> # (c) 2017 Studio73 - Pablo Fuentes <pablo@studio73.es> # (c) 2017 Studio73 - Jordi Tolsà <jordi@studio73.es> # License AGPL-3.0 or later (http://www...
Python
0.000001
7d7b12d176a0315057c54eff794fbe7117c7f6da
Include the Python version in the support tracking data.
reviewboard/admin/support.py
reviewboard/admin/support.py
from __future__ import unicode_literals import base64 import sys import time from datetime import datetime from hashlib import sha1 from django.conf import settings from django.contrib.auth.models import User from djblets.siteconfig.models import SiteConfiguration from reviewboard import get_package_version def ge...
from __future__ import unicode_literals import base64 import time from datetime import datetime from hashlib import sha1 from django.conf import settings from django.contrib.auth.models import User from djblets.siteconfig.models import SiteConfiguration from reviewboard import get_package_version def get_install_k...
Python
0
64d5847f058dec81a288482665a1d8208f0f4e17
Fix security issue in singularity + misc cleanups (#8657)
var/spack/repos/builtin/packages/singularity/package.py
var/spack/repos/builtin/packages/singularity/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
346e6c45b3c2a49168eac9fd1b703bd5c05503b1
fix sql дата начала-создания направления из подверждения исследования
rmis_integration/sql_func.py
rmis_integration/sql_func.py
from django.db import connection from laboratory.settings import TIME_ZONE def get_confirm_direction(d_s, d_e, limit): with connection.cursor() as cursor: cursor.execute( """WITH t_all_direction AS ( SELECT DISTINCT ON (napravleniye_id) napravleniye_id FROM public.dire...
from django.db import connection from laboratory.settings import TIME_ZONE def get_confirm_direction(d_s, d_e, limit): with connection.cursor() as cursor: cursor.execute( """WITH t_all_direction AS ( SELECT DISTINCT ON (napravleniye_id) napravleniye_id FROM public.dire...
Python
0.000076
77ffc94a0439dd7309df0630cddba7daf60bc5ee
Add imported requests to Audit context.
src/ggrc/converters/requests.py
src/ggrc/converters/requests.py
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: silas@reciprocitylabs.com # Maintained By: silas@reciprocitylabs.com from .base import * from ggrc.models import Audit, Request from .base_row impo...
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: silas@reciprocitylabs.com # Maintained By: silas@reciprocitylabs.com from .base import * from ggrc.models import Request from .base_row import * fr...
Python
0
d4c98e176833a4b37b7edf1d68741bcfa8c50213
Return the name_sha of each flaky test in build_flaky_tests
changes/api/build_flaky_tests.py
changes/api/build_flaky_tests.py
from __future__ import absolute_import from sqlalchemy.orm import joinedload from changes.api.base import APIView from changes.config import db from changes.constants import Result from changes.models.build import Build from changes.models.job import Job from changes.models.phabricatordiff import PhabricatorDiff from...
from __future__ import absolute_import from sqlalchemy.orm import joinedload from changes.api.base import APIView from changes.config import db from changes.constants import Result from changes.models.build import Build from changes.models.job import Job from changes.models.phabricatordiff import PhabricatorDiff from...
Python
0.05876
3b950782e0f4140715084ebace2820db4f61c600
Fix reindent-rst.py: it works on binary files
Tools/scripts/reindent-rst.py
Tools/scripts/reindent-rst.py
#!/usr/bin/env python # Make a reST file compliant to our pre-commit hook. # Currently just remove trailing whitespace. import sys, re, shutil ws_re = re.compile(br'\s+(\r?\n)$') def main(argv=sys.argv): rv = 0 for filename in argv[1:]: try: with open(filename, 'rb') as f: ...
#!/usr/bin/env python # Make a reST file compliant to our pre-commit hook. # Currently just remove trailing whitespace. import sys, re, shutil ws_re = re.compile(r'\s+(\r?\n)$') def main(argv=sys.argv): rv = 0 for filename in argv[1:]: try: with open(filename, 'rb') as f: ...
Python
0.000008
4eb100414a139d15d55bc752965d81e96bf5404d
Refactor from review
src/globus_cli/login_manager.py
src/globus_cli/login_manager.py
import functools import click from .tokenstore import token_storage_adapter class LoginManager: def __init__(self): self._token_storage = token_storage_adapter() def has_login(self, resource_server: str): """ Determines if the user has a refresh token for the given resource ...
import functools import click from .tokenstore import token_storage_adapter class LoginManager: def __init__(self): self._token_storage = token_storage_adapter() def has_login(self, resource_server: str): """ Determines if the user has a refresh token for the given resource ...
Python
0
5221630769f53853fea490e04301c2a19711894c
Fix #296. Generate name according to profile's sex. Thanks @Dutcho for the report
faker/providers/profile/__init__.py
faker/providers/profile/__init__.py
# coding=utf-8 from .. import BaseProvider import itertools class Provider(BaseProvider): """ This provider is a collection of functions to generate personal profiles and identities. """ def simple_profile(self): """ Generates a basic profile with personal informations """ ...
# coding=utf-8 from .. import BaseProvider import itertools class Provider(BaseProvider): """ This provider is a collection of functions to generate personal profiles and identities. """ def simple_profile(self): """ Generates a basic profile with personal informations """ ...
Python
0.000669
981a74b116081f3ce1d97262c3c88104a953cdf4
Use numpy's float supporting range
saau/sections/misc/header.py
saau/sections/misc/header.py
import matplotlib.pyplot as plt from operator import itemgetter from lxml.etree import fromstring, XMLSyntaxError import numpy as np def parse_lines(lines): for line in lines: try: xml_line = fromstring(line.encode('utf-8')) except XMLSyntaxError: attrs = [] else:...
import matplotlib.pyplot as plt from operator import gt, lt, itemgetter from lxml.etree import fromstring, XMLSyntaxError def frange(start, stop, step): cur = start op = gt if start > stop else lt while op(cur, stop): yield cur cur += step def parse_lines(lines): for line in lines: ...
Python
0.000001
4e2fa3a249b9027f9e50f0f957163cad3bdc28bf
Fix typo
src/gramcore/features/points.py
src/gramcore/features/points.py
"""Functions for extracting interest points. These are applied to numpy.arrays representing images. """ import numpy from skimage import feature def harris(parameters): """Harris interest point operator. It wraps `skimage.feature.harris`. The `threshold`, `eps` and `gaussian_deviation` options are not ...
"""Functions for extracting interest points. These are applied to numpy.arrays representing images. """ import numpy from skimage import feature def harris(parameters): """Harris interest point operator. It wraps `skimage.feature.harris`. The `threshold`, `eps` and `gaussian_deviation` options are not ...
Python
0.999999
f4bbb244716f9471b520f53ebffaf34a31503cd1
Remove unused imports (besides they are Py 2.x only)
Web/scripts/CPWeb/__init__.py
Web/scripts/CPWeb/__init__.py
""" CPWeb - A collection of commonly used routines to produce CoolProp's online documentation ===== """ from __future__ import division, absolute_import, print_function def get_version(): return 5.0 if __name__ == "__main__": print('You are using version %s of the Python package for creating CoolProp\' onli...
""" CPWeb - A collection of commonly used routines to produce CoolProp's online documentation ===== """ from __future__ import division, absolute_import, print_function import codecs import csv import cStringIO def get_version(): return 5.0 if __name__ == "__main__": print('You are using version %s of the...
Python
0