gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import datetime import io from typing import Any, Dict from botocore.response import StreamingBody get_databases_response = { "DatabaseList": [ { "Name": "flights-database", "CreateTime": datetime.datetime(2021, 6, 9, 14, 14, 19), "CreateTableDefaultPermissions": [ ...
import os import time import tempfile from latex import latex def preview(expr, output='png', viewer=None, euler=True): """View expression in PNG, DVI, PostScript or PDF form. This will generate LaTeX representation of the given expression and compile it using available TeX distribution. Then it wi...
# Authorize.net gateways from payment_processor.gateways import GenericGateway from payment_processor.exceptions import * import payment_processor.methods URL_STANDARD = 'https://secure.authorize.net/gateway/transact.dll' URL_TEST = 'https://test.authorize.net/gateway/transact.dll' class AuthorizeNet(): gate...
# 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. """Utility functions used by the bisect tool. This includes functions related to checking out the depot and outputting annotations for the Buildbot waterfal...
# -*- coding: utf-8 -*- import six from girder.exceptions import ValidationException from girder.models.folder import Folder from girder.models.setting import Setting from girder.models.user import User from tests import base from girder_item_licenses.settings import PluginSettings def setUpModule(): base.enabl...
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira 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.apach...
import numpy as np import pandas as pd from scipy import integrate, optimize, special, stats import statsmodels as sm from . import results class Distribution: @staticmethod def _clean_data(series): """Remove any non-positive, null, or NAN observations.""" return series[series > 0].dropna()....
import os from os import environ as env from django.conf import global_settings import dj_database_url import sentry_sdk from sentry_sdk.integrations.django import DjangoIntegration import sentry_sdk.utils SENTRY_DSN = env.get("SENTRY_DSN", None) if SENTRY_DSN is not None: sentry_sdk.init( dsn=SENTRY_DSN, ...
import copy import re __all__ = ['Scanner', 'text_coords'] class Scanner(object): """ :class:`Scanner` is a near-direct port of Ruby's ``StringScanner``. The aim is to provide for lexical scanning operations on strings:: >>> from strscan import Scanner >>> s = Scanner("This is an exam...
"""Python class for nix derivations.""" import ast import os import json import sys import datadiff import yaml import rtyaml class Derivation(object): """A Python representation of a derivation.""" # Cache of parsed derivations, to avoid duplicate parsing. CACHE = {} def __init__(self, path, raw, o...
# Copyright (c) 2009-2010 Google, Inc. # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # This program is distributed i...
# 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. from common.chrome_proxy_benchmark import ChromeProxyBenchmark from integration_tests import chrome_proxy_measurements as measurements from integration_tests...
# function to turn an integer into a printable modifier def modifier_string(modifier): out = str(modifier); if out[0] != "-": out = "+" + out return out # function to generate an attack string for an attack def attack_string(attack): # start with the name and attack bonus out = attack["na...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Cloudscaling Group, 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/LI...
from __future__ import unicode_literals from django.contrib.auth.models import User from djblets.webapi.testing.decorators import webapi_test_template from reviewboard.webapi.tests.mixins_extra_data import (ExtraDataItemMixin, ExtraDataListMixin) class BaseCom...
from __future__ import absolute_import from random import randint from datetime import datetime, timedelta from .error import SpiderMisuseError from ..base import copy_config class BaseTask(object): pass class Task(BaseTask): """ Task for spider. """ def __init__(self, name='initial', url=None,...
''' /* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "...
# -*- coding: utf-8 -*- """ Covenant Add-on This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This prog...
# Copyright (c) 2012-2013 Andreas Sembrant # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # - Redistributions of source code must retain the above copyright # notice, this list of conditi...
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-instance-attributes class OCObject(OpenShiftCLI): ''' Class to wrap the oc command line tools ''' # pylint allows 5. we need 6 # pylint: disable=too-many-arguments def __init__(self, kind, namespace, ...
""" model predicting if an airbnb listing is fair or not """ #%matplotlib inline #%config InlineBackend.figure_format = 'retina' import numpy as np import pandas as pd #import seaborn as sns import os import sys #import pylab from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer from sklearn.cr...
import unittest from mock import patch import responses from notification_backend.notification_threads import NotificationThreads import json import jwt from boto3.exceptions import Boto3Error class TestFindThread(unittest.TestCase): def setUp(self): patcher1 = patch('notification_backend.notification_th...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools from io import BytesIO import numpy as np import warnings from .. import Variable from ..core.pycompat import iteritems, OrderedDict, basestring from ..core.utils import (Frozen, FrozenOrdered...
from datetime import timedelta try: from django.utils.timezone import now except ImportError: from datetime import datetime now = datetime.now from django.contrib import messages from django.core.urlresolvers import reverse from django.db import models from django.conf import settings from django.http impo...
from __future__ import absolute_import from __future__ import print_function from ..packages import six import os import shutil from xml.etree import ElementTree as ET if six.PY2: try: import arcpy from arcpy import mapping from arcpy import env arcpyFound = True except: ...
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
import logging from datetime import datetime, timedelta from nose.tools import eq_, ok_ from pyquery import PyQuery from django.contrib.auth.models import Group from fjord.base.tests import LocalizingClient, ProfileFactory, reverse from fjord.feedback.tests import ResponseFactory, ResponseEmailFactory from fjord.sea...
#!/usr/bin/python from scanner import Scanner import AST class Cparser(object): def __init__(self): self.scanner = Scanner() self.scanner.build() self.errors = False tokens = Scanner.tokens precedence = ( ("nonassoc", 'IFX'), ("nonassoc", 'ELSE'), ("right...
import sys import gym import gym.wrappers import threading import time import numpy as np import logging from atari_environment import AtariEnvironment from collections import OrderedDict from blocks import serialization import network as A3C # FIXME: have to increase depth limit slightly for A3C-LSTM agent sys.setrec...
class logpyl: """The logpyl class implements basic logging functionality for Python programs. A logpyl log consists of three files. The log file contains the events logged to a logpyl object. The metadata file contains information about the log, such as creation date, modification date, and name. Th...
""" Support for LimitlessLED bulbs. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.limitlessled/ """ # pylint: disable=abstract-method import logging from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_EFFECT, A...
""" Copyright (C) since 2013 Calliope contributors listed in AUTHORS. Licensed under the Apache 2.0 License (see LICENSE file). funcs.py ~~~~~~~~ Functions to process time series data. """ import logging import datetime import numpy as np import pandas as pd import xarray as xr from calliope import exceptions fro...
"""Utilities for all Certbot.""" import argparse import collections # distutils.version under virtualenv confuses pylint # For more info, see: https://github.com/PyCQA/pylint/issues/73 import distutils.version # pylint: disable=import-error,no-name-in-module import errno import logging import os import platform import...
# -*- coding: utf-8 -*- # # Luigi documentation build configuration file, created by # sphinx-quickstart on Sat Feb 8 00:56:43 2014. # # 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...
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from test_framework.comptool import TestManager, 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...
# 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...
# -*- coding: utf-8 -*- from gluon import * from gluon.storage import Storage from s3 import * from s3theme import NAV, SECTION # ============================================================================= class S3MainMenuLayout(S3NavigationItem): """ Custom Main Menu Layout """ @staticmethod def layou...
# -*- coding: utf-8 -*- """Operations run inside the report directory to extract data. :copyright: Copyright (c) 2019 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function from pykern import pkio from pykern i...
import numpy as np import itertools as it import gurobipy as gurobi from gurobipy import GRB as G from textwrap import dedent from . import get_logger, freeze, subdict _LOG = get_logger('adt17') _STATUS = { 1: 'LOADED', 2: 'OPTIMAL', 3: 'INFEASIBLE', 4: 'INF_OR_UNBD', 5: 'UNBOUNDED', 6: 'CU...
from __future__ import print_function from collections import namedtuple from fileinput import input from operator import itemgetter Coord = namedtuple('Coord', 'y x') Delta = namedtuple('Delta', 'y x') Cell = namedtuple('Cell', 'y x value') Quadrant = namedtuple('Quadrant', 'y_start y_end x_start x_end') MOVE_LEFT =...
from binascii import hexlify, unhexlify import traceback import sys from electrum.util import bfh, bh2u, versiontuple, UserCancelled from electrum.bitcoin import (b58_address_to_hash160, xpub_from_pubkey, deserialize_xpub, TYPE_ADDRESS, TYPE_SCRIPT, is_address) from electrum import consta...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'EventProcessingException' db.create_table(u'payments_even...
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HPP3_CompleteLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HPP3_CompleteLHS """ # Flag this instance as compiled now self.is_compiled = True super(HPP3_Co...
from datetime import datetime from typing import Dict, Optional from kombu.exceptions import OperationalError from abonapp.tasks import customer_nas_command, customer_nas_remove from agent.commands.dhcp import dhcp_commit, dhcp_expiry, dhcp_release from devapp.models import Device, Port as DevPort from django.conf imp...
# *-* coding: utf-8 *-* # This file is part of butterfly # # butterfly Copyright(C) 2015-2017 Florian Mounier # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or ...
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # 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 condit...
# Create your views here. # import importlib import sys import urllib2 import os import mimetypes from django.utils import simplejson from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.utils.translation import ugettext_lazy as _ from django.shortcuts import render_to...
# Copyright (C) 2012 Google, Inc. # Copyright (C) 2010 Chris Jerdonek ([email protected]) # # 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 # n...
# Copyright (c) 2012 NetApp, Inc. All rights reserved. # Copyright (c) 2014 Ben Swartzlander. All rights reserved. # Copyright (c) 2014 Navneet Singh. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Bob Callaw...
############################################################################### # read_clusterdata.py: module to read APOGEE data on globular clusters ############################################################################### import sys import numpy import apogee.tools.read as apread from apogee.tools import bitma...
import json from .test_base import Base, BaseTestCase from .test_fixtures import Account from .resource import CollectionResource, SingleResource class AccountCollectionResource(CollectionResource): model = Account default_sort = ['id'] class AccountResource(SingleResource): model = Account class GetO...
from main import Node def DeepHoldout(): return Node() def ClipTest(): return Node() def BlackOutside(): return Node() def Denoise(): return Node() def Laplacian(): return Node() def SphericalTransform(): return Node() def Sharpen(): return Node() def OCIOCDLTransform(): return Node() d...
import pycuda.autoinit import pycuda.driver as drv import numpy import time from pycuda.compiler import SourceModule from jinja2 import Environment, PackageLoader def main(): numpy.set_printoptions(precision=4, threshold=10000, linewidth=150) #Set up global timer...
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Red...
#!/usr/bin/env python # Copyright (C) 2012 OpenStack, 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...
# GPIO Zero: a library for controlling the Raspberry Pi's GPIO pins # Copyright (c) 2019 Jeevan M R <[email protected]> # Copyright (c) 2019 Dave Jones <[email protected]> # Copyright (c) 2019 Ben Nuttall <[email protected]> # Copyright (c) 2018 SteveAmor <[email protected]> # # Redistribution an...
# Copyright 2014 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
import argparse from datetime import datetime import fflogs import re def timestamp_type(arg): """Defines the timestamp input format""" if re.match('\d{2}:\d{2}:\d{2}\.\d{3}', arg) is None: raise argparse.ArgumentTypeError("Invalid timestamp format. Use the format 12:34:56.789") return arg def par...
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne jp> # # 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 # # h...
#!/usr/bin/env python # Copyright 2008-2013 Nokia Siemens Networks Oyj # # 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 req...
# -*- coding: utf-8 -*- from classytags.arguments import Argument from classytags.core import Options, Tag from classytags.helpers import InclusionTag from cms.constants import PUBLISHER_STATE_PENDING from cms.toolbar.utils import get_plugin_toolbar_js from cms.utils.admin import render_admin_rows from sekizai.helpers ...
# Copyright (c) 2015 Scality # # 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, s...
#!/usr/bin/env python # # Copyright 2016, 2017 IBM US, 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 applicabl...
# 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...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Copyright 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 a...
from flask import Flask import webmaster.decorators as decorators import webmaster.core as core #=============================================================================== # EXTENDS def test_extends(): def plugin(view, **kwargs): class SubView(object): def inner(self): pa...
import unittest import pyCGM_Single.pyCGM as pyCGM import numpy as np import pytest rounding_precision = 6 class TestPycgmAngle(): """ This class tests the functions used for getting angles in pyCGM.py: getangle_sho getangle_spi getangle getHeadangle getPelangle """ @pytest.mark.p...
#!/usr/bin/env python import os import re import sys from datetime import datetime import click from send2trash import send2trash # Verify that external dependencies are present first, so the user gets a # more user-friendly error instead of an ImportError traceback. from elodie.dependencies import verify_dependenci...
"""The tests for the MQTT device tracker platform.""" import pytest from homeassistant.components.device_tracker.const import DOMAIN, SOURCE_TYPE_BLUETOOTH from homeassistant.const import CONF_PLATFORM, STATE_HOME, STATE_NOT_HOME from homeassistant.setup import async_setup_component from tests.async_mock import patch...
#!/usr/bin/python #============================ adjust path ===================================== import sys import os if __name__ == '__main__': here = sys.path[0] sys.path.insert(0, os.path.join(here, '..')) #============================ imports ========================================= import Tkinter im...
#!/usr/bin/env python # -*- coding: utf-8 -*- __all__ = ['baidu_download'] from ..common import * from .embed import * from .universal import * def baidu_get_song_data(sid): data = json.loads(get_html( 'http://music.baidu.com/data/music/fmlink?songIds=%s' % sid, faker=True))['data'] if data['xcode'...
""" The cluster module contains the definitions for retrieving and manipulating cluster information. """ from qds_sdk.qubole import Qubole from qds_sdk.resource import Resource from argparse import ArgumentParser from qds_sdk import util import logging import json log = logging.getLogger("qds_cluster") def str2boo...
import cStringIO, struct, socket ### from rtypes import * from misc import FunctionMapper from rexceptions import RResponseError, REvalError from taggedContainers import TaggedList, asTaggedArray, asAttrArray DEBUG = False class Lexeme(list): def __init__(self, rTypeCode, length, hasAttr, lexpos): list.__...
# 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 2008-2015 Nokia Solutions and Networks # # 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...
import requests from xml.etree import cElementTree as ElementTree # for zillow API from .pyzillowerrors import ZillowError, ZillowFail, ZillowNoResults from . import __version__ class ZillowWrapper(object): """This class provides an interface into the Zillow API. An API key is required to create an instanc...
import datetime from typing import List from flask import abort, render_template, request, url_for from flask_restx import Namespace, Resource from sqlalchemy import func as sa_func from sqlalchemy.sql import and_, false, true from CTFd.api.v1.helpers.request import validate_args from CTFd.api.v1.helpers.schemas impo...
import chainer import chainerx import numpy from chainerx_tests import math_utils from chainerx_tests import op_utils @op_utils.op_test(['native:0', 'cuda:0']) @chainer.testing.parameterize(*( chainer.testing.product([ chainer.testing.from_pytest_parameterize( 'shape', [ (2, 2...
# Copyright 2015-2016 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...
import datetime from flask_admin.babel import lazy_gettext from flask_admin.model import filters from .tools import parse_like_term from mongoengine.queryset import Q class BaseMongoEngineFilter(filters.BaseFilter): """ Base MongoEngine filter. """ def __init__(self, column, name, options=None, d...
#!/usr/bin/python import sys import os from oauth2client import client import gflags import httplib2 from apiclient.discovery import build from oauth2client.file import Storage from oauth2client.client import OAuth2WebServerFlow from oauth2client.tools import run from datetime import datetime, date, time, timed...
# -*- coding: utf-8 -*- """Testing and demonstrating program for 'lambert' of pytwobodyorbit Created on Fri Dec 14 08:44:47 2018 @author: Shushi Uetsuki/whiskie14142 """ import numpy as np import tkinter from pytwobodyorbit import TwoBodyOrbit from pytwobodyorbit import lambert from mpl_toolkits.mplot3d import Axes3D...
""" Test for Nest climate platform for the Smart Device Management API. These tests fake out the subscriber/devicemanager, and are not using a real pubsub subscriber. """ from google_nest_sdm.device import Device from google_nest_sdm.event import EventMessage from homeassistant.components.climate.const import ( ...
# Copyright 2014 Cloudbase Solutions Srl # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Compares theorerical scattering curves generated from PDB structure files to experimental x-ray and neutron scattering curves. PDBs are converted into sphere models and the Debye equation used to compute the theoretical curves. The original sphere models are surrounded ...
# 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 -*- """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to PyPI's pythonhosted.org). """ from base64 import standard_b64encode from distutils import log from distutils.errors import DistutilsOptionError import os import socket import zipfile import tempfile import ...
import os import sys import yaml import inspect import io from datetime import datetime from functools import wraps, partial import aniso8601 from werkzeug.contrib.cache import SimpleCache from werkzeug.local import LocalProxy, LocalStack from jinja2 import BaseLoader, ChoiceLoader, TemplateNotFound from flask import ...
# -*- coding: utf-8 -*- from twisted.python.usage import Options from xml.dom.minidom import parse as XMLParser from xml.parsers.expat import ExpatError from sys import exit, stderr from re import match def raiseMatch(re, data): if match(re, data) is None: raise AssertionError, data + ' did not match ' + re r...
""" Module: Machine Learning Models Project: Sparx Authors: Bastin Robins. J Email : [email protected] """ from datetime import datetime from urllib import urlencode import logging import numpy as np import pandas as pd from sklearn import preprocessing from sklearn.preprocessing import LabelEncod...
from __future__ import division, unicode_literals from ml.similarity import pre_process from textblob import TextBlob as tb import nltk, re, pprint import nltk.chunk from nltk.corpus import twitter_samples from nltk import tag from nltk.corpus import wordnet from nltk.corpus.reader.wordnet import POS_LIST import math ...
import importlib from django import forms from django.contrib.auth.models import AnonymousUser, Permission, User from django.http import HttpRequest, HttpResponse, HttpResponseRedirect from django.template import Context, Template from django.views.generic.base import View from djblets.features.testing import override...
# Copyright 2013 Donald Stufft # # 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, so...
import enum import json import os import re import typing as t from collections import abc from collections import deque from random import choice from random import randrange from threading import Lock from types import CodeType from urllib.parse import quote_from_bytes import markupsafe if t.TYPE_CHECKING: impo...
import getpass import binascii import logging logger = logging.getLogger(__name__) import sys import json import time from decimal import Decimal as D import bitcoin as bitcoinlib import bitcoin.rpc as bitcoinlib_rpc from bitcoin.core import CBlock from counterpartylib.lib import util from counterpartylib.lib import ...
import re import time import logging from logging.handlers import TimedRotatingFileHandler import datetime from influxdb import InfluxDBClient try: import statsd except ImportError: pass logger = logging.getLogger('graphite_influxdb') try: from graphite_api.intervals import Interval, IntervalSet from ...
# 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...