gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- coding: utf-8 -*- # coding=utf-8 # Copyright 2019 The SGNMT Authors. # # 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 requir...
# 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...
# Copyright (C) 2013-2014 Computer Sciences Corporation # # 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 a...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Cloudbase Solutions Srl # # 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/LICE...
# Copyright (C) 2012-2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
from os.path import join, dirname import unittest from StringIO import StringIO from robot.errors import DataError from robot.result import ExecutionResult from robot.utils.asserts import assert_equals, assert_true, assert_raises def _read_file(name): with open(join(dirname(__file__), name)) as f: return...
import ast from . import astlib as _a from .library import Library from .parser import visitor register = Library() @register.tag def load(parser, token): args, kwargs = parser.parse_args(token) assert len(args) == 1, '"load" tag takes only one argument.' assert isinstance(args[0], ast.Str), \ ...
import enum import parsy import pytest from toolz import identity import ibis import ibis.expr.datatypes as dt import ibis.expr.rules as rlz import ibis.expr.types as ir from ibis.common.exceptions import IbisTypeError table = ibis.table( [('int_col', 'int64'), ('string_col', 'string'), ('double_col', 'double')]...
""" Client classes for the GA4GH reference implementation. """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import requests import posixpath import logging import ga4gh.protocol as protocol import ga4gh.exceptions as exceptions class AbstractClient(ob...
"""Guess the MIME type of a file. This module defines two useful functions: guess_type(url, strict=True) -- guess the MIME type and encoding of a URL. guess_extension(type, strict=True) -- guess the extension for a given MIME type. It also contains the following, for tuning the behavior: Data: knownfiles -- list ...
r"""OS routines for Java, with some attempts to support DOS, NT, and Posix functionality. This exports: - all functions from posix, nt, dos, os2, mac, or ce, e.g. unlink, stat, etc. - os.path is one of the modules posixpath, ntpath, macpath, or dospath - os.name is 'posix', 'nt', 'dos', 'os2', 'mac', 'ce' or 'ri...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test behavior of headers messages to announce blocks. Setup: - Two nodes: - node0 is the node-und...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import inspect import logging from typing import Dict, List, Optional, Union from ray.tune.result import DEFAULT_METRIC from ray.tune.sample import Domain, Float, Quantized from ray.tune.suggest.suggestion imp...
# -*- coding: utf-8 -*- from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser, Group from django.contrib.sites.models import Site from django.test.utils import override_settings from cms.api import create_page from cms.cms_menus import get_visible_pages from cms.models imp...
# Copyright 2017 The TensorFlow Authors. 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 applica...
# This file is generated by mkstringprep.py. DO NOT EDIT. """Library that exposes various tables found in the StringPrep RFC 3454. There are two kinds of tables: sets, for which a member test is provided, and mappings, for which a mapping function is provided. """ import unicodedata #assert unicodedata.unidata_versi...
""" A Cython plugin for coverage.py Requires the coverage package at least in version 4.0 (which added the plugin API). """ from __future__ import absolute_import import re import os.path from collections import defaultdict from coverage.plugin import CoveragePlugin, FileTracer, FileReporter # requires coverage.py...
from characteristic import Attribute, attributes from rply import ParserGenerator from rply.errors import LexingError as _RPlyLexingError from cycy.exceptions import CyCyError from cycy.parser.ast import ( Array, ArrayDereference, Assembler, Assignment, BinaryOperation, Block, Call, Cha...
#!/usr/bin/env python3 # Copyright (c) 2017-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test various command line arguments and configuration file parameters.""" import os import time from ...
from flask import Blueprint, current_app, Response, request, jsonify from croplands_api.models import Record, Location from croplands_api import db, cache, limiter from croplands_api.exceptions import FieldError from requests.models import PreparedRequest from flask_jwt import current_user from croplands_api.auth impor...
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICEN...
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''Unit tests for grit.format.resource_map''' import os import sys if __name__ == '__main__': sys.path.append(os.path.join(os.pa...
""" The different agnocomplete classes to be discovered """ from copy import copy from six import with_metaclass from abc import abstractmethod, ABCMeta import logging from django.db.models import Q from django.core.exceptions import ImproperlyConfigured from django.utils.encoding import force_text as text from django...
# PlantCV classes import os import json from plantcv.plantcv import fatal_error class Params: """PlantCV parameters class.""" def __init__(self, device=0, debug=None, debug_outdir=".", line_thickness=5, dpi=100, text_size=0.55, text_thickness=2, marker_size=60, color_scale="gist_rainbow", co...
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 ''' CONSTANTS ''' removed_keys = ['endpoint', 'domain', 'hostname'] ''' CLIENT CLASS ''' class Client(BaseClient): def __init__(self, base_url, verify=True, proxy=False, ok_codes=tuple(), headers=None, auth=None, timeou...
"""Gridworld Domain.""" from rlpy.Tools import plt, FONTSIZE, linearMap import numpy as np from .Domain import Domain from rlpy.Tools import __rlpy_location__, findElemArray1D, perms import os __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = ["Alborz Geramifard", "Robert H. Klein", "Christo...
import os import types import sys import codecs import tempfile import tkinter.filedialog as tkFileDialog import tkinter.messagebox as tkMessageBox import re from tkinter import * from tkinter.simpledialog import askstring from idlelib.configHandler import idleConf from codecs import BOM_UTF8 # Try setting the local...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
import json try: from http.client import HTTPConnection except ImportError: from httplib import HTTPConnection try: from urllib.parse import quote except ImportError: from urllib import quote from testcases import TestServerTestCase from .utils import skipIfSpatialite golden_gate_park_query = quote...
import string, re, sys, datetime from .core import TomlError if sys.version_info[0] == 2: _chr = unichr else: _chr = chr def load(fin, translate=lambda t, x, v: v): return loads(fin.read(), translate=translate, filename=fin.name) def loads(s, filename='<string>', translate=lambda t, x, v: v): if isin...
# 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...
import csv import elements import xml.etree.ElementTree as ET from copy import deepcopy ignored_elements = ['desc'] # ignored as elements but used as something else allowed_elements = ['include', 'testcase', 'template', 'request', 'var', 'print', 'sleep', 'clearcookies', 'callfunction'] # main is the runner class # p...
# Copyright (C) 2014 VA Linux Systems Japan K.K. # Copyright (C) 2014 YAMAMOTO Takashi <yamamoto at valinux co jp> # 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...
# ./MARC21relaxed.py # -*- coding: utf-8 -*- # PyXB bindings for NM:5e592dacc0cf5bbbe827fb7d980f3324ca92c3dc # Generated 2016-12-21 00:24:34.092428 by PyXB version 1.2.4 using Python 2.7.12.final.0 # Namespace http://www.loc.gov/MARC21/slim from __future__ import unicode_literals import pyxb import pyxb.binding import...
"""Useful utilities for higher level polynomial classes. """ from __future__ import print_function, division from sympy.polys.polyerrors import PolynomialError, GeneratorsNeeded, GeneratorsError from sympy.polys.polyoptions import build_options from sympy.core.exprtools import decompose_power from sympy.core import...
"""Nose Plugin that supports IPython doctests. Limitations: - When generating examples for use as doctests, make sure that you have pretty-printing OFF. This can be done either by setting the ``PlainTextFormatter.pprint`` option in your configuration file to False, or by interactively disabling it with %Ppri...
# encoding: utf-8 """ supervisor.py Created by Thomas Mangin on 2011-11-29. Copyright (c) 2011-2013 Exa Networks. All rights reserved. """ import os import sys import signal import traceback from socket import has_ipv6 from .util.pid import PID from .util.daemon import Daemon from .util.alarm import alarm_thread f...
import pickle from typing import Tuple, List, Iterable, Any import logging from PyQt5 import QtWidgets, QtCore from .samples_ui import Ui_WizardPage from ......core2.instrument.instrument import Instrument logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class Model(QtCore.QAbstractItemModel): ...
""" Module for Approximate Bayesian Computation """ from abc import ABCMeta, abstractmethod import multiprocessing import numpy as np from scipy import stats from numpy.lib.recfunctions import stack_arrays class Model(object): """ Base class for constructing models for approximate bayesian computing and v...
""" Python implementation of Rijndael encryption algorithm. This code is in the public domain. This code is based on a public domain C implementation by Philip J. Erdelsky: http://www.efgh.com/software/rijndael.htm """ import struct def KEYLENGTH(keybits): return (keybits)//8 def RKLENGTH(keybits): ...
# # Copyright 2017 the original author or authors. # # 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...
# # Overlays.py -- Overlays plugin for Ginga FITS viewer # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import numpy from ginga import GingaPlugin, RGBImage, colors...
import unittest from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0 from selenium.webdriver.support import expected_conditions as EC # available since 2.26.0 from seleni...
import numpy as np import pandas as pd from nose.tools import assert_almost_equal, assert_equal, eq_, ok_, raises from numpy.testing import assert_array_equal from pandas.testing import assert_frame_equal from rsmtool.preprocessor import FeaturePreprocessor, FeatureSpecsProcessor, FeatureSubsetProcessor class TestFea...
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
"""Tasks related to projects This includes fetching repository code, cleaning ``conf.py`` files, and rebuilding documentation. """ import os import shutil import json import logging import socket import requests import hashlib from collections import defaultdict from celery import task, Task from djcelery import cel...
# coding: utf-8 """ Wavefront REST API Documentation <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the W...
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
# 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 # distrib...
# Copyright (c) 2010-2021 Manfred Moitzi # License: MIT License from typing import TYPE_CHECKING, Sequence, Iterator, Iterable import math from ezdxf.math import Vec2, linspace from .line import ConstructionRay, ConstructionLine from .bbox import BoundingBox2d if TYPE_CHECKING: from ezdxf.eztypes import Vertex HA...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the ...
"""Demo platform that offers a fake climate device.""" from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate.const import ( ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW, CURRENT_HVAC_COOL, CURRENT_HVAC_HEAT, HVAC_MODE_AUTO, HVAC_MODE_COOL, HVAC_MODE_...
# 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 use ...
# # messages.py # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import absolute_import, division, print_function, unicode_literals import struct import time import random import sys if sys.version > '3': ...
# Copyright (C) 2014,2015 VA Linux Systems Japan K.K. # Copyright (C) 2014,2015 YAMAMOTO Takashi <yamamoto at valinux co jp> # 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 t...
import datetime import os import re import time from pprint import pformat from urllib import urlencode, quote from urlparse import urljoin try: from cStringIO import StringIO except ImportError: from StringIO import StringIO # Now I use fast_parse_qsl for query string parse. # It will be more faster when que...
""" Reaction wheel discipline for CADRE """ from six.moves import range import numpy as np from openmdao.api import ExplicitComponent from CADRE import rk4 class ReactionWheel_Motor(ExplicitComponent): """ Compute reaction wheel motor torque. """ def __init__(self, n): super(ReactionWheel_...
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
# Copyright (C) 2012 Google Inc. 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, this list of conditions and the ...
from __future__ import print_function import numpy as np # from keras.layers import Input # from keras import backend as K # from keras.optimizers import RMSprop import tensorflow as tf # import tensorlayer as tl from rlflow.algos.algo import RLAlgorithm from rlflow.core import tf_utils class DQN(RLAlgorithm): "...
"""Miscellaneous utility functions and classes. This module is used internally by Tornado. It is not necessarily expected that the functions and classes defined here will be useful to other applications, but they are documented here in case they are. The one public-facing part of this module is the `Configurable` cl...
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
#!/usr/bin/env python # Copyright 2012 Google Inc. All Rights Reserved. """Tests for the hunt.""" import time import logging # pylint: disable=unused-import,g-bad-import-order from grr.lib import server_plugins # pylint: enable=unused-import,g-bad-import-order from grr.lib import aff4 from grr.lib import flags ...
# 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 # distrib...
""" This file is part of pyS5p https://github.com/rmvanhees/pys5p.git The class LV2io provides read access to S5p Tropomi S5P_OFFL_L2 products Copyright (c) 2018-2021 SRON - Netherlands Institute for Space Research All Rights Reserved License: BSD-3-Clause """ from datetime import datetime, timedelta from pathl...
test_sub_dir = "test_data/1019436/session_1" def test_run_func_motion_correct_no_slice_time(): import os import nibabel as nb import pkg_resources as p from qap.functional_preproc import run_func_motion_correct if "func_motion_correct" in os.listdir(os.getcwd()): err = "\n[!] The o...
THOST_FTDC_EXP_Normal = '0' THOST_FTDC_EXP_GenOrderByTrade = '1' THOST_FTDC_ICT_EID = '0' THOST_FTDC_ICT_IDCard = '1' THOST_FTDC_ICT_OfficerIDCard = '2' THOST_FTDC_ICT_PoliceIDCard = '3' THOST_FTDC_ICT_SoldierIDCard = '4' THOST_FTDC_ICT_HouseholdRegister = '5' THOST_FTDC_ICT_Passport = '6' THOST_FTDC_ICT_TaiwanCompatri...
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
""" app.file.utils ~~~~~~~~~~~~~~~~ synopsis: Helpers for manipulating files. Switches file-handling interface between sftp and os depending on configuration. """ import os import magic import hashlib import paramiko import shutil from tempfile import TemporaryFile from functools import wraps from con...
# -*- coding: utf-8 -*- """Basic Security Module (BSM) event auditing file parser.""" from dfdatetime import posix_time as dfdatetime_posix_time from plaso.containers import events from plaso.containers import time_events from plaso.lib import definitions from plaso.lib import errors from plaso.parsers import dtfabri...
#!/usr/bin/env python # Copyright 2014 PerfKitBenchmarker Authors. 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 # # U...
from __future__ import division from __future__ import print_function from scipy.ndimage.filters import generic_filter from collections import defaultdict from raster_ops import extract, reclassify_from_data, geometry_mask, \ write_tif import numpy as np import csv import math import os # Enableing DEBUG will w...
"""Test script for the gzip module. """ import unittest from test import test_support import os import io import struct gzip = test_support.import_module('gzip') data1 = """ int length=DEFAULTALLOC, err = Z_OK; PyObject *RetVal; int flushmode = Z_FINISH; unsigned long start_total_out; """ data2 = """/* zlibm...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010, 2degrees Limited <egoddard@tech.2degreesnetwork.com>. # All Rights Reserved. # # This file is part of djangoaudit <https://launchpad.net/django-audit/>, # which is subject to the provisions of ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import argparse from natsort import natsorted import funannotate.library as lib from Bio import SeqIO from collections import OrderedDict def scaffold2Dict(input): # get scaffold names/lengths scaffLen = {} with open(input, 'r') as seqin:...
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function import argparse import collections import logging import os import re import subprocess import s...
import os import pprint import shutil import sys import textwrap from pathlib import Path from typing import List import pytest from _pytest.config import ExitCode from _pytest.fixtures import FixtureRequest from _pytest.main import _in_venv from _pytest.main import Session from _pytest.monkeypatch import MonkeyPatch ...
from __future__ import unicode_literals from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.db.models import AutoField from django.forms import ValidationError, ModelForm from django.http import HttpResponseRedirect from django.shortcuts import redirect from django.utils.transl...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: See license.txt import frappe, json, os from frappe.utils import strip, cint from frappe.translate import (set_default_language, get_dict, send_translations) from frappe.geo.country_info import get_country_info from frappe.utils.password i...
import csv import json import datetime import math class System: def __init__(self, data_dir, date): json_file_loc = data_dir + "ff_config.json" print ("File opened: " + json_file_loc) jf = open(json_file_loc, "r") self.js = json.loads(jf.read()) jf.close() print ...
#!/usr/bin/env python # This document is part of Acronym # https://github.com/geowurster/Acronym # =================================================================================== # # # New BSD License # # Copyright (c) 2014, Kevin D. Wurster # All rights reserved. # # Redistribution and use in source and bi...
# Copyright 2009-2010 10gen, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
""" Benchmark different solver of the same CSC univariate or multivariate problem. This script needs the following packages: pip install pandas pyfftw pip install alphacsc/other/sporco - Use bench_methods_run.py to run the benchmark. The results are saved in alphacsc/figures. - Use bench_methods_plot.py to ...
from docutils.nodes import figure, caption, Text, reference, raw, SkipNode, Element, topic from sphinx.roles import XRefRole from inlineav import av_dgm, av_ss import json # Element classes class page_ref(reference): pass class num_ref(reference): pass figids_1={} table_doc={} def loadTable(): try...
""" Example: scikits.statsmodels.WLS example is extended to look at the meaning of rsquared in WLS, at outliers, compares with RLM and a short bootstrap """ import numpy as np import scikits.statsmodels.api as sm import matplotlib.pyplot as plt data = sm.datasets.ccard.load() data.exog = sm.add_constant(data.exog) o...
from collections import defaultdict import datetime from google.appengine.ext import db from google.appengine.ext import ndb import pickle_util import synchronized_counter # We are explicit here about which model properties are indexed and # which aren't (even when we're just repeating the default behavior), # to b...
#! /usr/bin/env python """ myfunctions.py My functions module containing commonly used functions - Math -- adjAvSmooth(dataarray, N=10) -- weibullPlot(dataarray) -- numInt(function, a, b, step) -- numDiff(y, x) -- numDifference(y) -- mean_sterr(x) - Array manipulation -- findNearest(arr, val) -- outputMultiList(data) ...
import os import plotly as py import pandas as pd import numpy as np import plotly.plotly as py import plotly.tools as plotly_tools import plotly.graph_objs as go import plotly.offline as offline import matplotlib.pyplot as plt import matplotlib as mpl def readJson(cur_dir): rmsd = {} week_num = '' protocol = ''...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 OpenStack Foundation # Copyright 2012 Nebula, Inc. # Copyright (c) 2012 X.commerce, a business unit of eBay Inc. # # Licensed under the Apach...
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
#!/usr/bin/env python # # Copyright 2013, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. import logging import time import unittest from vtproto import topodata_pb2 from vtdb import keyrange from vtdb import keyrange_constants fr...
from cloudmesh.config.cm_config import get_mongo_db, get_mongo_dbname_from_collection, DBConnFactory from cloudmesh.management.cloudmeshobject import CloudmeshObject from cloudmesh_base.ConfigDict import ConfigDict from cloudmesh_base.locations import config_file from mongoengine import * from tabulate import tabulate ...
import datetime import os import time import presets import torch import torch.utils.data import torchvision import utils from coco_utils import get_coco from torch import nn try: from torchvision import prototype except ImportError: prototype = None def get_dataset(dir_path, name, image_set, transform): ...
"""Flask web views for Caravel""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import json import logging import re import sys import time import traceback from datetime import datetime import functools import pand...
"""Placeholder module, that's where the smart things happen.""" from pages.widgets_registry import get_widget from pages import settings from pages.models import Content, Media from pages.widgets import ImageInput, FileInput from pages.utils import slugify from django import forms from django.core.mail import send_mai...
""" 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 distri...
# Python implementation of the MySQL client-server protocol # http://dev.mysql.com/doc/internals/en/client-server-protocol.html # Error codes: # http://dev.mysql.com/doc/refman/5.5/en/error-messages-client.html from __future__ import print_function from ._compat import PY2, range_type, text_type, str_type, JYTHON, IRON...
"""Utilities for input validation""" # Authors: Olivier Grisel and Gael Varoquaux and others (please update me) # License: BSD 3 import warnings import numbers import numpy as np from scipy import sparse from .fixes import safe_copy def _assert_all_finite(X): """Like assert_all_finite, but only for ndarray."""...
"""Queues""" __all__ = ['Queue', 'PriorityQueue', 'LifoQueue', 'QueueFull', 'QueueEmpty'] import collections import heapq from . import compat from . import events from . import locks from .coroutines import coroutine class QueueEmpty(Exception): """Exception raised when Queue.get_nowait() is called on a Queue...