gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# -*- coding: utf-8 -*-
"""Tests for classes representing blacklist service clients."""
from __future__ import unicode_literals
from dns.resolver import NXDOMAIN
from future.moves.urllib.parse import urlparse, parse_qs
from nose_parameterized import parameterized
from requests.exceptions import HTTPError
from spam_l... | |
import datetime
from typing import List
import pandas as pd
import pytest
from ruamel.yaml import YAML
import great_expectations.exceptions as ge_exceptions
from great_expectations.core.batch import (
Batch,
BatchDefinition,
BatchSpec,
RuntimeBatchRequest,
)
from great_expectations.core.batch_spec imp... | |
# -*- coding: utf-8 -*-
'''
Create adjacency matrices and analyse terms dynamically
'''
print('Create document-term ESOMs')
#--------------------------------------------
#run create_Info_Files.py before running this
#--------------------------------------------
import pickle, time, igraph, glob, os, somoclu, collec... | |
# 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... | |
# Copyright 2014 Citrix Systems
#
# 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 agr... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# The MIT License (MIT)
#
# Copyright (c) 2015 NetCharm <netcharm@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated do... | |
"""
desisim.pixsim
==============
Tools for DESI pixel level simulations using specter
"""
from __future__ import absolute_import, division, print_function
import sys
import os
import os.path
import random
from time import asctime
import socket
import astropy.units as u
import numpy as np
import desimodel.io
impo... | |
import httplib
import StringIO
import socket
from unittest import TestCase
from test import test_support
HOST = test_support.HOST
class FakeSocket:
def __init__(self, text, fileclass=StringIO.StringIO):
self.text = text
self.fileclass = fileclass
self.data = ''
def sendall(self, dat... | |
# data structure:
# D = { typename : { bid level : revocation num}}
import numpy as np
revocation_num = {
'c3.2xlarge': {
0.12: 4208.3,
0.13: 4208.3,
0.14: 4208.3,
0.15: 4208.3,
0.16: 4208.3,
0.17: 4198.54,
0.18: 4095.47,
0.19: 3763.73,
0.2: 3... | |
"""
==================================================
Explicit feature map approximation for RBF kernels
==================================================
An example illustrating the approximation of the feature map
of an RBF kernel.
.. currentmodule:: sklearn.kernel_approximation
It shows how to use :class:`RBFSa... | |
from __future__ import print_function, division, absolute_import
from datetime import datetime, timedelta
import json
import logging
from multiprocessing import Process, Queue, queues
import os
import shutil
import subprocess
import sys
import tempfile
from time import time, sleep
from tornado.ioloop import IOLoop
fr... | |
"""Helper classes for Google Assistant integration."""
from asyncio import gather
from collections.abc import Mapping
from typing import List
from homeassistant.core import Context, callback
from homeassistant.const import (
CONF_NAME,
STATE_UNAVAILABLE,
ATTR_SUPPORTED_FEATURES,
ATTR_DEVICE_CLASS,
... | |
#!/usr/bin/env python
from unittest import TestCase
import subprocess, os, shutil, tempfile
# Load git-shadow as a module for functional unit tests. Le Hack. Sacrebleu!!1
import imp
git_shadow = imp.load_source("git_shadow", os.path.join(os.getcwd(), "git-shadow"))
def rm_r(path):
if os.path.isdir(path):
... | |
#STANDARD LIB
from urlparse import urlparse
# LIBRARIES
from django.contrib.auth import get_user_model, get_user, BACKEND_SESSION_KEY
from django.contrib.sessions.middleware import SessionMiddleware
from django.http import HttpRequest
from django.test import TestCase
from django.test.utils import override_settings
fro... | |
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Change directory to provide relative paths for doctests
>>> import os
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
>>> datadir = os.path.realpat... | |
# Copyright (c) 2012 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | |
from unittest import TestCase
from mock import MagicMock, patch
import frontend.controllers.scanctrl as module
from lib.irma.common.utils import IrmaScanStatus
from tempfile import TemporaryFile
from lib.irma.common.exceptions import IrmaValueError, IrmaTaskError, \
IrmaDatabaseResultNotFound, IrmaFtpError
from li... | |
from snovault import (
AuditFailure,
audit_checker,
)
from .item import STATUS_LEVEL
def audit_file_processed_derived_from(value, system):
if value['output_category'] in ['raw data',
'reference']:
return
if 'derived_from' not in value or \
'derived_f... | |
#!/bin/env python
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | |
# GUI Application automation and testing library
# Copyright (C) 2006-2018 Mark Mc Mahon and Contributors
# https://github.com/pywinauto/pywinauto/graphs/contributors
# http://pywinauto.readthedocs.io/en/latest/credits.html
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# ... | |
#!/usr/bin/env python
import re
from pygments.lexer import (
RegexLexer,
bygroups,
include,
)
from pygments.token import (
Comment,
Generic,
Keyword,
Name,
Number,
Operator,
Punctuation,
String,
Text,
Whitespace,
)
__all__ = ['SwiftLexer', 'SwiftConsoleLexer']
cl... | |
# -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | |
'''
Dual output E3648A 0-8V / 0-20V 2.5A
http://cp.literature.agilent.com/litweb/pdf/E3646-90001.pdf
'''
import time
import sys
import datetime
import serial
class Timeout(Exception):
pass
def now():
return datetime.datetime.utcnow().isoformat()
def dbg(s):
if 0:
print 'GPIO %s: %s' % (now(), s... | |
import wx
import os
import sys
import webbrowser
from GENe import *
from wx.lib.pubsub import setuparg1
class GENeGUI(wx.Frame):
def __init__(self,parent,id):
wx.Frame.__init__(self,parent,id,'GENe BLAST Automation and Gene Cataloger', size=(600,300), style=wx.MINIMIZE_BOX|wx.SYSTEM_MENU|wx.CAPTION|wx.CLOSE_BOX|wx... | |
import requests
try:
import ujson as json
except:
import json
import unittest
import os
import uuid
import subprocess
import logging
import threading
from JumpScale import j
debug = True
out = err = None
appport = 9099
if debug:
appport = 80
baseurl = 'http://localhost:%s/restmachine/space/objects/mode... | |
"""
Classes allowing "generic" relations through ContentType and object-id fields.
"""
from __future__ import unicode_literals
from collections import defaultdict
from functools import partial
from django.core.exceptions import ObjectDoesNotExist
from django.db import connection
from django.db.models import signals
f... | |
#
# Author: Pearu Peterson, March 2002
#
# w/ additions by Travis Oliphant, March 2002
# and Jake Vanderplas, August 2012
from __future__ import division, print_function, absolute_import
__all__ = ['solve', 'solve_triangular', 'solveh_banded', 'solve_banded',
'solve_toeplitz', 'solve_circulant... | |
#!/usr/bin/env python
"""
Copyright (c) 2013, Citrix 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:
1. Redistributions of source code must retain the above copyright notice, this
list of condi... | |
"""Tests for samsungtv Components."""
import asyncio
import unittest
from unittest.mock import call, patch, MagicMock
from asynctest import mock
import pytest
import tests.common
from homeassistant.components.media_player import SUPPORT_TURN_ON, \
MEDIA_TYPE_CHANNEL, MEDIA_TYPE_URL
from homeassistant.components.... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Moving sky plot to bottom of object spectrum plot, added badlines
# stuff,restricted z range
# for cross correlation to slider z +/-0.3
#
# Adding xcsao button - need shady iraf import shenanigans, otherwise iraf
# causes feedback between tk
# widgets and variables to n... | |
# 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 ... | |
#
# This file is subject to the terms and conditions defined in the
# file 'LICENSE', which is part of this source code package.
#
import datetime
from rdr_service.code_constants import (
CONSENT_PERMISSION_YES_CODE,
CONSENT_PERMISSION_NO_CODE,
DVEHRSHARING_CONSENT_CODE_YES,
EHR_CONSENT_EXPIRED_YES,
... | |
from __future__ import absolute_import, print_function, division
import re
import six
from six.moves import urllib
from netlib import encoding
from netlib import multidict
from netlib import strutils
from netlib.http import multipart
from netlib.http import cookies
from netlib.http import headers as nheaders
from ne... | |
## A script for extracting info about the patients used in the analysis
## Load necessary modules
from rpy2 import robjects as ro
import numpy as np
import os
ro.r('library(survival)')
import re
##This call will only work if you are running python from the command line.
##If you are not running from the command line... | |
# Copyright 2020 Google LLC
# Copyright 2018 The HuggingFace Inc. team.
#
# 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... | |
"""
Admin classes for all the shop models.
Many attributes in here are controlled by the ``SHOP_USE_VARIATIONS``
setting which defaults to True. In this case, variations are managed in
the product change view, and are created given the ``ProductOption``
values selected.
A handful of fields (mostly those defined on th... | |
import re
import json
from expects import expect, raise_error, match, be_a, equal, have_key
from doublex import Spy, Mock, Stub, ANY_ARG
from doublex_expects import have_been_called, have_been_called_with, have_been_satisfied
from pysellus.stock_integrations import trello
with description('the Trello integration'):
... | |
from django.db import models
from core.models import Service, PlCoreBase, Slice, Instance, Tenant, TenantWithContainer, Node, Image, User, Flavor, Subscriber, NetworkParameter, NetworkParameterType, AddressPool, Port
from core.models.plcorebase import StrippedCharField
import os
from django.db import models, transactio... | |
import itertools
import numpy as np
from numpy.testing import (
assert_, assert_equal, assert_array_equal, assert_almost_equal,
assert_raises, suppress_warnings, assert_raises_regex, assert_allclose
)
# Setup for optimize einsum
chars = 'abcdefghij'
sizes = np.array([2, 3, 4, 5, 4, 3, 2, 6, 5, 4, 3])
glob... | |
# -*- coding: utf-8 -*-
import time
import os
import logging
import argparse
import json
import codecs
import cPickle as pickle
import signal
import numpy
import networkx as nx
import beanstalkc
import foggy
import jobq
from itertools import izip
from uuid import uuid4
from glob import glob
from IPython.parallel ... | |
import argparse
import string
import numpy
import sys
import re
import os
from sklearn.externals import joblib
from sklearn.multiclass import OneVsRestClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.feature_extraction.text import TfidfVectorizer
from scipy import sparse
from nltk.stem.snowb... | |
# Copyright (c) 2012 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 ... | |
'''
Created on March 27, 2017
This file is subject to the terms and conditions defined in the
file 'LICENSE.txt', which is part of this source code package.
@author: David Moss
'''
import localization
import json
import utilities.utilities as utilities
import properties
from controller import Controller
def run(b... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Helpful routines for regression testing."""
from base64 import b64encode
from decimal import Decimal, ... | |
import os
import re
import sys
import tempfile
from remoteconfig import RemoteConfig
class CastError(Exception):
pass
class Cast(object):
""" Represents all cast options/messages. """
ALERT_SECTION = 'Alert'
MESSAGES_SECTION = 'Messages'
ALERT_MSG_KEY = 'message'
ALERT_EXIT_KEY = 'exit'
MESSAGE_NEXT... | |
# 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 ... | |
"""Support for OpenTherm Gateway devices."""
import logging
from datetime import datetime, date
import voluptuous as vol
from homeassistant.components.binary_sensor import DOMAIN as COMP_BINARY_SENSOR
from homeassistant.components.sensor import DOMAIN as COMP_SENSOR
from homeassistant.const import (
ATTR_DATE, AT... | |
# Copyright 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | |
from pyVulkan import *
import sdl2
import ctypes
import sys
def string(char_ptr):
if sys.version_info < (3, 0):
return ffi.string(char_ptr)
else:
return ffi.string(char_ptr).decode('ascii')
class Demo:
def __init__(self):
app_name = 'Demo'
self.width = 300
self.... | |
from test import support
import random
import unittest
from functools import cmp_to_key
verbose = support.verbose
nerrors = 0
def check(tag, expected, raw, compare=None):
global nerrors
if verbose:
print(" checking", tag)
orig = raw[:] # save input in case of error
if compare:
... | |
"""
Support Code
## Standard Headers
"""
from __future__ import division,print_function
import sys,random,math
sys.dont_write_bytecode = True
from settings import *
import Technix.sdivUtil as sdivUtil
"""
## Simple, low-level stuff
### Maths Stuff
"""
def gt(x,y): return x > y
def lt(x,y): return x < y
def medi... | |
from typing import Union, Dict, Pattern, Callable, Any, List
import re
import logging
log = logging.getLogger('foo')
class ValidationError(Exception):
def __init__(self, reason):
super().__init__()
self.reason = reason
class RequiredKey:
def __init__(self, key: str):
self.key = key
... | |
"""Loads plugins from ``porcupine.plugins``."""
# many things are wrapped in try/except here to allow writing Porcupine
# plugins using Porcupine, so Porcupine must run if the plugins are
# broken
from __future__ import annotations
import argparse
import dataclasses
import enum
import importlib.machinery
import loggin... | |
# Copyright 2011 Grid Dynamics
# Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses... | |
#!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# 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 us... | |
# 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... | |
# Written by Bram Cohen
# see LICENSE.txt for license information
from cStringIO import StringIO
from binascii import b2a_hex
from socket import error as socketerror
from urllib import quote
from traceback import print_exc
from BitTornado.BTcrypto import Crypto
try:
True
except:
True = 1
False = 0
boo... | |
#Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/styles.py
__version__=''' $Id: styles.py 3959 2012-09-27 14:39:39Z robin $ '''
__doc__='''Classes for ParagraphStyle and similar things.
A style i... | |
import time
import os
from io import BytesIO
from jinja2 import Environment, PackageLoader
from nbt import nbt
from blockmodel.writers.stl_writer import Binary_STL_Writer
from blockmodel.mapper import MinecraftBlockMapper
from blockmodel.readers import *
from blockmodel.constants import *
from blockmodel.writers.file_... | |
# 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 2010 Google Inc.
#
# 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, publish, dis-
# trib... | |
#
# Copyright 2016 University of Oxford
#
# 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 i... | |
import json
import time
import attr
from attr.validators import instance_of as io, optional
from typing import *
import couchbase_core._libcouchbase as LCB
from couchbase_core import mk_formstr
from couchbase.options import OptionBlock, OptionBlockTimeOut, forward_args, timedelta
from couchbase.management.admin import... | |
import numpy as np
import pytest
from numpy import linalg
import numpy.testing as npt
import itertools
from utils import get_rstate, get_printing
import dynesty # noqa
from dynesty import utils as dyfunc # noqa
"""
Run a series of basic tests to check whether anything huge is broken.
"""
nlive = 500
printing = get... | |
'''
@author: shylent
'''
from tftp.backend import FilesystemSynchronousBackend, IReader, IWriter
from tftp.bootstrap import RemoteOriginWriteSession, RemoteOriginReadSession
from tftp.datagram import (WRQDatagram, TFTPDatagramFactory, split_opcode,
ERR_ILLEGAL_OP, RRQDatagram, ERR_ACCESS_VIOLATION, ERR_FILE_EXISTS,... | |
"""
@package mi.dataset.driver.moas.gl.adcpa.test_driver
@file marine-integrations/mi/dataset/driver/moas.gl/adcpa/driver.py
@author Jeff Roy (Raytheon)
@brief Test cases for moas_gl_adcpa driver (for both telemetered and recovered data)
USAGE:
Make tests verbose and provide stdout
* From the IDK
$ bin/dsa/... | |
from __future__ import absolute_import, division
import json
import logging
import random
import re
import requests
import sys
import time
import uuid
from cStringIO import StringIO
from contextlib import closing
from datetime import datetime
from flask import current_app
from lxml import etree, objectify
from typing... | |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | |
##
# Copyright (c) 2005-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 obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | |
# -*- coding: utf-8 -*-
import math
from array import array
_REGISTER_BYTE_WIDTH = 2
_CONFIGURATION_REGISTER = 0x00
_SHUNT_VOLTAGE_REGISTER = 0x01
_BUS_VOLTAGE_REGISTER = 0x02
_POWER_REGISTER = 0x03
_CURRENT_REGISTER = 0x04
_CALIBRATION_REGISTER = 0x05
_REGISTERS = [
_CONFIGURATION_REGISTER,
_SHUNT_VOLTAGE_RE... | |
"""
Secure Copy
Copies files from local to remote
usage:
GET
scp [user@host:dir/file] [files/dir]
PUT
scp [file/dir] [file/dir] [user@host:dir]
"""
import argparse
# scp.py
# Copyright (C) 2008 James Bardin <j.bardin@gmail.com>
"""
Created by jbardin
https://github.com/jbardin/scp.py
Utilities for s... | |
# 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... | |
# Copyright (c) 2020 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
from collections import defaultdict
from django.contrib.contenttypes.models import ContentType
from tastypie.validation import Validation
from chroma_core.lib.storage_pl... | |
import pickle
import os
import glob
import numpy as np
from experts import *
#This file takes "raw" data as input and computes additionnal stats such as averaged stats, winrate, fatansy points etc.
#Returns the averaged stats (all, home and away) of a given player between game start and end
#Returns averaged of all g... | |
"""
Oracle database backend for Django.
Requires cx_Oracle: http://cx-oracle.sourceforge.net/
"""
from __future__ import unicode_literals
import decimal
import re
import sys
import warnings
def _setup_environment(environ):
import platform
# Cygwin requires some special voodoo to set the environment variables... | |
from fixtures import *
import cim
def test_mapping_type_guess_xp():
'''
test automatic detection of winxp repositories.
'''
repodir = os.path.join(os.path.dirname(__file__), 'repos')
xpdir = os.path.join(repodir, 'xp')
repopath = os.path.join(xpdir, 'mapping-only')
assert cim.CIM.guess_c... | |
# Remote Control - As The Remote Device
#
# This script configures your OpenMV Cam as a co-processor that can be remotely controlled by
# another microcontroller or computer such as an Arduino, ESP8266/ESP32, RaspberryPi, and
# even another OpenMV Cam.
#
# This script is designed to pair with "popular_features_as_the_c... | |
##########################################################################
#
# Copyright (c) 2011, 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:
#
# * Redistribu... | |
# 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... | |
import glob
import os
import logging
import re
from datetime import datetime
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.neighbors import BallTree
import src.config.filepaths as fp
import src.features.fre_to_tpm.viirs.ftt_utils as ut
def make_balltree_subset(array_lats_flat,... | |
#!/usr/bin/env vpython
# Copyright 2020 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
# pylint: disable=no-value-for-parameter
import logging
import os
import sys
import unittest
import test_env
test_env.set... | |
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Vincent Michel <vincent.michel@inria.fr>
# Gilles Louppe <g.louppe@gmail.com>
#
# License: BSD 3 clause
"""Recursive feature elimination for feature ranking"""
import warnings
import numpy as np
from ..utils import check_X_y, safe_sqr
fro... | |
# 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 -*-
from __future__ import unicode_literals
from django import forms
from django.contrib.admin import widgets
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from django.http import HttpResponseRedirect, Http404
from django.shortcuts imp... | |
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import json
import os
from pants.base.exceptions import TaskError
from pants.base.workunit import WorkUnitLabel
from pants.subsystem.subsystem import Subsystem
from pants.util.contextutil... | |
import ast
import inspect
import traceback
import warnings
from copy import deepcopy
from threading import current_thread
from uuid import uuid4
from executing import only, future_flags
from snoop.formatting import Event, Source
from snoop.tracer import FrameInfo
from snoop.utils import NO_ASTTOKENS, optional_numeric... | |
from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
from past.builtins import basestring
import difflib
import json
import logging
import re
import random
from bs4.element import Tag
from flexget.utils.soup import get_soup... | |
import logging
from shuttl import db, app
from shuttl.Storage import Storage
from shuttl.Models.FileTree.TreeNodeObject import TreeNodeObject
from shuttl.Models.FileTree.Directory import Directory
from werkzeug import secure_filename
import uuid
from flask import abort
import os
## Base class for all objects that req... | |
"""
IEC 61672-1:2013
================
IEC 61672-1:2013 gives electroacoustical performance specifications for three
kinds of sound measuring instruments [IEC61672]_:
- time-weighting sound level meters that measure exponential-time-weighted, frequency-weighted sound levels;
- integrating-averaging sound level meters ... | |
# Copyright 2014 Dietrich Epp.
# This file is part of SGLib. SGLib is licensed under the terms of the
# 2-clause BSD license. For more information, see LICENSE.txt.
from .error import ConfigError, UserError
from .schema import Variables
class SourceFile(object):
"""An individual source file with its build variab... | |
""""
Solving the problem
1) Unencrypt the base64 text in the .txt and transform it in a HEX string [DONE]
2) Guess the KEYSIZE: (3/3)
- Write the hamming function [DONE]
- Write the guess KEYSIZE Function [DONE]
- Guess a likely KEYSIZE [DONE]
3) Write a function to break the text in KEYSIZE blocks [DONE]
... | |
"""SCons.Tool.tex
Tool-specific initialization for TeX.
Generates .dvi files from .tex files
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge... | |
import os
from django.utils import six
from django.core.files.base import File, ContentFile
from django.core.files.storage import (
default_storage, Storage)
from django.db.models.fields.files import ImageFieldFile, FieldFile
from django.core.files.images import get_image_dimensions
from django.utils.safestring i... | |
# -*- coding: utf-8 -*-
"""
Created on Sat May 4 22:07:54 2013
@author: matt
Tries to allow users to specify simple UI elements for functions
using decorators.
For controls, it makes more sense to decorate the set function, specifying
an optional get function.
def get_volume(self):
return self.volume
@slider(... | |
import builtins
import collections
import datetime
import decimal
import enum
import functools
import math
import re
import types
import uuid
from django.db import models
from django.db.migrations.operations.base import Operation
from django.db.migrations.utils import COMPILED_REGEX_TYPE, RegexObject
from django.utils... | |
from typing import Any, Dict, List, Optional, Union
from django.conf import settings
from django.http import HttpRequest, HttpResponse
from django.shortcuts import redirect
from django.utils.translation import ugettext as _
from zerver.decorator import require_member_or_admin, require_realm_admin
from zerver.forms im... | |
# coding=utf-8
# Copyright 2014 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 contextlib
import multiprocessing
import os
import re
from collections import name... | |
"""
Base class of site movers
:author: Alexey Anisenkov
"""
import hashlib
import os, re
import time
from subprocess import Popen, PIPE, STDOUT
from pUtil import tolog #
from PilotErrors import PilotErrors, PilotException
from Node import Node
class BaseSiteMover(object):
"""
File movers move files betw... | |
#!/usr/bin/env python
from __future__ import print_function
from __future__ import absolute_import
import string
from .jats import JATSParser
from .author_init import AuthorInitial
from pyingest.config.config import *
class NoSchemaException(Exception):
pass
class WrongSchemaException(Exception):
pass
cl... | |
# encoding: utf-8
'''
@author: Majeed.sahebzadha
'''
from __future__ import print_function, unicode_literals
import numpy as np
import pandas as pd
import re
import time
import os
from collections import OrderedDict
import json
import pickle
from pptx import Presentation
from pptx.chart.data import ChartData
from add... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.