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
00203b7fbf8ed8f8728ce18838acb21eb6224723
Disable unused code
flumotion/test/test_common_vfs.py
flumotion/test/test_common_vfs.py
# -*- Mode: Python; test-case-name: flumotion.test.test_common_planet -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public License v...
# -*- Mode: Python; test-case-name: flumotion.test.test_common_planet -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public License v...
Python
0.000003
ce5f152a5769e90cb87a05a2bcc1beb837d6cdb4
Simplify code
chainer/functions/pooling/pooling_2d.py
chainer/functions/pooling/pooling_2d.py
import collections import numpy from chainer import cuda from chainer import function from chainer.utils import conv from chainer.utils import type_check if cuda.cudnn_enabled: cudnn = cuda.cudnn libcudnn = cudnn.cudnn _cudnn_version = libcudnn.getVersion() def _check_cudnn_acceptable_type(x_dtype): ...
import collections import numpy from chainer import cuda from chainer import function from chainer.utils import conv from chainer.utils import type_check if cuda.cudnn_enabled: cudnn = cuda.cudnn libcudnn = cudnn.cudnn _cudnn_version = libcudnn.getVersion() def _check_cudnn_acceptable_type(x_dtype): ...
Python
0.041259
8a010b6601ecf2eed216b3aa0b604a0985d06544
Update chainer/training/extensions/__init__.py
chainer/training/extensions/__init__.py
chainer/training/extensions/__init__.py
# import classes and functions from chainer.training.extensions._snapshot import snapshot # NOQA from chainer.training.extensions._snapshot import snapshot_object # NOQA from chainer.training.extensions.computational_graph import DumpGraph # NOQA from chainer.training.extensions.evaluator import Evaluator # NOQA fr...
# import classes and functions from chainer.training.extensions._snapshot import snapshot # NOQA from chainer.training.extensions._snapshot import snapshot_object # NOQA from chainer.training.extensions.computational_graph import DumpGraph # NOQA from chainer.training.extensions.evaluator import Evaluator # NOQA fr...
Python
0
105dc001e5e0f2e1e02409cf77e5b31f0df30ffe
put on two lines
core/dbt/task/clean.py
core/dbt/task/clean.py
import os.path import os import shutil from dbt.task.base import ProjectOnlyTask from dbt.logger import GLOBAL_LOGGER as logger class CleanTask(ProjectOnlyTask): def __is_project_path(self, path): proj_path = os.path.abspath('.') return not os.path.commonprefix( [proj_path, os.path.a...
import os.path import os import shutil from dbt.task.base import ProjectOnlyTask from dbt.logger import GLOBAL_LOGGER as logger class CleanTask(ProjectOnlyTask): def __is_project_path(self, path): proj_path = os.path.abspath('.') return not os.path.commonprefix( [proj_path, os.path.a...
Python
0.000006
5860d28e0f8f08f1bf4ca2426c08a83b687f33f8
Fix Python3 issue (#173)
mod/tools/node.py
mod/tools/node.py
"""wrapper for node.js, only check_exists""" import subprocess name = 'node' platforms = ['linux'] optional = True not_found = 'node.js required for emscripten cross-compiling' #------------------------------------------------------------------------------ def check_exists(fips_dir) : try : out = subproce...
"""wrapper for node.js, only check_exists""" import subprocess name = 'node' platforms = ['linux'] optional = True not_found = 'node.js required for emscripten cross-compiling' #------------------------------------------------------------------------------ def check_exists(fips_dir) : try : out = subproce...
Python
0
1794fb8865241e22a5af30020111471ea00a6250
check if you the plugins really need to be reloaded
InvenTree/plugin/admin.py
InvenTree/plugin/admin.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.apps import apps import plugin.models as models def plugin_update(queryset, new_status: bool): """general function for bulk changing plugins""" apps_changed = False # run through all plugins in ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.apps import apps import plugin.models as models def plugin_update(queryset, new_status: bool): """general function for bulk changing plugins""" for model in queryset: model.active = new_statu...
Python
0
0682e3b4ce5a23683ac1bd7d68cb69e3df92cc99
Fix bug when hyp_length == 0
nematus/metrics/sentence_bleu.py
nematus/metrics/sentence_bleu.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division from math import exp from operator import mul from collections import defaultdict from scorer import Scorer from reference import Reference class SentenceBleuScorer(Scorer): """ Scores SmoothedBleuReference objects. """ d...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division from math import exp from operator import mul from collections import defaultdict from scorer import Scorer from reference import Reference class SentenceBleuScorer(Scorer): """ Scores SmoothedBleuReference objects. """ d...
Python
0.00033
86d4b4a241887bfcd990180a6486cb8054bf514c
Add 'TODO' for YAML editor.
core/io/pyslvs_yaml.py
core/io/pyslvs_yaml.py
# -*- coding: utf-8 -*- """YAML format processing function.""" __author__ = "Yuan Chang" __copyright__ = "Copyright (C) 2016-2018" __license__ = "AGPL" __email__ = "pyslvs@gmail.com" from typing import Dict, Any import yaml from core.QtModules import QObject from core import main_window as mn class YamlEditor(QObj...
# -*- coding: utf-8 -*- """YAML format processing function.""" __author__ = "Yuan Chang" __copyright__ = "Copyright (C) 2016-2018" __license__ = "AGPL" __email__ = "pyslvs@gmail.com" import yaml from core.QtModules import QObject from core import main_window as mn class YamlEditor(QObject): """YAML reader and...
Python
0
3747f72e81a3c143145dcbbdcfbfc13b292f19e1
add filter plot test
neurodsp/tests/test_plts_filt.py
neurodsp/tests/test_plts_filt.py
""" test_plts_filt.py Test filtering plots """ import numpy as np from neurodsp.filt import filter_signal from neurodsp.plts.filt import plot_frequency_response def test_plot_frequency_response(): """ Confirm frequency response plotting function works """ # Test plotting through the filter function ...
""" test_burst.py Test burst detection functions """ import os import numpy as np import neurodsp from .util import _load_example_data def test_detect_bursts_dual_threshold(): """ Confirm consistency in burst detection results on a generated neural signal """ # Load data and ground-truth filtered sig...
Python
0
d57c3ad63b737fda4632f5896c8049329bcd4fe2
Make this test work under Windows as well.
Lib/test/test_fpformat.py
Lib/test/test_fpformat.py
''' Tests for fpformat module Nick Mathewson ''' from test_support import run_unittest import unittest from fpformat import fix, sci, NotANumber StringType = type('') # Test the old and obsolescent fpformat module. # # (It's obsolescent because fix(n,d) == "%.*f"%(d,n) and # sci(n,d) =...
''' Tests for fpformat module Nick Mathewson ''' from test_support import run_unittest import unittest from fpformat import fix, sci, NotANumber StringType = type('') # Test the old and obsolescent fpformat module. # # (It's obsolescent because fix(n,d) == "%.*f"%(d,n) and # sci(n,d) =...
Python
0.000001
728012090d3f24411e460b99f68f9b5754d38480
Handle character substitution in html formatter
npc/formatters/html.py
npc/formatters/html.py
""" Markdown formatter for creating a page of characters. Has a single entry point `dump`. """ import codecs import html import markdown import tempfile from .. import util from mako.template import Template def dump(characters, outstream, *, include_metadata=None, metadata=None, prefs=None): """ Create a ma...
""" Markdown formatter for creating a page of characters. Has a single entry point `dump`. """ import html import markdown import tempfile from .. import util from mako.template import Template def dump(characters, outstream, *, include_metadata=None, metadata=None, prefs=None): """ Create a markdown charact...
Python
0.000007
d3c7f5de6a4c1d15ab3ffe19da18faaecd466fb6
replace mysteriously missing haystack settings from staging
tndata_backend/tndata_backend/settings/staging.py
tndata_backend/tndata_backend/settings/staging.py
from .base import * DEBUG = False #DEBUG = True STAGING = True # Site's FQDN and URL. For building links in email. SITE_DOMAIN = "staging.tndata.org" SITE_URL = "https://{0}".format(SITE_DOMAIN) INSTALLED_APPS = INSTALLED_APPS + ( 'debug_toolbar', 'querycount', ) # Just like production, but without the cach...
from .base import * DEBUG = False #DEBUG = True STAGING = True # Site's FQDN and URL. For building links in email. SITE_DOMAIN = "staging.tndata.org" SITE_URL = "https://{0}".format(SITE_DOMAIN) INSTALLED_APPS = INSTALLED_APPS + ( 'debug_toolbar', 'querycount', ) # Just like production, but without the cach...
Python
0.000001
cba82ad3bc1a726402e4193aec8a49a85f9999f0
Add an 'if 0''d block of code to numpy.distutils.log to ignore some log messages. Especially useful to turn on if you're developing by using eggs.
numpy/distutils/log.py
numpy/distutils/log.py
# Colored log, requires Python 2.3 or up. import sys from distutils.log import * from distutils.log import Log as old_Log from distutils.log import _global_log from misc_util import red_text, yellow_text, cyan_text, green_text, is_sequence, is_string def _fix_args(args,flag=1): if is_string(args): return...
# Colored log, requires Python 2.3 or up. import sys from distutils.log import * from distutils.log import Log as old_Log from distutils.log import _global_log from misc_util import red_text, yellow_text, cyan_text, green_text, is_sequence, is_string def _fix_args(args,flag=1): if is_string(args): return...
Python
0
ec4c9a07dc5ca2fab6b341932f65d0cfbd6a332b
Bump version to 1.1
molly/__init__.py
molly/__init__.py
""" Molly Project http://mollyproject.org A framework for creating Mobile Web applications for HE/FE institutions. """ __version__ = '1.1'
""" Molly Project http://mollyproject.org A framework for creating Mobile Web applications for HE/FE institutions. """ __version__ = '1.0'
Python
0
75e61ecf5efebe78676512d714fc7551f3dfac4c
Fix test
src/program/lwaftr/tests/subcommands/generate_binding_table_test.py
src/program/lwaftr/tests/subcommands/generate_binding_table_test.py
""" Test uses "snabb lwaftr generate-configuration" subcommand. Does not need NICs as it doesn't use any network functionality. The command is just to produce a binding table config result. """ from test_env import ENC, SNABB_CMD, BaseTestCase NUM_SOFTWIRES = 10 class TestGenerateBindingTable(BaseTestCase): ge...
""" Test uses "snabb lwaftr generate-binding-table" subcommand. Does not need NICs as it doesn't use any network functionality. The command is just to produce a binding table config result. """ from test_env import ENC, SNABB_CMD, BaseTestCase NUM_SOFTWIRES = 10 class TestGenerateBindingTable(BaseTestCase): ge...
Python
0.000004
224522e88347d4eafd68202222bb83c2d596524b
Modify SCons tools
conda/python-dev/boost_python.py
conda/python-dev/boost_python.py
from types import MethodType import itertools def generate(env): """Add Builders and construction variables to the Environment.""" if not 'boost_python' in env['TOOLS'][:-1]: env.Tool('system') env.AppendUnique(LIBS = ['boost_python']) env.AppendUnique(CPPDEFINES = ['BOOST_PYTHON_D...
from types import MethodType import itertools def generate(env): """Add Builders and construction variables to the Environment.""" if not 'boost_python' in env['TOOLS'][:-1]: env.Tool('system') env.AppendUnique(LIBS = ['boost_python']) env.AppendUnique(CPPDEFINES = ['BOOST_PYTHON_D...
Python
0
1ca5ba7884d35193f0a035b8e8f6ac4ac6032928
stop cycling after applying the forumla
mpexpertadjust.py
mpexpertadjust.py
#!/usr/bin/env python import os, sys, csv import tkinter, tkinter.messagebox STANDARD_FILE='defstd.txt' STANDARD_NAME=0 STANDARD_ELEMENT=1 STANDARD_QTY=2 SAMPLE_NAME=0 SAMPLE_DATE=2 SAMPLE_ELEMENT=4 SAMPLE_QTY=8 OUTPUT_FILE='output.csv' def is_standard(label, element, standards): """Check if a label is a standard...
#!/usr/bin/env python import os, sys, csv import tkinter, tkinter.messagebox STANDARD_FILE='defstd.txt' STANDARD_NAME=0 STANDARD_ELEMENT=1 STANDARD_QTY=2 SAMPLE_NAME=0 SAMPLE_DATE=2 SAMPLE_ELEMENT=4 SAMPLE_QTY=8 OUTPUT_FILE='output.csv' def is_standard(label, element, standards): """Check if a label is a standard...
Python
0
fc22465decac6a33543e5232097af7ea847c4029
Bump version to 1.0.1-machtfit-41
src/oscar/__init__.py
src/oscar/__init__.py
import os # Use 'dev', 'beta', or 'final' as the 4th element to indicate release type. VERSION = (1, 0, 1, 'machtfit', 41) def get_short_version(): return '%s.%s' % (VERSION[0], VERSION[1]) def get_version(): return '{}.{}.{}-{}-{}'.format(*VERSION) # Cheeky setting that allows each template to be acces...
import os # Use 'dev', 'beta', or 'final' as the 4th element to indicate release type. VERSION = (1, 0, 1, 'machtfit', 40) def get_short_version(): return '%s.%s' % (VERSION[0], VERSION[1]) def get_version(): return '{}.{}.{}-{}-{}'.format(*VERSION) # Cheeky setting that allows each template to be acces...
Python
0
14ee6e2e9986c58fdeb8e482f3426b756ab1d2cb
Bump dev version
mtools/version.py
mtools/version.py
#!/usr/bin/env python3 """Mtools version.""" __version__ = '1.7.0-dev'
#!/usr/bin/env python3 """Mtools version.""" __version__ = '1.6.4'
Python
0
f83ce11dccd7209e4c124e9dadbcbbd86568e320
Comment reason why the example is commented out
numba/tests/compile_with_pycc.py
numba/tests/compile_with_pycc.py
import cmath import numpy as np from numba import exportmany, export from numba.pycc import CC # # New API # cc = CC('pycc_test_simple') @cc.export('multf', 'f4(f4, f4)') @cc.export('multi', 'i4(i4, i4)') def mult(a, b): return a * b _two = 2 # This one can't be compiled by the legacy API as it doesn't exec...
import cmath import numpy as np from numba import exportmany, export from numba.pycc import CC # # New API # cc = CC('pycc_test_simple') @cc.export('multf', 'f4(f4, f4)') @cc.export('multi', 'i4(i4, i4)') def mult(a, b): return a * b _two = 2 # This one can't be compiled by the legacy API as it doesn't exec...
Python
0.000008
2f55f00c17b51f24b5407182516c22baead08879
remove BeautifulSoup for now
plugins/slideshare/slideshare.py
plugins/slideshare/slideshare.py
#!/usr/bin/env python import urllib2 import re import urllib import time import sha #import BeautifulSoup #from BeautifulSoup import BeautifulStoneSoup from optparse import OptionParser TOTALIMPACT_SLIDESHARE_KEY = "nyHCUoNM" TOTALIMPACT_SLIDESHARE_SECRET = "z7sRiGCG" SLIDESHARE_DOI_URL = "http://www.slideshare.net...
#!/usr/bin/env python import urllib2 import re import urllib import time import sha import BeautifulSoup from BeautifulSoup import BeautifulStoneSoup from optparse import OptionParser TOTALIMPACT_SLIDESHARE_KEY = "nyHCUoNM" TOTALIMPACT_SLIDESHARE_SECRET = "z7sRiGCG" SLIDESHARE_DOI_URL = "http://www.slideshare.net/a...
Python
0
63a3e6e0c65fa17e6abe58da06b4bdfa20c62bfe
Add onchange for set vector in orders
mx_agent/agent.py
mx_agent/agent.py
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
Python
0
6eedd6e5b96d9ee051e7708c4c127fdfb6c2a92b
modify file : add class Report and Score
NippoKun/report/models.py
NippoKun/report/models.py
from django.contrib.auth.models import User from django.db import models # Create your models here. class Report(models.Model): report_author = models.ForeignKey(User, related_name='report_author') report_title = models.CharField(max_length=50) report_content = models.TextField(max_length=999) creat...
from django.db import models # Create your models here.
Python
0
88d2918606870ef7bdaafda87b37537d21c02036
Extend failed and end with traceback
polyaxon_client/tracking/base.py
polyaxon_client/tracking/base.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import atexit import sys import time from polystores.stores.manager import StoreManager from polyaxon_client import PolyaxonClient, settings from polyaxon_client.exceptions import PolyaxonClientException from polyaxon_client.tra...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import atexit import sys import time from polystores.stores.manager import StoreManager from polyaxon_client import PolyaxonClient, settings from polyaxon_client.exceptions import PolyaxonClientException from polyaxon_client.tra...
Python
0
a2eae87fc76ba1e9fbfa8102c3e19c239445a62a
Fix form retrieval in ModelForm
nazs/web/forms.py
nazs/web/forms.py
from achilles.forms import * # noqa from nazs.models import SingletonModel # Override forms template Form.template_name = 'web/form.html' class ModelForm(ModelForm): def get_form(self, form_data=None, *args, **kwargs): # manage SingletonModels if issubclass(self.form_class.Meta.model, Singleto...
from achilles.forms import * # noqa from nazs.models import SingletonModel # Override forms template Form.template_name = 'web/form.html' class ModelForm(ModelForm): def get_form(self, form_data=None, *args, **kwargs): # manage SingletonModels if issubclass(self.form_class.Meta.model, Singleto...
Python
0.000002
a4ee20e078175c5d75380afca7b02305440ab32f
Add a couple numeric columns to better portray overall performance.
postgresql/test/perf_query_io.py
postgresql/test/perf_query_io.py
#!/usr/bin/env python ## # copyright 2009, James William Pye # http://python.projects.postgresql.org ## # Statement I/O: Mass insert and select performance ## import os import time import sys import decimal def insertSamples(count, insert_records): recs = [ (-3, 123, 0xfffffea023, decimal.Decimal("90900023123.40031...
#!/usr/bin/env python ## # copyright 2009, James William Pye # http://python.projects.postgresql.org ## # Statement I/O: Mass insert and select performance ## import os import time import sys def insertSamples(count, insert_records): recs = [ (-3, 123, 0xfffffea023, 'some_óäæ_thing', 'varying', 'æ') for x in rang...
Python
0
b6dff8fcd7dec56703006f2a7bcf1c8c72d0c21b
FIX price sec. related field as readonly
price_security/models/invoice.py
price_security/models/invoice.py
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import fields, models, api class ac...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import fields, models, api class ac...
Python
0.000003
fb142d3324ca974c9308cb8ab18dd9db2c2aae0b
Use monospace font
editor.py
editor.py
#!/usr/bin/env python import sys import sip sip.setapi('QString', 2) from PyQt4.QtGui import QApplication, QFont, QPlainTextEdit, QSyntaxHighlighter, \ QTextCharFormat, QTextBlockUserData from qutepart.SyntaxHighlighter import SyntaxHighlighter from qutepart.syntax_manager import SyntaxManager def main(): ...
#!/usr/bin/env python import sys import sip sip.setapi('QString', 2) from PyQt4.QtGui import QApplication, QPlainTextEdit, QSyntaxHighlighter, \ QTextCharFormat, QTextBlockUserData from qutepart.SyntaxHighlighter import SyntaxHighlighter from qutepart.syntax_manager import SyntaxManager def main(): if len...
Python
0.000001
a098efa1b69d2de3b1e2437a056b0c6937cbf998
add documentation
src/bat/images.py
src/bat/images.py
#!/usr/bin/python ## Binary Analysis Tool ## Copyright 2012 Armijn Hemel for Tjaldur Software Governance Solutions ## Licensed under Apache 2.0, see LICENSE file for details ''' This is a plugin for the Binary Analysis Tool. It generates images of files, both full files and thumbnails. The files can be used for infor...
#!/usr/bin/python ## Binary Analysis Tool ## Copyright 2012 Armijn Hemel for Tjaldur Software Governance Solutions ## Licensed under Apache 2.0, see LICENSE file for details ''' This is a plugin for the Binary Analysis Tool. It generates images of files, both full files and thumbnails. The files can be used for infor...
Python
0
7a60bd74b3af40223553c64dafed07c46c5db639
add a --jit commandline option
prolog/targetprologstandalone.py
prolog/targetprologstandalone.py
""" A simple standalone target for the prolog interpreter. """ import sys from prolog.interpreter.translatedmain import repl, execute # __________ Entry point __________ from prolog.interpreter.continuation import Engine, jitdriver from prolog.interpreter import term from prolog.interpreter import arithmetic # for...
""" A simple standalone target for the prolog interpreter. """ import sys from prolog.interpreter.translatedmain import repl, execute # __________ Entry point __________ from prolog.interpreter.continuation import Engine from prolog.interpreter import term from prolog.interpreter import arithmetic # for side effec...
Python
0.000002
3f1f86c358efc6d38012191c4b613aa775861805
Fix 'graph3d.py' to read from VTKData directory
Examples/Infovis/Python/graph3d.py
Examples/Infovis/Python/graph3d.py
from vtk import * from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() reader = vtkXGMLReader() reader.SetFileName(VTK_DATA_ROOT + "/Data/Infovis/fsm.gml") reader.Update() strategy = vtkSpanTreeLayoutStrategy() strategy.DepthFirstSpanningTreeOn() view = vtkGraphLayoutView() view.AddRepresentat...
from vtk import * reader = vtkXGMLReader() reader.SetFileName("fsm.gml") reader.Update() strategy = vtkSpanTreeLayoutStrategy() strategy.DepthFirstSpanningTreeOn() view = vtkGraphLayoutView() view.AddRepresentationFromInputConnection(reader.GetOutputPort()) view.SetVertexLabelArrayName("vertex id") view.SetVertexL...
Python
0
0cd2af0f20b6b544f0d36140a098ca8e3058d8fa
Update constants
node/constants.py
node/constants.py
######### KADEMLIA CONSTANTS ########### #: Small number Representing the degree of parallelism in network calls alpha = 3 #: Maximum number of contacts stored in a bucket; this should be an even number k = 8 #: Timeout for network operations (in seconds) rpcTimeout = 5 # Delay between iterations of iterative node ...
######### KADEMLIA CONSTANTS ########### #: Small number Representing the degree of parallelism in network calls alpha = 3 #: Maximum number of contacts stored in a bucket; this should be an even number k = 8 # Delay between iterations of iterative node lookups (for loose parallelism) (in seconds) iterativeLookupDe...
Python
0.000001
8765ac953047ba1c63eb2eb2eb087ba92e9213bc
fix switch template
Firefly/core/templates/__init__.py
Firefly/core/templates/__init__.py
# -*- coding: utf-8 -*- # @Author: Zachary Priddy # @Date: 2016-04-12 13:33:30 # @Last Modified by: Zachary Priddy # @Last Modified time: 2016-04-12 13:33:30 class Templates(object): def __init__(self): self._filepath = 'core/templates/' self._switch_template = self.get_template('switch') def get_tem...
# -*- coding: utf-8 -*- # @Author: Zachary Priddy # @Date: 2016-04-12 13:33:30 # @Last Modified by: Zachary Priddy # @Last Modified time: 2016-04-12 13:33:30 class Templates(object): def __init__(self): self._filepath = 'core/templates/' self._switch_template = self.get_template('switch') def get_tem...
Python
0.000001
85fe9b8b48b565488406343de41fa77b41357e4a
define skip
ooiservices/tests/test_models.py
ooiservices/tests/test_models.py
#!/usr/bin/env python ''' unit testing for the model classes. ''' __author__ = 'M@Campbell' import unittest from flask import url_for from ooiservices.app import create_app, db from ooiservices.app.models import Array, InstrumentDeployment, PlatformDeployment, Stream, \ StreamParameter, User, OperatorEvent, OperatorE...
#!/usr/bin/env python ''' unit testing for the model classes. ''' __author__ = 'M@Campbell' import unittest from flask import url_for from ooiservices.app import create_app, db from ooiservices.app.models import Array, InstrumentDeployment, PlatformDeployment, Stream, \ StreamParameter, User, OperatorEvent, OperatorE...
Python
0.000207
38de795103748ca757a03a62da8ef3d89b0bf682
Fix bug that prevent commands with no values from being added
GoProController/models.py
GoProController/models.py
from django.db import models class Camera(models.Model): ssid = models.CharField(max_length=255) password = models.CharField(max_length=255) date_added = models.DateTimeField(auto_now_add=True) last_attempt = models.DateTimeField(auto_now=True) last_update = models.DateTimeField(null=True, blank=T...
from django.db import models class Camera(models.Model): ssid = models.CharField(max_length=255) password = models.CharField(max_length=255) date_added = models.DateTimeField(auto_now_add=True) last_attempt = models.DateTimeField(auto_now=True) last_update = models.DateTimeField(null=True, blank=T...
Python
0
e1ad05fb19577aa108b94ea500106e36b29915fc
update indentation
amount_raised_by_candidate.py
amount_raised_by_candidate.py
# Written by Jonathan Saewitz, released May 24th, 2016 for Statisti.ca # Released under the MIT License (https://opensource.org/licenses/MIT) import csv, plotly.plotly as plotly, plotly.graph_objs as go, requests from bs4 import BeautifulSoup candidates=[] with open('presidential_candidates.csv', 'r') as f: reader=...
# Written by Jonathan Saewitz, released May 24th, 2016 for Statisti.ca # Released under the MIT License (https://opensource.org/licenses/MIT) import csv, plotly.plotly as plotly, plotly.graph_objs as go, requests from bs4 import BeautifulSoup candidates=[] with open('presidential_candidates.csv', 'r') as f: reader=...
Python
0.000001
e7163abf13e5cec78f3cd894bd3b8393f9cea6d2
Fix counting total samples in cast view.
genome_designer/main/data_util.py
genome_designer/main/data_util.py
""" Common methods for getting data from the backend. These methods are intended to be used by both views.py, which should define only pages, and xhr_handlers.py, which are intended to respond to AJAX requests. This module interacts closely with the ModelViews in model_views.py. """ from collections import defaultdi...
""" Common methods for getting data from the backend. These methods are intended to be used by both views.py, which should define only pages, and xhr_handlers.py, which are intended to respond to AJAX requests. This module interacts closely with the ModelViews in model_views.py. """ from collections import defaultdi...
Python
0
a391da79f8213d26246234e489d0947b8b4b2a82
Update to allo no CSRF when logining in on mobile
OctaHomeCore/authviews.py
OctaHomeCore/authviews.py
from django.contrib.auth import authenticate, login, logout from OctaHomeCore.baseviews import * from OctaHomeCore.models import * from django.views.decorators.csrf import csrf_exempt class handleLoginView(viewRequestHandler): loginToken = '' def handleRequest(self): if self.Request.user.is_authenticated(): r...
from django.contrib.auth import authenticate, login, logout from OctaHomeCore.baseviews import * from OctaHomeCore.models import * class handleLoginView(viewRequestHandler): loginToken = '' def handleRequest(self): if self.Request.user.is_authenticated(): return super(handleLoginView, self).handleRequest() ...
Python
0
caff96633ce29a2139bc61bb5ee333efd69d50ef
Remove default classifier path from default config
processmysteps/default_config.py
processmysteps/default_config.py
""" Base line settings """ CONFIG = { 'input_path': None, 'backup_path': None, 'dest_path': None, 'life_all': None, 'db': { 'host': None, 'port': None, 'name': None, 'user': None, 'pass': None }, # 'preprocess': { # 'max_acc': 30.0 # }, ...
""" Base line settings """ CONFIG = { 'input_path': None, 'backup_path': None, 'dest_path': None, 'life_all': None, 'db': { 'host': None, 'port': None, 'name': None, 'user': None, 'pass': None }, # 'preprocess': { # 'max_acc': 30.0 # }, ...
Python
0.000001
22f9b4bacbb0662d3c4de67218ff43cea9588f66
Add keyword argument handling to unicode decorator
crypto_enigma/utils.py
crypto_enigma/utils.py
#!/usr/bin/env python # encoding: utf8 # Copyright (C) 2015 by Roy Levien. # This file is part of crypto-enigma, an Enigma Machine simulator. # released under the BSD-3 License (see LICENSE.txt). """ Description .. note:: Any additional note. """ from __future__ import (absolute_import, print_function, division...
#!/usr/bin/env python # encoding: utf8 # Copyright (C) 2015 by Roy Levien. # This file is part of crypto-enigma, an Enigma Machine simulator. # released under the BSD-3 License (see LICENSE.txt). """ Description .. note:: Any additional note. """ from __future__ import (absolute_import, print_function, division...
Python
0.000001
d8fc3888f0b40a8b7a476fc3fec0ca3dfe7a2416
make API able to work with single names
gender.py
gender.py
import requests, json def getGenders(names): url = "" cnt = 0 if not isinstance(names,list): names = [names,] for name in names: if url == "": url = "name[0]=" + name else: cnt += 1 url = url + "&name[" + str(cnt) + "]=" + name req = requests.get("http://api.genderize.io?" + url) results = j...
import requests, json def getGenders(names): url = "" cnt = 0 for name in names: if url == "": url = "name[0]=" + name else: cnt += 1 url = url + "&name[" + str(cnt) + "]=" + name req = requests.get("http://api.genderize.io?" + url) results = json.loads(req.text) retrn = [] for result in resu...
Python
0
fc6c6f9ecbf694198c650cf86151423226304c51
put import statement in try
alphatwirl/delphes/load_delphes.py
alphatwirl/delphes/load_delphes.py
# Tai Sakuma <tai.sakuma@cern.ch> try: import ROOT except ImportError: pass _loaded = False ##__________________________________________________________________|| def load_delphes(): global _loaded if _loaded: return # https://root.cern.ch/phpBB3/viewtopic.php?t=21603 ROOT.gInterpret...
# Tai Sakuma <tai.sakuma@cern.ch> import ROOT _loaded = False ##__________________________________________________________________|| def load_delphes(): global _loaded if _loaded: return # https://root.cern.ch/phpBB3/viewtopic.php?t=21603 ROOT.gInterpreter.Declare('#include "classes/DelphesC...
Python
0.000001
1eb648b14c52c9a2e715774ec71b2c8e6228efc4
add vtkNumpy.numpyToImageData() function
src/python/director/vtkNumpy.py
src/python/director/vtkNumpy.py
from director.shallowCopy import shallowCopy import director.vtkAll as vtk from vtk.util import numpy_support import numpy as np def numpyToPolyData(pts, pointData=None, createVertexCells=True): pd = vtk.vtkPolyData() pd.SetPoints(getVtkPointsFromNumpy(pts.copy())) if pointData is not None: for ...
from director.shallowCopy import shallowCopy import director.vtkAll as vtk from vtk.util import numpy_support import numpy as np def numpyToPolyData(pts, pointData=None, createVertexCells=True): pd = vtk.vtkPolyData() pd.SetPoints(getVtkPointsFromNumpy(pts.copy())) if pointData is not None: for ...
Python
0.000004
981e9a2348953374cc18669318d1d7e92197e0e1
Update clinical trials
providers/gov/clinicaltrials/normalizer.py
providers/gov/clinicaltrials/normalizer.py
import pendulum from share.normalize import * class Tag(Parser): name = ctx class ThroughTags(Parser): tag = Delegate(Tag, ctx) class AgentIdentifier(Parser): # email address uri = IRI(ctx) class WorkIdentifier(Parser): uri = IRI(ctx) class AffiliatedAgent(Parser): schema = GuessAgent...
import pendulum from share.normalize import * class Tag(Parser): name = ctx class ThroughTags(Parser): tag = Delegate(Tag, ctx) class AgentIdentifier(Parser): # email address uri = IRI(ctx) class WorkIdentifier(Parser): uri = IRI(ctx) class AffiliatedAgent(Parser): schema = GuessAgent...
Python
0
f95ab3d2e9a9fc7c92698aded033f4860225c718
Add rate reporting for oadoi importer
backend/oadoi.py
backend/oadoi.py
# -*- encoding: utf-8 -*- import gzip import json from django.db import DataError from datetime import datetime from papers.models import Paper from papers.models import OaiSource from papers.baremodels import BareOaiRecord from papers.doi import doi_to_crossref_identifier from papers.doi import doi_to_url from pape...
# -*- encoding: utf-8 -*- import gzip import json from django.db import DataError from papers.models import Paper from papers.models import OaiSource from papers.baremodels import BareOaiRecord from papers.doi import doi_to_crossref_identifier from papers.doi import doi_to_url from papers.doi import to_doi from back...
Python
0
5f522cf58a1566513e874002bdaeb063e8a02497
Update model and add TODO
server/models/checkup.py
server/models/checkup.py
# -*- coding: utf-8 -*- from datetime import datetime from app import db class Checkup(db.Model): __tablename__ = 'checkup' id = db.Column(db.Integer, primary_key=True) created = db.Column(db.DateTime, default=datetime.utcnow) # TODO: add one unique constraint on the column group of owner and repo ...
# -*- coding: utf-8 -*- from datetime import datetime from app import db class Checkup(db.Model): __tablename__ = 'checkup' id = db.Column(db.Integer, primary_key=True) created = db.Column(db.DateTime, default=datetime.utcnow) repo_name = db.Column(db.String, unique=True) # github-user/repo-name ...
Python
0
2f61692dd05f2ef529c9d2556c59eb7bc720b1f7
Fixed? reset password
oclubs/access/email.py
oclubs/access/email.py
#!/usr/bin/env python # -*- coding: UTF-8 -*- # """ Module to send emails. This module sends emails with either Postfix or SendGrid. """ from __future__ import absolute_import, unicode_literals import traceback from envelopes import Envelope, SMTP from oclubs.access.delay import delayed_func from_email = ('no-re...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # """ Module to send emails. This module sends emails with either Postfix or SendGrid. """ from __future__ import absolute_import, unicode_literals import traceback from envelopes import Envelope, SMTP from oclubs.access.delay import delayed_func from_email = ('no-re...
Python
0.999775
fb1ddcdd789d1c1be02a9f6d63a21548a8cf584e
Fix undo of PlatformPhysicsOperation after the SceneNode changes
printer/PlatformPhysicsOperation.py
printer/PlatformPhysicsOperation.py
from UM.Operations.Operation import Operation from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation from UM.Operations.TranslateOperation import TranslateOperation from UM.Operations.GroupedOperation import GroupedOperation ## A specialised operation designed specifically to modify the previous operat...
from UM.Operations.Operation import Operation from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation from UM.Operations.TranslateOperation import TranslateOperation from UM.Operations.GroupedOperation import GroupedOperation ## A specialised operation designed specifically to modify the previous operat...
Python
0
e89c20e1ecfadb7e63a1fe80d821afafb8860352
add missing import
tfx/experimental/templates/taxi/launcher/stub_component_launcher.py
tfx/experimental/templates/taxi/launcher/stub_component_launcher.py
# Lint as: python3 # Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
# Lint as: python3 # Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
Python
0.000042
7f4a02f7058c4e7dfd4bbb01ba847e6990b5e391
update admin
corehq/apps/userreports/admin.py
corehq/apps/userreports/admin.py
from __future__ import absolute_import, unicode_literals from django.contrib import admin from .models import AsyncIndicator, DataSourceActionLog, InvalidUCRData @admin.register(AsyncIndicator) class AsyncIndicatorAdmin(admin.ModelAdmin): model = AsyncIndicator list_display = [ 'doc_id', 'do...
from __future__ import absolute_import, unicode_literals from django.contrib import admin from .models import AsyncIndicator, DataSourceActionLog, InvalidUCRData @admin.register(AsyncIndicator) class AsyncIndicatorAdmin(admin.ModelAdmin): model = AsyncIndicator list_display = [ 'doc_id', 'do...
Python
0
c10f222bb6de5150087a2ddd26ffbef2f8eeb4a3
break down method
corehq/apps/users/permissions.py
corehq/apps/users/permissions.py
from collections import namedtuple from corehq import privileges, toggles from corehq.apps.accounting.utils import domain_has_privilege FORM_EXPORT_PERMISSION = 'corehq.apps.reports.standard.export.ExcelExportReport' DEID_EXPORT_PERMISSION = 'corehq.apps.reports.standard.export.DeidExportReport' CASE_EXPORT_PERMISSIO...
from collections import namedtuple from corehq import privileges, toggles from corehq.apps.accounting.utils import domain_has_privilege FORM_EXPORT_PERMISSION = 'corehq.apps.reports.standard.export.ExcelExportReport' DEID_EXPORT_PERMISSION = 'corehq.apps.reports.standard.export.DeidExportReport' CASE_EXPORT_PERMISSIO...
Python
0.028979
57e610836297ef136b892ea1cdea5fe9109c45fa
Change the way that test objects are named.
integration/testing.py
integration/testing.py
# Copyright (c) 2016 Canonical Ltd # # 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 ...
# Copyright (c) 2016 Canonical Ltd # # 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 ...
Python
0.000002
67e3a95d7c3227da0b8a06dc29f0e9e868e55153
Check file size before calculating md5sum.
danbooru/downloader.py
danbooru/downloader.py
# -*- coding: utf-8 -*- # Copyright 2012 codestation # # 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 app...
# -*- coding: utf-8 -*- # Copyright 2012 codestation # # 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 app...
Python
0
5450303c975e34265f6fda3c014b9aed7d002a3c
Fix download path, the existing one has been removed from nvidia's site (#10253)
var/spack/repos/builtin/packages/cudnn/package.py
var/spack/repos/builtin/packages/cudnn/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Cudnn(Package): """NVIDIA cuDNN is a GPU-accelerated library of primitives for deep ne...
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Cudnn(Package): """NVIDIA cuDNN is a GPU-accelerated library of primitives for deep ne...
Python
0
bb042f7bd76e364c3be6791c580b9426a4007627
fix url and add shared variant (#5358)
var/spack/repos/builtin/packages/latte/package.py
var/spack/repos/builtin/packages/latte/package.py
############################################################################## # Copyright (c) 2017, Los Alamos National Security, LLC # Produced at the Los Alamos National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # # For details, ...
############################################################################## # Copyright (c) 2017, Los Alamos National Security, LLC # Produced at the Los Alamos National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # # For details, ...
Python
0
08b5b565666d42a6802e136fc8e7cf8d355929b0
add v2019.1 and v2020.1 (#17648)
var/spack/repos/builtin/packages/qhull/package.py
var/spack/repos/builtin/packages/qhull/package.py
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Qhull(CMakePackage): """Qhull computes the convex hull, Delaunay triangulation, Voronoi ...
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Qhull(CMakePackage): """Qhull computes the convex hull, Delaunay triangulation, Voronoi ...
Python
0
1f6b1d2aca3995a4ac295f7e6a8ab6bf84d6e79b
add logging for ShotDetectorPlotService
shot_detector/services/shot_detector_service.py
shot_detector/services/shot_detector_service.py
# -*- coding: utf8 -*- from __future__ import absolute_import, division, print_function import logging from shot_detector.detectors import SimpleDetector from .base_detector_service import BaseDetectorService from .plot_service import PlotService from shot_detector.utils.common import yes_no from shot_detector.ut...
# -*- coding: utf8 -*- from __future__ import absolute_import, division, print_function import time from shot_detector.detectors import SimpleDetector from .base_detector_service import BaseDetectorService from .plot_service import PlotService from shot_detector.utils.common import yes_no class ShotDetectorPlotSer...
Python
0
6f05fa90a2134c24c753a50a43e91522531c72b6
update update
wsgi/usgs_update_02.py
wsgi/usgs_update_02.py
#!/usr/bin/env python # Parse USGS JSON files # Populates the sites using the original URL requests # USGS site doesn't seem to let you just dump everything # For this purpose we use the hydrological are # This value goes from 01 to 21 and makes it easy to construct a series of operations # This version creates a cus...
# Parse USGS JSON files # Populates the sites using the original URL requests # USGS site doesn't seem to let you just dump everything # For this purpose we use the hydrological are # This value goes from 01 to 21 and makes it easy to construct a series of operations # This version creates a customized dump because Mo...
Python
0.000001
251e11ef777ece9542b21af1ed43fa580c2186b3
Bump to 2.1.2
opencanada/__init__.py
opencanada/__init__.py
from django.utils.version import get_version VERSION = (2, 1, 2, 'final', 0) __version__ = get_version(VERSION)
from django.utils.version import get_version VERSION = (2, 1, 1, 'final', 0) __version__ = get_version(VERSION)
Python
0.000219
212d6bbc559c0a7fab74bff647a49817384e10ff
substitute {format} with json in oembed_url
embeddit/__init__.py
embeddit/__init__.py
import os import re import json import requests import fnmatch from urllib import urlencode from BeautifulSoup import BeautifulSoup _ROOT = os.path.abspath(os.path.dirname(__file__)) invalid_url = {'error': 'Invalid URL'} unreachable = {'error': 'Failed to reach the URL'} empty_meta = {'error': 'Found no meta info f...
import os import re import json import requests import fnmatch from urllib import urlencode from BeautifulSoup import BeautifulSoup _ROOT = os.path.abspath(os.path.dirname(__file__)) invalid_url = {'error': 'Invalid URL'} unreachable = {'error': 'Failed to reach the URL'} empty_meta = {'error': 'Found no meta info f...
Python
0.000079
baa024a9e09607f8295cfe526a9eb25906aca806
modify the filename
PyStudy/loadfile_speed.py
PyStudy/loadfile_speed.py
#!/usr/bin/env python import datetime count = 0 begin_time = datetime.datetime.now() def readInChunks(fileObj, chunkSize=2048): """ Lazy function to read a file piece by piece. Default chunk size: 2kB. """ while True: data = fileObj.read(chunkSize) if not data: break ...
#!/usr/bin/env python import datetime count = 0 begin_time = datetime.datetime.now() def readInChunks(fileObj, chunkSize=2048): """ Lazy function to read a file piece by piece. Default chunk size: 2kB. """ while True: data = fileObj.read(chunkSize) if not data: break ...
Python
0.999999
211f88cc377b0d9432258d0ebc3fdc2ebd54302f
EDIT requirements updated. imports updated
nsaba/geneinfo.py
nsaba/geneinfo.py
""" geneinfo.py: methods for querying, saving and loading gene information for NIH database. Author: Torben Noto """ import pandas as pd import os import random import urllib2 from bs4 import BeautifulSoup from time import sleep from collections import namedtuple def gene_info(eid): """ Pulls gene data based...
""" geneinfo.py: methods for querying, saving and loading gene information for NIH database. Author: Torben Noto """ import pandas as pd import os import random import urllib2 from BeautifulSoup import BeautifulSoup from time import sleep from collections import namedtuple def gene_info(eid): """ Pulls gene ...
Python
0.00325
96e26b74851c0b54493f3c269ceefb6b2ae53e7d
implement fromXml toXml and defaultInit method of Resolution class
settingMod/Resolution.py
settingMod/Resolution.py
#!/usr/bin/python3.4 # -*-coding:Utf-8 -* '''module to manage resolution settings''' import xml.etree.ElementTree as xmlMod from settingMod.Size import * import os class Resolution: '''class to manage resolution settings''' def __init__(self, xml= None): '''initialize resolution settings with default value or ...
#!/usr/bin/python3.4 # -*-coding:Utf-8 -* '''module to manage resolution settings''' import xml.etree.ElementTree as xmlMod from settingMod.Size import * import os class Resolution: '''class to manage resolution settings''' def __init__(self, xml= None): '''initialize resolution settings with default value or ...
Python
0
44dcbfe606377331a40777a7b387768c816b0e61
Increment to .2.11 for new package
nymms/__init__.py
nymms/__init__.py
__version__ = '0.2.11'
__version__ = '0.2.10'
Python
0.000017
e3a93aff39ed4a876bdfabd5e62271bce9fe11e9
remove unused analyzers import clause
src/cmdlr/amgr.py
src/cmdlr/amgr.py
"""Cmdlr analyzers holder and importer.""" import importlib import pkgutil import os import sys import functools import re from .exception import NoMatchAnalyzer from .exception import ExtraAnalyzersDirNotExists from .exception import AnalyzerRuntimeError class AnalyzerManager: """Import, active, dispatch and h...
"""Cmdlr analyzers holder and importer.""" import importlib import pkgutil import os import sys import functools import re from . import analyzers as _analyzers # NOQA from .exception import NoMatchAnalyzer from .exception import ExtraAnalyzersDirNotExists from .exception import AnalyzerRuntimeError class Analyzer...
Python
0.000001
7095380ff71947f76ff60765e699da8e31fde944
Build - remove dir directory - not used
project_generator/commands/build.py
project_generator/commands/build.py
# Copyright 2015 0xc0170 # # 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, soft...
# Copyright 2015 0xc0170 # # 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, soft...
Python
0
9ec02a7cc31766d2b0d46547addddc0ca350e8ed
make pylint even more happy
neuralmonkey/runners/perplexity_runner.py
neuralmonkey/runners/perplexity_runner.py
""" This module contains an implementation of a runner that is supposed to be used in case we train a language model. Instead of decoding sentences in computes its perplexities given the decoder. """ #tests: lint from neuralmonkey.learning_utils import feed_dicts #pylint: disable=too-few-public-methods class Perplexi...
""" This module contains an implementation of a runner that is supposed to be used in case we train a language model. Instead of decoding sentences in computes its perplexities given the decoder. """ #tests: lint from neuralmonkey.learning_utils import feed_dicts class PerplexityRunner(object): def __init__(self,...
Python
0.000001
1fc9561148402c4eb558d183f4d8f3ecce0a0330
Set version to 0.4.1
alignak_backend/__init__.py
alignak_backend/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Alignak REST backend """ # Application manifest VERSION = (0, 4, 1) __application__ = u"Alignak_Backend" __version__ = '.'.join((str(each) for each in VERSION[:4])) __author__ = u"Alignak team" __copyright__ = u"(c) 2015 - %s" % __author__ __license__ = u"GNU Affero ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Alignak REST backend """ # Application manifest VERSION = (0, 4, 0) __application__ = u"Alignak_Backend" __version__ = '.'.join((str(each) for each in VERSION[:4])) __author__ = u"Alignak team" __copyright__ = u"(c) 2015 - %s" % __author__ __license__ = u"GNU Affero ...
Python
0
e77381b087acd935bc3dae1f6c2e809970506db9
remove SECRET_KEY, again
bepasty/config.py
bepasty/config.py
# Copyright: 2013 Bastian Blank <bastian@waldi.eu.org> # License: BSD 2-clause, see LICENSE for details. class Config(object): """This is the basic configuration class for bepasty.""" #: name of this site (put YOUR bepasty fqdn here) SITENAME = 'bepasty.example.org' UPLOAD_UNLOCKED = True """ ...
# Copyright: 2013 Bastian Blank <bastian@waldi.eu.org> # License: BSD 2-clause, see LICENSE for details. class Config(object): """This is the basic configuration class for bepasty.""" #: name of this site (put YOUR bepasty fqdn here) SITENAME = 'bepasty.example.org' UPLOAD_UNLOCKED = True """ ...
Python
0.000007
fd9039ac78985fc5f06f3f01bfafeacdb22f354b
Create sortable tables within the excel sheets
src/spz/spz/tables.py
src/spz/spz/tables.py
# -*- coding: utf-8 -*- """Table export utility. Used to format course lists for download. """ import csv import io from tempfile import NamedTemporaryFile from openpyxl import Workbook from openpyxl.worksheet.table import Table from flask import make_response, url_for, redirect, flash def expo...
# -*- coding: utf-8 -*- """Table export utility. Used to format course lists for download. """ import csv import io from tempfile import NamedTemporaryFile from openpyxl import Workbook from flask import make_response, url_for, redirect, flash def export_course_list(courses, format): if for...
Python
0.000002
b8e53ed353bf28bc1e532ae1577bf4a8b4ce976f
Add missing import
hackeriet/cardreaderd/__init__.py
hackeriet/cardreaderd/__init__.py
#!/usr/bin/env python from hackeriet import mifare from hackeriet.mqtt import MQTT from hackeriet.door import users import os, logging, time logging.basicConfig(level=logging.INFO, format='%(asctime)-15s %(message)s') door_name = os.getenv("DOOR_NAME", 'hackeriet') door_topic = "hackeriet/door/%s/open" % door_name do...
#!/usr/bin/env python from hackeriet import mifare from hackeriet.mqtt import MQTT from hackeriet.door import users import os, logging logging.basicConfig(level=logging.INFO, format='%(asctime)-15s %(message)s') door_name = os.getenv("DOOR_NAME", 'hackeriet') door_topic = "hackeriet/door/%s/open" % door_name door_tim...
Python
0.000466
2e042201d6c0e0709d7056d399052389d1ea54b0
Move imports inside initialize() method so that we don’t break things on initial setup.
shopify_auth/__init__.py
shopify_auth/__init__.py
VERSION = (0, 1, 6) __version__ = '.'.join(map(str, VERSION)) __author__ = 'Gavin Ballard' def initialize(): import shopify from django.conf import settings from django.core.exceptions import ImproperlyConfigured if not settings.SHOPIFY_APP_API_KEY or not settings.SHOPIFY_APP_API_SECRET: ...
import shopify from django.conf import settings from django.core.exceptions import ImproperlyConfigured VERSION = (0, 1, 5) __version__ = '.'.join(map(str, VERSION)) __author__ = 'Gavin Ballard' def initialize(): if not settings.SHOPIFY_APP_API_KEY or not settings.SHOPIFY_APP_API_SECRET: raise Imp...
Python
0
40d59c44f8488ab6445b626637bfb3135cbbfd56
Clean up Firefox WebDriver constructor
py/selenium/webdriver/firefox/webdriver.py
py/selenium/webdriver/firefox/webdriver.py
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
Python
0.000007
c33b23e1d5263321cc29e2fe1f9871e36d97c5e5
add method get on opps db redis
opps/db/_redis.py
opps/db/_redis.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from opps.db.conf import settings from redis import ConnectionPool from redis import Redis as RedisClient class Redis: def __init__(self, key_prefix, key_sufix): self.key_prefix = key_prefix self.key_sufix = key_sufix self.host = settings.OPPS...
#!/usr/bin/env python # -*- coding: utf-8 -*- from opps.db.conf import settings from redis import ConnectionPool from redis import Redis as RedisClient class Redis: def __init__(self, key_prefix, key_sufix): self.key_prefix = key_prefix self.key_sufix = key_sufix self.host = settings.OPPS...
Python
0
b03b168cd752d50f1091106d3f4fcc0a79b22203
Fix tests
siyavula/latex2image/tests/latex2image_tests.py
siyavula/latex2image/tests/latex2image_tests.py
# coding=utf-8 from unittest import TestCase from lxml import etree, html from siyavula.latex2image.imageutils import replace_latex_with_images class TestBaseEquationToImageConversion(TestCase): """Test the equation to image conversion.""" def setUp(self): self.element_input = etree.Element('xml') ...
# coding=utf-8 from unittest import TestCase from lxml import etree from siyavula.latex2image.imageutils import replace_latex_with_images class TestBaseEquationToImageConversion(TestCase): """Test the equation to image conversion.""" def setUp(self): self.element_input = etree.Element('xml') ...
Python
0.000003
3fd74018c87ec598de173de7d13224523ee98ec5
update LATEX_SUBS table
IPython/nbconvert/filters/latex.py
IPython/nbconvert/filters/latex.py
"""Latex filters. Module of useful filters for processing Latex within Jinja latex templates. """ #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in th...
"""Latex filters. Module of useful filters for processing Latex within Jinja latex templates. """ #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in th...
Python
0
e8836b134c47080edaf47532d7cb844b307dfb08
Add a guard against the task list changing when shutting down (#776)
zeroconf/_utils/aio.py
zeroconf/_utils/aio.py
""" Multicast DNS Service Discovery for Python, v0.14-wmcbrine Copyright 2003 Paul Scott-Murphy, 2014 William McBrine This module provides a framework for the use of DNS Service Discovery using IP multicast. This library is free software; you can redistribute it and/or modify it under the terms of...
""" Multicast DNS Service Discovery for Python, v0.14-wmcbrine Copyright 2003 Paul Scott-Murphy, 2014 William McBrine This module provides a framework for the use of DNS Service Discovery using IP multicast. This library is free software; you can redistribute it and/or modify it under the terms of...
Python
0.009597
3989abf6de879af6982a76ea3522f11f789c6569
Increment version for speedup release
MarkovNetwork/_version.py
MarkovNetwork/_version.py
# -*- coding: utf-8 -*- """ Copyright 2016 Randal S. Olson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge...
# -*- coding: utf-8 -*- """ Copyright 2016 Randal S. Olson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge...
Python
0
0a9bd97598bc63450bcf0956242d3b67e2a52d9b
Remove testing code
pysis/reqs/buildings/__init__.py
pysis/reqs/buildings/__init__.py
# -*- encoding: utf-8 -*- from pysis.reqs.base import Request from pysis.resources.buildings import Buildings from pysis.resources.outputs import Outputs from pysis.resources.blastcells import Blastcells from pysis.resources.metrics import Metrics class Get(Request): uri = 'buildings/{id}' resource = Building...
# -*- encoding: utf-8 -*- from pysis.reqs.base import Request from pysis.resources.buildings import Buildings from pysis.resources.outputs import Outputs from pysis.resources.blastcells import Blastcells from pysis.resources.metrics import Metrics class Get(Request): uri = 'buildings/{id}' resource = Building...
Python
0.000002
dddb366dd56b85070d9ab51dab7a9ab7d317d1e5
Include working directory path from settings
src/tenyksafk/main.py
src/tenyksafk/main.py
import sqlite3 from os.path import join from tenyksservice import TenyksService, run_service from tenyksservice.config import settings class AFK(TenyksService): direct_only = False irc_message_filters = { 'depart': [r'^(?i)(xopa|away|afk|brb)'], 'return': [r'^(?i)(xoka|back)'], 'query':...
import sqlite3 from os.path import join from tenyksservice import TenyksService, run_service class AFK(TenyksService): direct_only = False irc_message_filters = { 'depart': [r'^(?i)(xopa|away|afk|brb)'], 'return': [r'^(?i)(xoka|back)'], 'query': [r'(?P<nick>(.*))\?$'], 'list': [...
Python
0
d2ae65564c173789578c0119be7d1143d7c59641
Fix mistaken variable name.
pybtex/style/formatting/__init__.py
pybtex/style/formatting/__init__.py
# Copyright (C) 2006, 2007, 2008, 2009 Andrey Golovizin # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This pr...
# Copyright (C) 2006, 2007, 2008, 2009 Andrey Golovizin # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This pr...
Python
0.000063
43294bc83d013d79d909cadfcf2508aca0c575f6
Fix for bad y param.
exp/sandbox/predictors/profile/DecisionTreeLearnerProfile.py
exp/sandbox/predictors/profile/DecisionTreeLearnerProfile.py
import numpy import logging import sys from apgl.util.ProfileUtils import ProfileUtils from exp.sandbox.predictors.DecisionTreeLearner import DecisionTreeLearner from apgl.data.ExamplesGenerator import ExamplesGenerator from sklearn.tree import DecisionTreeRegressor logging.basicConfig(stream=sys.stdout, level=lo...
import numpy import logging import sys from apgl.util.ProfileUtils import ProfileUtils from exp.sandbox.predictors.DecisionTreeLearner import DecisionTreeLearner from apgl.data.ExamplesGenerator import ExamplesGenerator from sklearn.tree import DecisionTreeRegressor logging.basicConfig(stream=sys.stdout, level=lo...
Python
0
cef60ed7b69b5aec75267ecfa609a5adab9045a8
fix pycodestyle issue.
accelerator/migrations/0005_legalcheck_userlegalcheck.py
accelerator/migrations/0005_legalcheck_userlegalcheck.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-05-14 09:25 from __future__ import unicode_literals import django.db.models.deletion import swapper from django.conf import settings from django.db import ( migrations, models, ) class Migration(migrations.Migration): dependencies = [ (...
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-05-14 09:25 from __future__ import unicode_literals import django.db.models.deletion import swapper from django.conf import settings from django.db import ( migrations, models, ) class Migration(migrations.Migration): dependencies = [ (...
Python
0
505d20b1f4de60bdb13810a989b5ea203553c850
Remove use of np.true_divide
skbio/maths/subsample.py
skbio/maths/subsample.py
#!/usr/bin/env python r""" Subsampling (:mod:`skbio.maths.subsample`) ========================================== .. currentmodule:: skbio.maths.subsample This module provides functionality for subsampling from vectors of counts. Functions --------- .. autosummary:: :toctree: generated/ subsample """ from __...
#!/usr/bin/env python r""" Subsampling (:mod:`skbio.maths.subsample`) ========================================== .. currentmodule:: skbio.maths.subsample This module provides functionality for subsampling from vectors of counts. Functions --------- .. autosummary:: :toctree: generated/ subsample """ from __...
Python
0
3de3e4bf2f0df0d602c2f69dd5a06016bf31eb9d
rebuild checkpoints when something breaks while updating group exports
couchexport/groupexports.py
couchexport/groupexports.py
from couchexport.models import GroupExportConfiguration, SavedBasicExport from couchdbkit.exceptions import ResourceNotFound from datetime import datetime import os import json from couchexport.tasks import Temp, rebuild_schemas from couchexport.export import SchemaMismatchException from dimagi.utils.logging import not...
from couchexport.models import GroupExportConfiguration, SavedBasicExport from couchdbkit.exceptions import ResourceNotFound from datetime import datetime import os import json from couchexport.tasks import Temp def export_for_group(export_id, output_dir): try: config = GroupExportConfiguration.get(export_...
Python
0
1746dad3e5bb218aede86cdb38e458a3f7ce270c
Update Inputkey.py
python/inputkeyboard/Inputkey.py
python/inputkeyboard/Inputkey.py
import sys, tty, termios class _Getch: def __call__(self, a): return self._get_key(a) def _get_key(self, a): fd = sys.stdin.fileno() old = termios.tcgetattr(fd) try: tty.setraw(sys.stdin.fileno()) ch = sys.stdin.read(a) finally: termi...
import sys, tty, termios, time class _Getch: def __call__(self, a): return self._get_key(a) def _get_key(self, a): fd = sys.stdin.fileno() old = termios.tcgetattr(fd) try: tty.setraw(sys.stdin.fileno()) ch = sys.stdin.read(a) finally: ...
Python
0.000002
2c43cf3368742d7bb0acb91118ff07aeb1fe4183
Fix comment typo.
qipipe/staging/sarcoma_config.py
qipipe/staging/sarcoma_config.py
import os from six.moves.configparser import ConfigParser as Config from six.moves.configparser import NoOptionError CFG_FILE = os.path.abspath( os.path.join( os.path.dirname(__file__), '..', 'conf', 'sarcoma.cfg') ) """ The Sarcoma Tumor Location configuration file. This file contains properties that associate th...
import os from six.moves.configparser import ConfigParser as Config from six.moves.configparser import NoOptionError CFG_FILE = os.path.abspath( os.path.join( os.path.dirname(__file__), '..', 'conf', 'sarcoma.cfg') ) """ The Sarcoma Tumor Location configuration file. This file contains properties that associat the...
Python
0
f0e07f97fd43a0f54c8b0996944038a07e9a0e96
Add error handling for when the meter name does not match the NEM file
metering/loader.py
metering/loader.py
""" metering.loader ~~~~~~~~~ Define the meter data models """ import logging from nemreader import read_nem_file from sqlalchemy.orm import sessionmaker from energy_shaper import split_into_daily_intervals from . import get_db_engine from . import save_energy_reading from . import refresh_daily_stats from...
""" metering.loader ~~~~~~~~~ Define the meter data models """ from nemreader import read_nem_file from sqlalchemy.orm import sessionmaker from energy_shaper import split_into_daily_intervals from . import get_db_engine from . import save_energy_reading from . import refresh_daily_stats from . import refre...
Python
0.000001
57a14c56305f3542e5383bb8189a298bb62f853a
remove qqq debug from wb_debug
Source/Common/wb_debug.py
Source/Common/wb_debug.py
''' ==================================================================== Copyright (c) 2016 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===========================================================...
''' ==================================================================== Copyright (c) 2016 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===========================================================...
Python
0.000622
6a1b5003547833ffb0cddea933594c0322ad1bf2
Add complete utils instead
frappe/social/doctype/energy_point_rule/energy_point_rule.py
frappe/social/doctype/energy_point_rule/energy_point_rule.py
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ import frappe.cache_manager from frappe.model.document import Document from frappe.social.doctype.energy_point_...
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ import frappe.cache_manager from frappe.model.document import Document from frappe.social.doctype.energy_point_...
Python
0
c906e675bb4c75286d98d78e4625d12a158652c7
Update accel.py
apps/accelerometer/accel.py
apps/accelerometer/accel.py
#!/usr/bin/python # Author : ipmstyle, https://github.com/ipmstyle # : jeonghoonkang, https://github.com/jeonghoonkang # for the detail of HW connection, see lcd_connect.py import sys from time import strftime, localtime # beware the dir location, it should exist sys.path.append("../lcd_berepi/lib") sys.path.ap...
#!/usr/bin/python # Author : ipmstyle, https://github.com/ipmstyle # : jeonghoonkang, https://github.com/jeonghoonkang # for the detail of HW connection, see lcd_connect.py import sys from time import strftime, localtime # beware the dir location, it should exist sys.path.append("../lcd_berepi/lib") sys.path.ap...
Python
0.000001
1ed14e9231d295c6db83337f7cf2b586a39dc3dc
Add timestamp to payment log list display
apps/cowry_docdata/admin.py
apps/cowry_docdata/admin.py
from babel.numbers import format_currency from django.contrib import admin from django.core.urlresolvers import reverse from django.utils import translation from .models import DocDataPaymentOrder, DocDataPayment, DocDataPaymentLogEntry class DocDataPaymentLogEntryInine(admin.TabularInline): model = DocDataPaymen...
from babel.numbers import format_currency from django.contrib import admin from django.core.urlresolvers import reverse from django.utils import translation from .models import DocDataPaymentOrder, DocDataPayment, DocDataPaymentLogEntry class DocDataPaymentLogEntryInine(admin.TabularInline): model = DocDataPaymen...
Python
0.000001
8064be72de340fca963da2cade2b73aa969fbdbd
Add string representation for Activity model
csunplugged/activities/models.py
csunplugged/activities/models.py
from django.db import models class Activity(models.Model): name = models.CharField(max_length=200) description = models.TextField() def __str__(self): return self.name
from django.db import models class Activity(models.Model): name = models.CharField(max_length=200) description = models.TextField()
Python
0.000039
dd4e62667da94469a8bbb6dd0ccd881124e7665f
Fix return value of terraform.render
src/buildercore/terraform.py
src/buildercore/terraform.py
import json from buildercore.utils import ensure RESOURCE_TYPE_FASTLY = 'fastly_service_v1' RESOURCE_NAME_FASTLY = 'fastly-cdn' def render(context): if not context['fastly']: return '{}' ensure(len(context['fastly']['subdomains']) == 1, "Only 1 subdomain for Fastly CDNs is supported") tf_file = ...
import json from buildercore.utils import ensure RESOURCE_TYPE_FASTLY = 'fastly_service_v1' RESOURCE_NAME_FASTLY = 'fastly-cdn' def render(context): if not context['fastly']: return None ensure(len(context['fastly']['subdomains']) == 1, "Only 1 subdomain for Fastly CDNs is supported") tf_file = ...
Python
0.000126
1472e4204e9a654a2296f690e8420c97ef98fb7c
Read device entity id from config file
senic_hub/nuimo_app/components/__init__.py
senic_hub/nuimo_app/components/__init__.py
import logging from pprint import pformat from threading import Thread from .. import matrices from ..hass import HomeAssistant logger = logging.getLogger(__name__) def clamp_value(value, range_): return min(max(value, range_.start), range_.stop) class BaseComponent: MATRIX = matrices.ERROR def __ini...
import logging from pprint import pformat from threading import Thread from .. import matrices from ..hass import HomeAssistant logger = logging.getLogger(__name__) def clamp_value(value, range_): return min(max(value, range_.start), range_.stop) class BaseComponent: MATRIX = matrices.ERROR def __ini...
Python
0
a98e536334eb3d3376efe93c1bdc639ecdc4a2a0
remove unused code
approvaltests/reporters/generic_diff_reporter_factory.py
approvaltests/reporters/generic_diff_reporter_factory.py
import json from approvaltests.reporters.generic_diff_reporter import GenericDiffReporter from approvaltests.utils import get_adjacent_file class GenericDiffReporterFactory(object): reporters = [] def __init__(self): self.load(get_adjacent_file('reporters.json')) self.add_fallback_reporter_c...
import json from approvaltests.reporters.generic_diff_reporter import GenericDiffReporter from approvaltests.utils import get_adjacent_file class GenericDiffReporterFactory(object): reporters = [] def __init__(self): self.load(get_adjacent_file('reporters.json')) self.add_fallback_reporter_c...
Python
0.000017
c5422645773b43de8811c691dfe03c82eda0b935
put cflags into configure
robustus/detail/install_protobuf.py
robustus/detail/install_protobuf.py
# ============================================================================= # COPYRIGHT 2013 Brain Corporation. # License under MIT license (see LICENSE file) # ============================================================================= import logging import os from requirement import RequirementException from u...
# ============================================================================= # COPYRIGHT 2013 Brain Corporation. # License under MIT license (see LICENSE file) # ============================================================================= import logging import os from requirement import RequirementException from u...
Python
0.000001
ae2981b26fce2641a9bae5af68a3d5043fdd8b46
Fix disapear exception message (#31)
ovh/exceptions.py
ovh/exceptions.py
# -*- encoding: utf-8 -*- # # Copyright (c) 2013-2016, OVH SAS. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, t...
# -*- encoding: utf-8 -*- # # Copyright (c) 2013-2016, OVH SAS. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, t...
Python
0
63f6637228153b1f77ca860c297ff3554d802ce9
Fix order history sorting logic, #sort() should be called before #reverse().
model/orderbook.py
model/orderbook.py
# -*- encoding:utf8 -*- import os from model.oandapy import oandapy class OrderBook(object): def get_latest_orderbook(self, instrument, period, history): oanda_token = os.environ.get('OANDA_TOKEN') oanda = oandapy.API(environment="practice", access_token=oanda_token) orders = oanda.get_o...
# -*- encoding:utf8 -*- import os from model.oandapy import oandapy class OrderBook(object): def get_latest_orderbook(self, instrument, period, history): oanda_token = os.environ.get('OANDA_TOKEN') oanda = oandapy.API(environment="practice", access_token=oanda_token) orders = oanda.get_o...
Python
0.000019
6741c59d726f1ceaf6edba82b6e97f501fc265ee
fix zero shape bug!
src/scripts/make_parts_dataset.py
src/scripts/make_parts_dataset.py
import sys import os sys.path.append(os.path.dirname(os.path.dirname(__file__))) import settings sys.path.append(settings.CAFFE_PYTHON_PATH) import skimage.io import caffe import numpy as np import click from glob import glob import utils from dataset import CUB_200_2011 from parts import Parts @click.command() @cli...
import sys import os sys.path.append(os.path.dirname(os.path.dirname(__file__))) import settings sys.path.append(settings.CAFFE_PYTHON_PATH) import skimage.io import caffe import numpy as np import click from glob import glob import utils from dataset import CUB_200_2011 from parts import Parts @click.command() @cli...
Python
0