gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from numpy.testing import assert_equal import os import random import signal import subprocess import sys import threading import time import unittest # The ray import must come before the p...
from apetools.baseclass import BaseClass from basedevice import BaseDevice from apetools.connections.adbconnection import ADBShellConnection from apetools.commands.svc import Svc from apetools.commands.netcfg import NetcfgCommand from apetools.commands.iwcommand import IwCommand from apetools.commands.wlcommand impor...
# -*- coding: utf-8 -*- """ pygments.lexers.monte ~~~~~~~~~~~~~~~~~~~~~ Lexer for the Monte programming language. :copyright: Copyright 2016 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.token import Comment, Error, Keyword, Name, Number, Operator, \...
"""This module contains utilities for methods.""" import logging from math import ceil from typing import Dict, List, Optional, Union import numpy as np import scipy.stats as ss logger = logging.getLogger(__name__) def arr2d_to_batch(x, names): """Convert a 2d array to a batch dictionary columnwise. Param...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Interfaces to assorted Freesurfer utility programs. Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) >>> d...
# Copyright (c) 2014-2021, Jan Varho # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL...
#!/usr/bin/env python3 # Copyright (c) 2016-2018 The Machinecoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test label RPCs. RPCs tested are: - getaccountaddress - getaddressesbyaccount/getaddresses...
from __future__ import division from sympy import (Abs, Catalan, cos, Derivative, E, EulerGamma, exp, factorial, factorial2, Function, GoldenRatio, I, Integer, Integral, Interval, Lambda, Limit, Matrix, nan, O, oo, pi, Rational, Float, Rel, S, sin, SparseMatrix, sqrt, summation, Sum, Symbol, symbols, Wild,...
# 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 ...
#!/usr/bin/env vpython # Copyright 2021 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. """Unittests for test_result_util.py.""" import collections import copy import mock import unittest import test_result_util from test...
import argparse import os import shlex import sys import lit.reports import lit.util def parse_args(): parser = argparse.ArgumentParser(prog='lit') parser.add_argument('test_paths', nargs='+', metavar="TEST_PATH", help='File or path to include in the test suite') pars...
# 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...
#!/usr/bin/env python # # Gaze tracking calibration # - use calibration video heatmap and priors # # AUTHOR : Mike Tyszka # PLACE : Caltech # DATES : 2014-05-15 JMT From scratch # # This file is part of mrgaze. # # mrgaze is free software: you can redistribute it and/or modify # it under the terms of the GNU Ge...
from django.conf import settings from django.utils import six from django.contrib.auth import get_user_model from django.utils.six.moves import urllib_parse from django.utils.six.moves.urllib_request import urlopen, Request from uuid import uuid4 import datetime import inspect import importlib """ if settings.CAS_VER...
# This file is part of the Juju GUI, which lets users view and manage Juju # environments within a graphical interface (https://launchpad.net/juju-gui). # Copyright (C) 2013 Canonical Ltd. # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public Lice...
# 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 # dist...
# 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 ...
from __future__ import unicode_literals import datetime import re from django import forms from django.contrib.auth.forms import ( AdminPasswordChangeForm, AuthenticationForm, PasswordChangeForm, PasswordResetForm, ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget, SetPasswordForm, UserChangeForm, Use...
""" This module presents an interface to use the glm implemented in nistats.regression. It provides facilities to realize a second level analysis on lists of first level contrasts or directly on fitted first level models Author: Martin Perez-Guevara, 2016 """ import sys import time from warnings import warn import ...
# 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...
from __future__ import absolute_import import responses import six import sentry from mock import MagicMock from six.moves.urllib.parse import parse_qs, urlencode, urlparse from sentry.constants import ObjectStatus from sentry.integrations.github import GitHubIntegrationProvider from sentry.models import ( Ident...
#!/usr/bin/env python # $Id: authorizers.py 979 2012-01-23 19:32:22Z g.rodola $ # pyftpdlib is released under the MIT license, reproduced below: # ====================================================================== # Copyright (C) 2007-2012 Giampaolo Rodola' <g.rodola@gmail.com> # # All R...
try: from numba import autojit except ImportError: print "Unable to import numba, life_step will not be accelerated" def autojit(func): return func import itertools import numpy as np from mpi4py import MPI def communicate(grid, left, right, up, down): """ Communicates grid data. ...
# ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2012 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, # Lucio Torre # Copyright (c) 2009-2014 Richard Jones, Claudio Canepa # All rights reserved. # # Redistribution and use in source and binary forms, with o...
import json import base64 from typing import Dict, Iterator, List, Union from python_pachyderm.pfs import commit_from, SubcommitType from python_pachyderm.service import Service, pps_proto, pfs_proto from google.protobuf import empty_pb2, duration_pb2 class PPSMixin: """A mixin for pps-related functionality.""" ...
""" The config module holds package-wide configurables and provides a uniform API for working with them. Overview ======== This module supports the following requirements: - options are referenced using keys in dot.notation, e.g. "x.y.option - z". - keys are case-insensitive. - functions should accept partial/regex k...
# coding: utf-8 # # Copyright 2010-2014 Ning, Inc. # Copyright 2014-2020 Groupon, Inc # Copyright 2020-2021 Equinix, Inc # Copyright 2014-2021 The Billing Project, LLC # # The Billing Project, LLC licenses this file to you under the Apache License, version 2.0 # (the "License"); you may not use this file except in com...
# 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...
from .utils import PyKEArgumentHelpFormatter from . import kepmsg, kepio, kepkey, kepplot import re import numpy as np from astropy.io import fits as pyfits from scipy import optimize as opt from matplotlib import pyplot as plt from tqdm import tqdm import random __all__ = ['keppca'] def keppca(infile, outfile=None...
# Copyright 2014-2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
from __future__ import print_function, division import sys sys.dont_write_bytecode = True from ok import * """ <em>(I keep being asked... where to get models? where to get models? After this lecture, you will have access to hundreds of models as well as methods for interviewing humans to learn their models.)</em> # ...
# -*- coding: utf-8 -*- ''' Padding Oracle Exploit API ~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' from itertools import izip, cycle import logging __all__ = [ 'BadPaddingException', 'PaddingOracle', ] class BadPaddingException(Exception): ''' Raised when a blackbox decryptor reveals a padding oracle. Th...
"""Testing methods that normally need Handle server read access, by providing a handle record to replace read access.""" import sys if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest import json import b2handle from b2handle.handleclient import EUDATHandleClient from b2handle.uti...
from org.transcrypt.stubs.browser import __pragma__, __envir__ import logging from utils import TestHandler, resetLogging def logger_basics(test): resetLogging() logger = logging.getLogger("tester") test.check(logger.name) test.check(logger.level) test.check(logger.hasHandlers()) # level ...
import socket import struct import time import sys import re import random import logging import protocol.voldemort_client_pb2 as protocol from xml.dom import minidom from datetime import datetime import serialization ################################################################## # A Voldemort client. Each clien...
# 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 ...
#Rootul Patel 10/28/13 #HW9 - FlowSolver from Tkinter import * #Define window / lists / constants window = Tk() window.title("Flow Solver") gridSize = 6 clickCount = 0 tileCount = 0 endPoints = [] tileList = [] cells = [] colorList = ["blue", "green", "red", "yellow", "cyan", "orange", "magenta", "pink", "white"] end...
from __future__ import absolute_import from __future__ import print_function from functools import wraps from django.core.cache import cache as djcache from django.core.cache import get_cache from django.conf import settings from django.db.models import Q from typing import Any, Callable, Iterable, Optional from ze...
import requests import json from collections import defaultdict import time import random from sys import version_info import logging import re if version_info.major == 2: from urllib2 import unquote else: from urllib.parse import unquote GCM_URL = 'https://gcm-http.googleapis.com/gcm/send' class GCMExcepti...
import numpy as np import csv ################ ### Plotting ### ################ markers = (u'o', u'v', u'^', u'<', u'>', u'8', u's', u'p', u'*', u'h', u'H', u'D', u'd') def plot(y_data, x_data, index=None, y_index=None, title=None, xlabel=None, ylabel=None, legend=None, vertical_line=None, save=False, file_name...
""" Test of the classical LM model for language modelling """ from groundhog.datasets import LMIterator from groundhog.trainer.SGD_momentum import SGD as SGD_m from groundhog.trainer.SGD import SGD from groundhog.mainLoop import MainLoop from groundhog.layers import MultiLayer, \ RecurrentMultiLayer, \ Re...
""" Preparation for the main job stages """ import datetime import glob import json import subprocess from itertools import chain import py.error # pylint:disable=import-error import py.path # pylint:disable=import-error import pygit2 from dockci.models.job_meta.stages import JobStageBase from dockci.util import ...
import numpy as np #TODO: add plots to weighting functions for online docs. class RobustNorm(object): """ The parent class for the norms used for robust regression. Lays out the methods expected of the robust norms to be used by statsmodels.RLM. Parameters ---------- None : Some ...
# Copyright (c) 2014, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. #!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated Thu Apr 11 15:06:20 2013 by generateDS.py version 2.9a. # import sys import getopt import re as re_ import cybox.bindings.cybox_core as cybox_core_bindi...
from __future__ import unicode_literals from django.apps.registry import apps as global_apps from django.db import migrations, router from .exceptions import InvalidMigrationPlan from .loader import MigrationLoader from .recorder import MigrationRecorder from .state import ProjectState class MigrationExecutor(objec...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' expt.py (c) Will Roberts 12 January, 2017 Training an AI to play cribbage. ''' from __future__ import absolute_import, print_function import functools import itertools import random from cribbage.dqlearning import DQLearner from cribbage.game import compare_players ...
"""Test HomematicIP Cloud setup process.""" from asynctest import CoroutineMock, Mock, patch from homematicip.base.base_connection import HmipConnectionError from homeassistant.components.homematicip_cloud.const import ( CONF_ACCESSPOINT, CONF_AUTHTOKEN, DOMAIN as HMIPC_DOMAIN, HMIPC_AUTHTOKEN, HM...
# -*- coding: utf-8 -*- import random from icebergsdk.resources import Brand class IcebergObjectCreateMixin(object): """ Some shortcuts to create commons objects """ def delete_at_the_end(self, obj_to_delete): if not obj_to_delete in self._objects_to_delete: self._objects_to_dele...
""" Key bindings registry. A `Registry` object is a container that holds a list of key bindings. It has a very efficient internal data structure for checking which key bindings apply for a pressed key. Typical usage:: r = Registry() @r.add_binding(Keys.ControlX, Keys.ControlC, filter=INSERT) def handler...
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: audiodev.py """Classes for manipulating audio devices (currently only for Sun and SGI)""" from warnings import warnpy3k warnpy3k('the audiodev module...
# Copyright 2016 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 django.core.urlresolvers import reverse from rest_framework import status from rest_framework.test import APITestCase from django.contrib.auth.models import User from tracking.models import Organization, Clinic, ClinicUser, \ ReferringEntity, ReferringReportSetting, ClinicReportSetting class LoginBaseTest(A...
""" Support for installing and building the "wheel" binary package format. """ from __future__ import absolute_import import collections import compileall import csv import hashlib import logging import os.path import re import shutil import stat import sys import warnings from base64 import urlsafe_b64encode from ema...
# coding: utf-8 import struct import response class Request(object): SOP1 = 0xFF SOP2 = 0xFF did = 0x00 cid = 0x00 fmt = None def __init__(self, seq=0x00, *data): self.seq = seq self.data = data if not self.fmt: self.fmt = '%sB' % len(self.data) def __...
# Copyright 2014 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 ...
""" Fixed and improved version based on "extracting from C++ doxygen documented file Author G.D." and py++ code. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Extensively modified by C.M. Bruns April 2010. """ impor...
""" This script can be used to flux calibrate an image slicer 2D spectra to SDSS one (of the same target). Matches the slit width to SDSS fiber, takes into account the difference in area covered using a boosting factor and fractional pixels. .. Warning:: On should only fit the observed spectrum that has been recorded...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Bill' db.create_table('laws_bill', ( ('id', self.gf('django.db.models.fields.A...
import unittest import functools import numpy as np from numcube import Index, Axis, Cube, stack, concatenate from numcube.exceptions import InvalidAxisLengthError, NonUniqueDimNamesError from numcube.utils import is_axis, is_indexed def year_quarter_cube(): """Creates a sample 2D cube with axes "year" and "quar...
# finite-difference implementation of the diffusion equation with first-order # explicit time discretization # # We are solving phi_t = k phi_xx # # We run at several resolutions and compute the error. This uses a # cell-centered finite-difference grid # # M. Zingale (2013-04-07) import numpy import pylab import sys...
import os import sys import unittest import warnings from types import ModuleType from django.conf import ENVIRONMENT_VARIABLE, LazySettings, Settings, settings from django.core.exceptions import ImproperlyConfigured from django.http import HttpRequest from django.test import ( SimpleTestCase, TestCase, Transactio...
#!/usr/bin/env vpython # Copyright 2016 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. # pylint: disable=too-many-lines # pylint: disable=line-too-long """Generates chromium.perf{,.fyi}.json from a set of condensed confi...
"""Config flow to configure SmartThings.""" import logging from aiohttp import ClientResponseError from pysmartthings import APIResponseError, AppOAuth, SmartThings from pysmartthings.installedapp import format_install_url import voluptuous as vol from homeassistant import config_entries from homeassistant.const impo...
# # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from __future__ import division, print_function, absolute_import from scipy import special from scipy.special import entr, gammaln as gamln from numpy import floor, ceil, log, exp, sqrt, log1p, expm1, tanh, cosh, s...
# -*- test-case-name: twisted.logger.test.test_global -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ This module includes process-global state associated with the logging system, and implementation of logic for managing that global state. """ import sys import warnings from twisted.p...
# Copyright 2010 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
from __future__ import print_function, division, absolute_import import requests from doto.logger import log from doto.config import Config from doto.droplet import Droplet from doto.image import Image from doto.domain import Domain from doto.connection import connection from Crypto.PublicKey import RSA import os from...
#!/usr/bin/env python """ library for manipulating PDB structures """ import sys import os import re import shutil try: from io import StringIO ## for Python 2 except ImportError: from io import StringIO ## for Python 3 #import simplejson import gzip import tempfile from optparse import OptionParser from iterto...
# -*- coding: utf-8 -*- import httplib as http import contextlib import mock from nose.tools import * # flake8: noqa from tests.base import ApiTestCase, DbTestCase from tests import factories from tests.utils import make_drf_request from api.base.settings.defaults import API_BASE from api.base.serializers import JS...
import os, psycopg2, hashlib, MySQLdb, subprocess, docker from database import dSIPMultiDomainMapping from util.security import AES_CTR from shared import safeUriToHost # TODO: error handling here is pretty bad, we need to establish connection from main func and pass conn/cursors to sub funcs # I implemented an ...
"""Plot spatial P-E""" import re import sys script_dir = sys.path[0] import os import pdb import argparse import numpy as np import matplotlib.pyplot as plt import iris from iris.experimental.equalise_cubes import equalise_attributes import cartopy.crs as ccrs import cmdline_provenance as cmdprov repo_dir = '/'.join...
# Copyright (c) 2015 Hewlett-Packard Co. # 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 r...
#!/usr/bin/python # # Copyright (C) 2008 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 ...
# 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...
"""Support for NSW Rural Fire Service Feeds.""" from __future__ import annotations from datetime import timedelta import logging from aio_geojson_nsw_rfs_incidents import NswRuralFireServiceIncidentsFeedManager import voluptuous as vol from homeassistant.components.geo_location import PLATFORM_SCHEMA, GeolocationEve...
# LXC Python Library # for compatibility with LXC 0.8 and 0.9 # on Ubuntu 12.04/12.10/13.04 # Author: Elie Deloumeau # Contact: elie@deloumeau.fr # The MIT License (MIT) # Copyright (c) 2013 Elie Deloumeau # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associate...
"""Module 'rewrite.py' contains advanced term rewriting methods concerning partial fraction decomposition, combining together and collecting terms. """ from sympy.core.add import Add from sympy.core.mul import Mul from sympy.core.power import Pow from sympy.core.relational import Relational from sympy.core.symbol i...
import pytest import numpy as np import pybinding as pb from pybinding.repository import graphene from pybinding.support.deprecated import LoudDeprecationWarning lattices = { "graphene-monolayer": graphene.monolayer(), "graphene-monolayer-nn": graphene.monolayer(2), "graphene-monolayer-4atom": graphene.mo...
""" Test cases for .boxplot method """ import itertools import string import numpy as np import pytest import pandas.util._test_decorators as td from pandas import ( DataFrame, MultiIndex, Series, date_range, timedelta_range, ) import pandas._testing as tm from pandas.tests.plotting.common impor...
# -*- coding: utf-8 -*- """ Simple Generic Location Tracking System @copyright: 2011-14 (c) Sahana Software Foundation @license: MIT 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 So...
""" Testing for the gradient boosting module (sklearn.ensemble.gradient_boosting). """ import warnings import numpy as np from sklearn import datasets from sklearn.base import clone from sklearn.ensemble import GradientBoostingClassifier from sklearn.ensemble import GradientBoostingRegressor from sklearn.ensemble.grad...
from __future__ import unicode_literals import re import sys import types from django.conf import settings from django.core.urlresolvers import Resolver404, resolve from django.http import ( HttpRequest, HttpResponse, HttpResponseNotFound, build_request_repr, ) from django.template import Context, Engine, Templat...
""" Support for Synology NAS Sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.synologydsm/ """ import logging from datetime import timedelta from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.helpers.entity imp...
import os import json import settings import sys from watchdog.observers import Observer from watchdog.observers.api import ObservedWatch from kivy.app import App from kivy.core.window import Window from kivy.lang import Builder, Parser, ParserException from kivy.properties import ListProperty, StringProperty, \ O...
import pytest from tests.common import DummyPostData from wtforms.fields import IntegerField from wtforms.fields import StringField from wtforms.form import BaseForm from wtforms.form import Form from wtforms.meta import DefaultMeta from wtforms.validators import DataRequired from wtforms.validators import ValidationE...
# This script should really be documented import codecs from os import listdir, path import pypandoc import sys from re import sub import re # In[ ]: def get_rst_file_names(): def ends_with_rst(line): if line.endswith('.rst'): return True else: return False return fil...
# -*- coding: utf-8 -*- """ pygments.lexers.dsls ~~~~~~~~~~~~~~~~~~~~ Lexers for various domain-specific languages. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups, words, inc...
import os import sys from types import MethodType from fnmatch import fnmatch from optparse import make_option try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.core.management.base import NoArgsCommand, CommandError from django.template import Context, Templat...
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the #...
# Copyright 2014 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. import fnmatch import imp import logging import modulefinder import optparse import os import sys import zipfile from telemetry import test from telemetry.c...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # download.py file is part of spman # # spman - Slackware package manager # Home page: https://github.com/MyRequiem/spman # # Copyright (c) 2018 Vladimir MyRequiem Astrakhan, Russia # <mrvladislavovich@gmail.com> # All rights reserved # See LICENSE for details. """ Dow...
import json import requests import pprint # Allows Pretty Print of JSON import os # Allows for the clearing of the Terminal Window import csv # Allows outputting to CSV file import time, datetime import sys """ ****************************...
import numpy as np from scipy.ndimage import gaussian_filter, gaussian_laplace import itertools as itt import math from math import sqrt, hypot, log from numpy import arccos from ..util import img_as_float from .peak import peak_local_max from ._hessian_det_appx import _hessian_matrix_det from ..transform import integ...
""" ===================================================== Comparison of the different under-sampling algorithms ===================================================== The following example attends to make a qualitative comparison between the different under-sampling algorithms available in the imbalanced-learn package....
# 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...
import json import os import signal import time from typing import Any import pytest from google.protobuf.json_format import MessageToJson from proto_build.message_pb2 import Person from run_test_service_helper import start_service from tomodachi.envelope.proto_build.protobuf.sns_sqs_message_pb2 import SNSSQSMessage ...
from casexml.apps.case.xform import get_case_updates from corehq.apps.receiverwrapper import submit_form_locally from couchforms import convert_xform_to_json from dimagi.utils.couch.database import get_db from casexml.apps.case.models import CommCareCase from lxml import etree import os from datetime import datetime, t...
#!/Users/kerem/github-stuff/demo-gui-python/py3env/bin/python3 """PILdriver, an image-processing calculator using PIL. An instance of class PILDriver is essentially a software stack machine (Polish-notation interpreter) for sequencing PIL image transformations. The state of the instance is the interpreter stack. The...
''' The MIT License (MIT) Copyright (c) 2014 Hu Dou 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, publ...