gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# coding: utf-8 from __future__ import unicode_literals, division, print_function """ Created on Jun 1, 2012 """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Jun 1, 2012" import un...
# -*- coding: utf-8 -*- # # pandas documentation build configuration file, created by # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that ...
# http://www.g-loaded.eu/2009/10/30/python-ping/ #!/usr/bin/env python """ A pure python ping implementation using raw socket. Note that ICMP messages can only be sent from processes running as root. Derived from ping.c distributed in Linux's netkit. That code is copyright (c) 1989 by The Regents o...
import os import copy import logging from itertools import chain import tensorflow as tf from baseline.tf.embeddings import * from eight_mile.tf.layers import * from baseline.version import __version__ from baseline.utils import ( fill_y, listify, ls_props, read_json, write_json, MAGIC_VARS, ...
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2009, Willow Garage, 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...
#!/usr/bin/env python """ @file coi-services/mi.idk/egg_generator.py @author Bill French @brief Generate egg for a driver. This uses snakefood to build a dependecy list and includes all files in the driver directory. """ __author__ = 'Bill French' __license__ = 'Apache 2.0' import re import os import sys import shu...
import sys import rbtree from PySide.QtGui import * from PySide.QtCore import * class BaseNode: pass class BaseLink: pass def rbtree_node_depth_adjust(tree): if tree.empty(): return def traverse(subtree, red_cnt): if subtree is tree.head: return if subtree.color is F...
import threading import Queue from wsgiref.simple_server import make_server from functools import partial from pprint import pprint from requests_debug import debug as requests_debug import requests import time from testfixtures import compare from contextlib import contextmanager import logging logging.basicConfig(lev...
"""Provides 'odometry', which loads and parses odometry benchmark data.""" import datetime as dt import glob import os from collections import namedtuple import numpy as np import pykitti.utils as utils __author__ = "Lee Clement" __email__ = "lee.clement@robotics.utias.utoronto.ca" ##Since Python2.x has no 'FileNo...
from __future__ import annotations from typing import Any import numpy as np SEED_NONE = None SEED_INT = 4579435749574957634658964293569 SEED_ARR: np.ndarray[Any, np.dtype[np.int64]] = np.array([1, 2, 3, 4], dtype=np.int64) SEED_ARRLIKE: list[int] = [1, 2, 3, 4] SEED_SEED_SEQ: np.random.SeedSequence = np.random.SeedS...
from __future__ import division, absolute_import, print_function import sys import operator import pytest import ctypes import gc import numpy as np from numpy.core._rational_tests import rational from numpy.testing import ( assert_, assert_equal, assert_array_equal, assert_raises, HAS_REFCOUNT) from numpy.compat...
# -*- coding: utf-8 -*- # Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST from __future__ import print_function import sys import pinocchio from dynamic_graph import plug from dynamic_graph.sot.core.derivator import Derivator_of_Vector from dynamic_graph.sot.core.op_point_modifier import OpPointModi...
import time import cmd import os import datetime import subprocess from .report_generator import SessionReportGenerator from .print_colour import Printer from .session import Session class TestSessionRecorder(cmd.Cmd): # Constants # File System SESSION_DIR = os.path.expanduser("~") + '/sessions' REPOR...
# # tested on | Windows native | Linux cross-compilation # ------------------------+-------------------+--------------------------- # MSVS C++ 2010 Express | WORKS | n/a # Mingw-w64 | WORKS | WORKS # Mingw-w32 | WORKS | WORKS # MinGW ...
# This file is part of the MapProxy project. # Copyright (C) 2016 Omniscale <http://omniscale.de> # # 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...
# package org.apache.helix.manager.zk #from org.apache.helix.manager.zk import * #from java.io import File #from java.util import List #from java.util import Map #from java.util import Set #from java.util.concurrent import ConcurrentHashMap #from java.util.concurrent import CopyOnWriteArraySet #from org.I0Itec.zkclient...
#!/usr/bin/python # create_glider_netcdf.py - A command line script for generating NetCDF files # from a subset of glider binary data files. # # By: Michael Lindemuth <mlindemu@usf.edu> # University of South Florida # College of Marine Science # Ocean Technology Group import argparse from glider_binary_data_reader i...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
""" Test cases for the template loaders Note: This test requires setuptools! """ from django.conf import settings if __name__ == '__main__': settings.configure() import os.path import sys import types import unittest try: import pkg_resources except ImportError: pkg_resources = None from django.templ...
#!/usr/bin/python #============================ adjust path ===================================== import sys import os if __name__ == "__main__": here = sys.path[0] sys.path.insert(0, os.path.join(here, '..', '..','libs')) sys.path.insert(0, os.path.join(here, '..', '..','external_libs')) #==============...
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
# Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2013 OpenStack Foundation # # 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...
import numpy.testing as npt import numpy as np import pytest from scipy import stats from .common_tests import (check_normalization, check_moment, check_mean_expect, check_var_expect, check_skew_expect, check_kurt_expect, check_entropy, c...
"""Forms for Contractors and related entities. Contractor Call Pitch Assignment """ from bootstrap3_datetime.widgets import DateTimePicker from django import forms from django.db.models import Q from django.forms import Textarea, TextInput, Select from editorial.models import ( ContractorProfile...
# -*- coding: utf-8 -*- #$URL: https://rst2pdf.googlecode.com/svn/tags/0.93/rst2pdf/genpdftext.py $ #$Date: 2012-12-14 13:41:35 -0300 (Fri, 14 Dec 2012) $ #$Revision: 2621 $ # See LICENSE.txt for licensing terms import os from xml.sax.saxutils import escape from log import log, nodeid from basenodehandler import Nod...
from sympy import ( Symbol, Dummy, gamma, I, oo, nan, zoo, factorial, sqrt, Rational, multigamma, log, polygamma, digamma, trigamma, EulerGamma, pi, uppergamma, S, expand_func, loggamma, sin, cos, O, lowergamma, exp, erf, erfc, exp_polar, harmonic, zeta, conjugate, Ei, im, re, tanh, Abs) from sympy.cor...
""" xgboost: eXtreme Gradient Boosting library Authors: Tianqi Chen, Bing Xu """ from __future__ import absolute_import import os import sys import ctypes import collections import numpy as np import scipy.sparse __all__ = ['DMatrix', 'CVPack', 'Booster', 'aggcv', 'cv', 'mknfold', 'train'] if sys.version_info[0] ...
#!/usr/bin/env python # # Azure Linux extension # # Copyright (c) Microsoft Corporation # All rights reserved. # MIT License # 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 restrictio...
"""Weight Boosting. This module contains weight boosting estimators for both classification and regression. The module structure is the following: - The `BaseWeightBoosting` base class implements a common ``fit`` method for all the estimators in the module. Regression and classification only differ from each oth...
from __future__ import absolute_import import difflib import os from salt.ext import six from salt.utils.odict import OrderedDict try: from salt.exceptions import InvalidConfigError except ImportError: from salt.exceptions import SaltException class InvalidConfigError(SaltException): ''' ...
#!/usr/bin/env python2.7 # Copyright 2013 Facebook, 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 ...
from hs_travelportapp.home.models import Airline, UCode from datetime import datetime PARSE_DATE_FORMAT = '%Y-%m-%dT%H:%M:%S' FORMATTING_DATE_FORMAT = '%d %b' FORMATTING_TIME_FORMAT = '%H:%M' AIRLINE_CACHE = {} AIRPORT_CACHE = {} RAILS_CACHE = {} class ResultParser(object): def __init__(self, resp_obj): s...
from utils.database import dbutils import json import requests import polyline import cPickle as pickle import os def get_routes(location_pairs, routes_path, get_time=False): """ Gets the driving route from Open Street Routing Machine for an array of pairs of coordinates. Decodes the returned polyline rou...
# 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...
from copy import deepcopy from datetime import datetime as dt, timedelta from functools import update_wrapper, wraps from inspect import isclass import re from singledispatch import singledispatch from .const import DEFAULT_LIMIT def cacheable_generator(obj_type): """ Caching decorator for API generator methods...
"""Switch platform for Hyperion.""" import functools from typing import Any, Callable, Dict, Optional from hyperion import client from hyperion.const import ( KEY_COMPONENT, KEY_COMPONENTID_ALL, KEY_COMPONENTID_BLACKBORDER, KEY_COMPONENTID_BOBLIGHTSERVER, KEY_COMPONENTID_FORWARDER, KEY_COMPONE...
from datetime import datetime, timedelta from typing import Any, Dict, Optional import pytest from graphql.error import GraphQLError from graphql.language import ValueNode from graphql.pyutils import inspect from graphql.type import ( GraphQLArgument, GraphQLField, GraphQLInputField, GraphQLInputObject...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module's main purpose is to act as a script to create new versions of erfa.c when ERFA is updated (or this generator is enhanced). `Jinja2 <http://jinja.pocoo.org/>`_ must be installed for this module/script to function. Note that this does *not...
# Copyright 2015 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 a...
# flake8: NOQA E501 import inspect import os import sys from os.path import dirname, relpath import cihai # Get the project root dir, which is the parent dir of this cwd = os.getcwd() project_root = os.path.dirname(cwd) sys.path.insert(0, project_root) sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__f...
from numpy import prod import cupy from cupy.cuda import cufft from cupy.fft import config from cupy.fft._fft import (_convert_fft_type, _default_fft_func, _fft, _get_cufft_plan_nd, _get_fftn_out_size, _output_dtype) from cupy.fft._cache import get_plan_cache def...
# -*- coding: utf-8 -*- # 1st-run initialisation # designed to be called from Crontab's @reboot # however this isn't reliable (doesn't work on Win32 Service) so still in models for now... # Deployments can change settings live via appadmin # Set deployment_settings.base.prepopulate to False in Production (to save 1x...
# Copyright (c) 2013 OpenStack Foundation # # 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 ...
# Copyright 2013: Mirantis 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 b...
from __future__ import absolute_import import drmaa import errno import os import shlex import shutil from . import app from alta.objectstore import build_object_store from comoda import ensure_dir from celery import group from celery import chain from celery.utils.log import get_task_logger from grp import getgrgid ...
from wagtail.wagtailcore.blocks import ChoiceBlock class IconChoiceBlock(ChoiceBlock): choices = [ ('address-book', 'address-book'), ('address-book-o', 'address-book-o'), ('address-card', 'address-card'), ('address-card-o', 'address-card-o'), ('adjust', 'adjust'), ('american-sign-language-interpreting', '...
# Copyright 2018 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...
# -*- coding: utf-8 -*- """ celery.utils ~~~~~~~~~~~~ Utility functions. """ from __future__ import absolute_import, print_function import numbers import os import re import socket import sys import traceback import warnings import datetime from collections import Callable from functools import partial,...
''' Created on 5 Nov 2015 @author: Sara ''' class ParseInterOpMetrics(object): ''' A series of methods to parse the InterOp binary files generated by the MiSeqReporter software Supported versions of files are specified in Import.py (as this collection of functions is called by that script) ''' #Cl...
# Copyright 2014, Sandia Corporation. Under the terms of Contract # DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain # rights in this software. from __future__ import division import io import collections import difflib import json import nose.tools import numbers import numpy import os ...
#!/usr/bin/env python # Copyright 2014 the V8 project authors. 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...
from __future__ import absolute_import, division from sys import stdout from os import remove from os.path import join, abspath, isdir import os.path from time import time, sleep from multiprocessing import RawValue, Lock, Process, cpu_count from string import Template import numpy as np from numpy.fft import irfftn ...
from collections import defaultdict from corehq.apps.users.models import DomainMembershipError from django.conf import settings from django.core.cache import cache from django.urls import reverse, resolve, Resolver404 from django.utils.translation import get_language from corehq.apps.domain.models import Domain from ...
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
# -*- coding: utf-8 -*- from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError class bitbay (Exchange): def describe(self): return self.deep_extend(super(bitbay, self).describe(), { 'id': 'bitbay', 'name': 'BitBay', 'countrie...
import matplotlib.pyplot as p from astropy.table import Table import os from os.path import exists from os.path import join as osjoin from corner import hist2d import seaborn as sb from scipy.stats import binned_statistic import astropy.units as u from cube_analysis.h2_models import (krumholz2013_ratio_model, ...
import json import time from calendar import timegm from datetime import datetime, timedelta from django.conf import settings from django.core import signing from django.urls import reverse from django.test import RequestFactory import jwt import mock from freezegun import freeze_time from rest_framework.exceptions ...
import http.client import threading import time import unittest import urllib.error import urllib.parse import urllib.request from unittest import mock import responses from cumulusci.oauth.salesforce import SalesforceOAuth2 from cumulusci.oauth.salesforce import CaptureSalesforceOAuth class TestSalesforceOAuth(uni...
# coding: utf-8 """ Copyright 2016 SmartBear Software 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...
import sys from django import http from django.core import signals from django.utils.encoding import force_unicode from django.utils.importlib import import_module class BaseHandler(object): # Changes that are always applied to a response (in this order). response_fixes = [ http.fix_location_header, ...
from django import forms from taggit.forms import TagField from dcim.models import Site from extras.forms import AddRemoveTagsForm, CustomFieldForm, CustomFieldBulkEditForm, CustomFieldFilterForm from tenancy.forms import TenancyForm from tenancy.forms import TenancyFilterForm from tenancy.models import Tenant from ut...
""" ********** Matplotlib ********** Draw networks with matplotlib. See Also -------- matplotlib: http://matplotlib.sourceforge.net/ pygraphviz: http://networkx.lanl.gov/pygraphviz/ """ # Copyright (C) 2004-2012 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Sw...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 OpenStack Foundation # 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....
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a cop...
#!/usr/bin/env python # Subclass of fract4d.fractal.T which works with a GUI import sys import os import struct import math import copy import random import gtk import gobject from fract4d import fractal,fract4dc,fracttypes, image, messages import utils, fourway from gtkio import gtkio class Hidden(gobject.GObjec...
# Copyright 2015 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...
""" Genetics Module of the CAB Sugarscape simulation. Encapsulates all aspects of the agent genetics. Credit to David Grotzky. """ __author__ = 'Michael Wagner' __version__ = '1.0' from cab.util.rng import get_RNG # TODO: Implement proper immune system. class Chromosome: """ This class handles all biologica...
import matplotlib.pyplot as plt import pandas as pd import collections import logging import networkx as nx import json # This reporter show only high level statistics in order to compare different tests class TestResultsSummary(object): def __init__(self): self.debugging = False self.test = None ...
import sys import shutil import os import stat import re import posixpath import pkg_resources import zipfile import tarfile from pip.exceptions import InstallationError from pip.backwardcompat import WindowsError, string_types, raw_input from pip.locations import site_packages, running_under_virtualenv from pip.log im...
import functools import imp import mock import sys from django.core.management.base import CommandError from django.db import models from django.test import TestCase, TransactionTestCase def _raise(exc_info): raise exc_info[0], exc_info[1], exc_info[2] def _cleanup(*models): """ Function to delete models fr...
# 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. """Top-level presubmit script for Chromium. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presu...
import math import numpy import pytest import cupy import cupy._core._accelerator as _acc import cupy.cuda.cutensor from cupy._core import _cub_reduction from cupy import testing @testing.gpu class TestSumprod: @pytest.fixture(autouse=True) def tearDown(self): yield # Free huge memory for s...
import os import sys root_path = os.path.abspath("../") if root_path not in sys.path: sys.path.append(root_path) import matplotlib.pyplot as plt from g_CNN.Layers import * from g_CNN.Optimizers import * from Util.Timing import Timing from Util.Bases import TFClassifierBase from Util.ProgressBar import ProgressBa...
# Copyright (c) 2013-2021 khal contributors # # 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, publi...
#!/usr/bin/env python # # Copyright 2008 The Closure Linter 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 #...
""" Experimental segmentation nodes. """ from __future__ import absolute_import from nodetree import node, writable_node import ocrolib from ocrolib import iulib, numpy from . import base from .. import stages class Rectangle(object): """ Rectangle class, Iulib-style. """ def __init__(self, x0, y0...
"""ProficiencyRatings API Version 1.0. This API client was generated using a template. Make sure this code is valid before using it. """ import logging from datetime import date, datetime from .base import BaseCanvasAPI from .base import BaseModel class ProficiencyRatingsAPI(BaseCanvasAPI): """ProficiencyRatings...
# Copyright 2015 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...
# Copyright 2019 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...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
"""Test file descriptor operations Made for Jython. """ import errno import os import sys import tempfile import test.test_support as test_support import unittest class TestFilenoTestCase(unittest.TestCase): def setUp(self): self.filename = tempfile.mktemp() self.fp = open(self.filename, 'w+') ...
import webapp2 import cgi import datetime from datetime import datetime import urllib import jinja2 import os import json import models from google.appengine.api import users from models import * def parseDateString(string): """To parse strings like this: 2013-04-12T10:29:00Z We only actually pull out the ...
# Copyright (c) 2012 OpenStack Foundation # # 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 ...
#!/usr/bin/env python # -*- coding: utf-8-*- class Config(): #default_db = 'db' default_subject = 'eecs' default_db = 'db' #'2016-db' #ip_adress="172.16.14.82" ip_adress="localhost:5000" igon_authorized = True engin_list_file = 'db/metadata/engin_list' engin_type_file = 'db/m...
# -*- coding: utf-8 -*- """ pint.quantity ~~~~~~~~~~~~~ :copyright: 2013 by Pint Authors, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import division, unicode_literals, print_function, absolute_import import copy import math import operator import fu...
################################################### # SE2017/views.py: Consists of all the valid methods of faculty module of SAMS-IIITS #__authors__ = "Vagdevi Kommineni", "Swathi Reddy", "Sonia","Indrojyothi Mondal" #__copyright__ = "Copyright 2017, SE2017 Course" #__Team__ = ["Vagdevi Kommineni", "Swathi Reddy", "So...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
#!/usr/bin/python # # occi_api.py - common functions, classes, and variables for Vcycle # # Andrew McNab, University of Manchester. # Luis Villazon Esteban, CERN. # Copyright (c) 2013-5. All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provi...
"""Base class for sparse matrix formats using compressed storage.""" from __future__ import division, print_function, absolute_import __all__ = [] from warnings import warn import operator import numpy as np from scipy._lib.six import zip as izip from scipy._lib._util import _prune_array from .base import spmatrix,...
""" A simple VTK input file for PyQt, the qt bindings for python. See http://www.trolltech.com for qt documentation, and http://www.river-bank.demon.co.uk or http://www.thekompany.com for the qt python bindings. This class is based on the vtkGenericRenderWindowInteractor and is therefore fairly powerful. It should al...
# -*- coding: utf-8 -*- """Dpkg build files generator.""" from __future__ import unicode_literals import logging import os import shutil import stat import time class DPKGBuildConfiguration(object): """Dpkg build configuration. Attributes: has_bin_directory (bool): True if the Python module creates ...
# Copyright 2022 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 applicable law o...
"""Forms for OAuth2 applications.""" from django import forms from django.core.exceptions import ValidationError from django.forms import widgets from django.utils.translation import ugettext, ugettext_lazy as _ from djblets.forms.widgets import CopyableTextInput, ListEditWidget from oauth2_provider.generators import ...
#!/usr/bin/env python import argparse import urllib import datetime import inspect import sqlite3 import os import requests from models import Track, TimeRange class ApiUsageLimitException(Exception): pass class LastFmApiException(Exception): pass class UserTracks(object): api_request_limit = 5 ...
from django.utils.translation import ugettext from livesettings import values from livesettings.models import SettingNotSet from livesettings.utils import is_string_like import logging log = logging.getLogger('configuration') _NOTSET = object() class ConfigurationSettings(object): """A singleton manager for Con...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
from __future__ import division from __future__ import unicode_literals import numpy as np from rdkit import Chem import deepchem as dc from deepchem.feat import Featurizer from deepchem.feat.atomic_coordinates import ComplexNeighborListFragmentAtomicCoordinates from deepchem.feat.mol_graphs import ConvMol, WeaveMol ...
import tensorflow as tf import prettytensor as pt import numpy as np from zutils.py_utils import * import zutils.tf_graph_utils as tgu import zutils.tf_math_funcs as tmf class NeuralNetworkTrainer: def __init__( self, data_module, loss_tensor, solver_type, solver_kwargs=None, disp_tens...
"""Test script for the dbm.open function based on testdumbdbm.py""" import unittest import glob from test.support import import_helper from test.support import os_helper # Skip tests if dbm module doesn't exist. dbm = import_helper.import_module('dbm') try: from dbm import ndbm except ImportError: ndbm = Non...
''' utils.py Functions that don't fit anywhere else. ''' from io import BytesIO import os import glob import socket import zipfile import itertools from PIL import Image import numpy as np ''' IMAGES ''' def scale(im, size=128): ''' accepts: PIL image, size of square sides returns: PIL image scaled so...