gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 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 law or a...
''' Given a hypotheses graph and weights, this script tries to find split points where there are not many mergers, splits the graph into N parts, and tracks them independently. ''' from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals import os imp...
from __future__ import annotations import asyncio from enum import Enum from inspect import isawaitable from typing import Any, Dict, List, Optional, Tuple, Union, cast from sanic_routing import BaseRouter, Route, RouteGroup # type: ignore from sanic_routing.exceptions import NotFound # type: ignore from sanic_rou...
import datetime import decimal import os import StringIO from django.conf import settings from django.utils import six import commonware.log import defusedxml.ElementTree as etree from jinja2 import Environment, FileSystemLoader from rest_framework.exceptions import ParseError from rest_framework.parsers import JSONP...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import * from .constants import * from numba import jit import numpy as np class DependencySelector(object): """ Fast method for identifying depen...
#!/usr/bin/python -u # Copyright (c) 2010-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 ap...
import numpy from chainer import backend from chainer import function_node import chainer.functions import chainer.utils from chainer.utils import type_check import chainerx class SelectorBase(function_node.FunctionNode): """Select an array element from a given axis or set of axes.""" def __init__(self, axi...
""" paper_experiments.py Uses other modules to re-produce the results and paper graphs contained in the paper. Authors wanting to reproduce or compare to our algorithm can run the experiments by executing: python paper_experiments.py from the command line Paper: Mark Fuge, Josh Stroud, Alice Agogino. "Automatically ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2010 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 # # ...
#!/usr/bin/env python """ .. See the NOTICE file distributed with this work for additional information regarding copyright ownership. 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 ...
# coding=utf-8 # Copyright 2017 The Tensor2Tensor 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...
import os import glob import shutil from setup_app import paths from setup_app.static import PersistenceType from setup_app.static import AppType, InstallOption from setup_app.config import Config from setup_app.utils import base from setup_app.installers.jetty import JettyInstaller class SamlInstaller(JettyInstaller...
#!/usr/bin/env python import commands import os import popen2 import quopri import base64 import re import shutil import string import sys import time # Fix for older versions of Python try: True except NameError: True,False = 1,0 # Singleton-like design pattern # See: http://aspn.activestate.com/ASPN/...
from unittest import TestCase import networkx from six import StringIO from gtfspy.routing.connection import Connection from gtfspy.routing.label import min_arrival_time_target, LabelTimeWithBoardingsCount, LabelTime from gtfspy.routing.multi_objective_pseudo_connection_scan_profiler import MultiObjectivePseudoCSAPro...
"""Helpful utilities for building analysis pipelines. """ import gzip import os import tempfile import time import shutil import contextlib import itertools import functools import random import ConfigParser import collections import fnmatch import subprocess import toolz as tz import yaml try: from concurrent imp...
# # 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 us...
import copy import threading import time import warnings from collections import deque from contextlib import contextmanager import _thread import pytz from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import DEFAULT_DB_ALIAS, DatabaseError from django.db.backends...
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # # License: Simplified BSD import os.path as op import warnings import numpy as np from ...
# -*- coding: utf-8 -*- from __future__ import absolute_import import numpy as np from .. import backend as K from .. import activations from .. import initializers from .. import regularizers from .. import constraints from ..engine import Layer from ..engine import InputSpec from ..legacy import interfaces def _ti...
# # 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 # ...
""" Custom manager for Objects. """ import re from itertools import chain from django.db.models import Q from django.conf import settings from django.db.models.fields import exceptions from evennia.typeclasses.managers import TypedObjectManager, TypeclassManager from evennia.typeclasses.managers import returns_typeclas...
# Copyright 2014 Big Switch Networks, 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 ...
import sys import os import numpy as np from sklearn.svm import SVC from sklearn.multiclass import OneVsRestClassifier from sklearn import cross_validation from sklearn.metrics import confusion_matrix import pylab as plt from sklearn.metrics import accuracy_score import logging import json from collections import def...
from __future__ import unicode_literals from flask import Flask, render_template_string, Markup from unittest import TestCase import mock import misaka from misaka import (EXT_AUTOLINK, EXT_FENCED_CODE, EXT_LAX_HTML_BLOCKS, EXT_NO_INTRA_EMPHASIS, EXT_SPACE_HEADERS, EXT_STRIKETHROUGH, EXT_SUPERSCRIPT, EXT_TABLE...
#!/usr/bin/env python # Copyright 2018 The Kubernetes 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 appli...
# filtering regular expressions, used to strip out annoyances like ads, # web bugs and the like from feeds import re import tembozapp.degunk as degunk # uncomment this if you have made changes to the degunk module # reload(degunk) filter_list = [ # don't mess with breaks degunk.Re('(<br\s+[^>]*>)', 0, '<br>'), ...
# Copyright (c) 2013 Red Hat, 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 require...
"""Tests for Philips Hue config flow.""" import asyncio from unittest.mock import Mock, patch import aiohue import pytest import voluptuous as vol from homeassistant.components.hue import config_flow, const, errors from tests.common import MockConfigEntry, mock_coro async def test_flow_works(hass, aioclient_mock):...
# 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 # distribu...
# Classes for scrAPI Harvesters from __future__ import unicode_literals import abc import json import logging from datetime import timedelta, date from lxml import etree from scrapi import util from scrapi import requests from scrapi import registry from scrapi import settings from scrapi.base.schemas import OAISCHE...
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of t...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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...
# 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...
# Copyright (c) 2014 eBay Software Foundation # Copyright 2015 HP Software, 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.o...
# Copyright 2018 The TensorFlow Probability 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 o...
# Copyright (C) 2013-2016 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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.a...
# 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...
# # based on # https://github.com/spacetelescope/understanding-json-schema/blob/master/source/sphinxext/jsonschemaext.py # # Copyright (c) 2013, Space Telescope Science Institute # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the...
""" This file contains a minimal set of tests for compliance with the extension array interface test suite, and should contain no other tests. The test suite for the full functionality of the array is located in `pandas/tests/arrays/`. The tests in this file are inherited from the BaseExtensionTests, and only minimal ...
# -*- coding: utf-8 -*- # Copyright 2015 Cyan, Inc. # Copyright 2016, 2017, 2018 Ciena 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/LICEN...
from __future__ import annotations import sys import libtbx.pkg_utils import dials.precommitbx.nagger if sys.version_info.major == 2: sys.exit("Python 2 is no longer supported") libtbx.pkg_utils.define_entry_points( { "dxtbx.profile_model": [ "gaussian_rs = dials.extensions.gaussian_rs_...
from __future__ import print_function from __future__ import absolute_import from __future__ import division from compas.geometry._core import distance_point_point_xy from compas.geometry._core import distance_point_line_xy from compas.geometry._core import closest_point_on_segment_xy __all__ = [ 'is_ccw_xy', ...
#!/usr/bin/env python3 import os import sys import random import time from random import seed, randint import argparse import platform from datetime import datetime from myPersonalFunctions import * import imp # Useful codes # os.system("awk '{print $NF}' all_wham.dat > e_total") # tr " " "\n" # sed 1d # sort -u -k 3 #...
''' This module contains all the stuff to make your way from python code to a dynamic library, see __init__.py for exported interfaces. ''' from pythran.backend import Cxx from pythran.config import cfg, make_extension from pythran.cxxgen import BoostPythonModule, Define, Include, Line, Statement from pythran.cxxgen i...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Include content from CSV files as tables in Pandoc. It is based on: https://github.com/mb21/pandoc-placetable https://github.com/baig/pandoc-csv2table """ from __future__ import print_function import argparse import csv import json import sys from io import StringI...
import json import datetime import logging import re from dateutil.parser import parse from redash.utils import JSONEncoder, parse_human_time from redash.query_runner import * logger = logging.getLogger(__name__) try: import pymongo from bson.objectid import ObjectId from bson.timestamp import Timestamp ...
# coding: utf-8 from __future__ import unicode_literals import unittest from axon import loads, dumps from datetime import date, time, datetime, tzinfo class DateTime10TestCase(unittest.TestCase): def setUp(self): pass def test_date1(self): v = loads('^2010-12-01')[0] self.assertEqua...
# 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 # d...
# The idea is to get an algorithm to find a suitable triples refugee-refugee-local-local # Advantages: 2 on 2 should a balanced and neutral group. # Disadvantages: it might be hard to choose 2 refugees import networkx as nx from get_score import * from lat_long import * class getdata(): def createdatabase(self,U...
#pylint: disable = F0401 from re import sub from java.util.UUID import fromString as juuid from json import dumps as json_dumps, loads as json_loads import org.bukkit as bukkit import org.bukkit.Location as Location import org.bukkit.entity.Player as Player import org.bukkit.event.player.PlayerTeleportEvent.TeleportCau...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains functions for matching coordinate catalogs. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from ..extern import six from .representation import...
import asyncio import io import mimetypes import os from abc import ABC, abstractmethod from multidict import CIMultiDict from . import hdrs from .helpers import (content_disposition_header, guess_filename, parse_mimetype, sentinel) from .streams import DEFAULT_LIMIT, DataQueue, EofStream, Strea...
# -*- test-case-name: txdav.carddav.datastore,txdav.carddav.datastore.test.test_sql.AddressBookSQLStorageTests -*- ## # Copyright (c) 2010-2014 Apple 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...
# # Module providing various facilities to other parts of the package # # billiard/util.py # # Copyright (c) 2006-2008, R Oudkerk --- see COPYING.txt # Licensed to PSF under a Contributor Agreement. # from __future__ import absolute_import import sys import errno import functools import atexit try: import cffi ex...
from collections import namedtuple import sys import traceback from src.shared.logconfig import newLogger log = newLogger(__name__) # Normal delimiter; separates tokens in messages. TOKEN_DELIM = " " # Used to indicate the start of an unsafe string; must be the first character # after TOKEN_DELIM. START_STRING = ...
#!/usr/bin/env python """ Extension for individual surveys. """ import os import numpy as np import pylab as plt import pandas as pd from collections import OrderedDict as odict from mpl_toolkits.basemap import Basemap from mpl_toolkits.axisartist.grid_helper_curvelinear import GridHelperCurveLinear from mpl_toolkits...
from __future__ import print_function import os import sys import time import shutil import logging import datetime import traceback import subprocess import numpy as np from ..core.environ import environ from ..core.logio import get_logger, add_filehandler, splash from .tabular import TabularWriter IOPT = 0 LASTEVAL...
__author__ = 'hfriedrich' import luigi import argparse import luigi_evaluation_workflow # This is the executed experiments script for the link prediction evaluation # (e.g. on the 'testdataset_20141112' or a newer version). # It executes the luigi_evaluation_workflow with the parameters specified below. # # how to r...
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import errno import logging import os import sys from contextlib import contextmanager i...
""" - Rule for properties 1. Shortcuts: q, qdot, tau, t, ... 2. Numbers: ndofs, nframes, ... """ import os.path import pydart_api as papi import numpy as np def init(): papi.init() def create_world(step, skel_path=None): return World(step, skel_path) class World(object): def __init__(self, step, skel...
import chainer import chainer.functions as F from chainer import testing import numpy as np import onnx import pytest from onnx_chainer import export from onnx_chainer.testing import input_generator from onnx_chainer_tests.helper import ONNXModelChecker from onnx_chainer_tests.helper import ONNXModelTest @testing.pa...
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from email import utils from django.db import connection from olympia import amo from olympia.amo.tests import TestCase from olympia.addons.models import ( Addon, CompatOverride, CompatOverrideRange, IncompatibleVersions) from olympia.applications.m...
# -*- coding: utf-8 -*- # # Copyright (c) 2016 NORDUnet A/S # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # ...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ This module presents an interface to use the glm implemented in nipy.algorithms.statistics.models.regression. It contains the GLM and contrast classes that are meant to be the main objects of fMRI data...
#!/usr/bin/env python """ File contains functions to compute counts for constructing Markov chains for the dynamics of edges on a two-layer multiplex network. """ import numpy as np import networkx as nx import logging #set up logs logger = logging.getLogger("multiplex_markov_chain") logger.setLevel(logging.DEBUG) c...
# 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 ...
import datetime import re import binascii import random import string import logging from django import forms from django.db import models from django.forms import fields from django.utils.encoding import force_text, smart_bytes import sys from core.encryption.Factories import FactoryEncryptionServices as efac from c...
"""Fixer for __metaclass__ = X -> (metaclass=X) methods. The various forms of classef (inherits nothing, inherits once, inherints many) don't parse the same in the CST so we look at ALL classes for a __metaclass__ and if we find one normalize the inherits to all be an arglist. For one-liner classes ('c...
import pygame import random import csv import agent import numpy as np import sklearn names = [] with open("agent-names.csv", "rt") as f: reader = csv.reader(f) for row in reader: names.append(row[0]) seed = 224225 running = True random.seed(seed) class Window: def __init__(self): pygame.init() # init d...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 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 descendant package tracking code from test_framework.test_framework import BitcoinTestFramework f...
#!/usr/bin/env python # -*- coding: utf-8 -*- """A python command line tool to automate building and deployment of Sphinx documentation on GitHub static pages""" from subprocess import call import os from distutils.dir_util import copy_tree, remove_tree import shutil from tempfile import mkdtemp from datetime import ...
""" Low level *Skype for Linux* interface implemented using *XWindows messaging*. Uses direct *Xlib* calls through *ctypes* module. This module handles the options that you can pass to `Skype.__init__` for Linux machines when the transport is set to *X11*. No further options are currently supported. Warning PyGTK fr...
import sys import os import time import numpy as np import unittest import ray from ray import tune from ray.tune.ray_trial_executor import RayTrialExecutor from ray.tune.trial import Trial from ray.tune import Callback from ray.tune.utils.placement_groups import PlacementGroupFactory from ray.util import placement_gr...
import Dataset import os import sys import math import timeit import argparse import tensorflow as tf import numpy as np import logging as log import matplotlib.pyplot as plt from sklearn import metrics from Dataset import IMG_SIZE, LABELS_DICT TRAIN_IMAGE_DIR = os.getcwd() + '/dataset' TEST_IMAGE_DIR = os.getcwd() ...
### Standard library imports from cmd import Cmd import getpass import re ### Local imports from smartt_client import SmarttClient from smartt_client import SmarttClientException HEADERCOLORCODE = "\033[95m" BLUECOLORCODE = "\033[94m" GREENCOLORCODE = "\033[92m" YELLOWCOLORCODE = "\033[93m" REDCOLORCODE = "\033[91m...
import bpy import array import numpy import os import xml.etree.ElementTree as element_tree import struct import bpy_extras from bpy_extras.io_utils import ExportHelper import bmesh import shutil import xml.dom.minidom as minidom import mathutils _texture_mapping = dict() # Function that makes xml trees pretty for pr...
""" This is a bottom-up chart parser for a fragment of English. It uses the active chart datastructure. The design is based on Steve Isard's LIB CHART, a teaching tool (written in 1983) that comes with the wonderful Poplog AI development environment. This has been adjusted to work with a lattice of input possibilitie...
"""The tests for the Alexa component.""" # pylint: disable=protected-access import asyncio import json import datetime import pytest from homeassistant.core import callback from homeassistant.setup import async_setup_component from homeassistant.components import alexa SESSION_ID = "amzn1.echo-api.session.0000000-00...
# Copyright (c) 2004 Ian Bicking. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the fo...
# Copyright (c) 2015 Red Hat, 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 require...
import ctypes import ctypes.util import numpy from numpy.ctypeslib import ndpointer from ..util import coords from ..util import _load_extension_libs _lib, _ext_loaded= _load_extension_libs.load_libgalpy() def actionAngleStaeckel_c(pot,delta,R,vR,vT,z,vz,u0=None,order=10): """ NAME: actionAngleStaeckel...
# # 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 # ...
# 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 ...
# Copyright (c) 2014 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 ...
from tastypie import fields from tastypie.resources import ModelResource, Resource, ALL, Bundle from tastypie.authentication import ApiKeyAuthentication from tastypie.authorization import Authorization from tastypie.serializers import Serializer from snappybouncer.models import Conversation, UserAccount, Ticket from sn...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
import unittest from os.path import join from sys import version as py_version from unittest import mock from pythonforandroid.recommendations import ( check_ndk_api, check_ndk_version, check_target_api, read_ndk_version, check_python_version, print_recommendations, MAX_NDK_VERSION, REC...
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# 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...
"""A connector for Twitch.""" import asyncio import hashlib import hmac import json import logging import os import re import secrets import aiohttp from voluptuous import Required from opsdroid.connector import Connector, register_event from opsdroid.const import ( TWITCH_API_ENDPOINT, TWITCH_IRC_MESSAGE_REG...
# 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...
""" ------------------------------------------------------- views holds all the views ------------------------------------------------------- Author: Dallas Fraser ID: 110242560 Email: fras2560@mylaurier.ca Version: 2014-09-18 ------------------------------------------------------- """ from flask import render_...
import yt import numpy as np from galaxy_analysis.plot.plot_styles import * fsize = 22 import matplotlib.pyplot as plt from collections import Iterable, OrderedDict import glob import os import h5py import deepdish as dd # parallel from multiprocessing import Pool from contextlib import closing import itertools # ...
# LICENSE: Simplified BSD https://github.com/mmp2/megaman/blob/master/LICENSE import warnings from itertools import product import numpy as np from numpy.testing import assert_array_equal import scipy.sparse as sp from nose.tools import assert_raises, assert_true, assert_false, assert_equal from megaman.utils.valid...
import argparse import os import random from fnmatch import fnmatchcase import sys import re import shlex import string import pkg_resources import itertools import pluggy import tox.interpreters from tox import hookspecs import py import tox iswin32 = sys.platform == "win32" default_factors = {'jython': 'jython',...
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange # ----------------------------------------------------------------------------- try...
import errno import os from functools import wraps import re import click import sys import logbook import pandas as pd from catalyst.marketplace.marketplace import Marketplace from six import text_type from catalyst.data import bundles as bundles_module from catalyst.exchange.exchange_bundle import ExchangeBundle fr...
# -*- coding: utf-8 -*- ''' Authors: Gert Mulder, Tim Hessels UNESCO-IHE 2016 Contact: t.hessels@unesco-ihe.org Repository: https://github.com/wateraccounting/wa Module: Products/ETref ''' # import general python modules import os import gdal import numpy as np import pandas as pd import subprocess import osr...
"""Calibration of predicted probabilities.""" # Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Balazs Kegl <balazs.kegl@gmail.com> # Jan Hendrik Metzen <jhm@informatik.uni-bremen.de> # Mathieu Blondel <mathieu@mblondel.org> # # License: BSD 3 clause import warnings from...
# # The Python Imaging Library. # $Id$ # # EPS file handling # # History: # 1995-09-01 fl Created (0.1) # 1996-05-18 fl Don't choke on "atend" fields, Ghostscript interface (0.2) # 1996-08-22 fl Don't choke on floating point BoundingBox values # 1996-08-23 fl Handle files from Macintosh (0.3) # 2001-02-17 fl ...