gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" 02/13/2013 copied from goto6mcpV4-5 10/25/2012 by EM move telescope to desAlt using MCP 11/18/2012 - changed timeout from 40 sec to 80 sec 01/04/2013 - changed time rate from 1 sec to 0.4 sec; output every second output; review of pos and velocity faster by reorganization of check block; predic...
# coding=utf-8 # Copyright 2021 HuggingFace 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 ag...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
## dispatcher.py ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## ## 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, or (at your option) ## any later versi...
# Copyright 2013 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 law or agreed to...
# (c) Copyright 2014 Hewlett-Packard Development Company, L.P. # 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...
import os.path import re import shlex import json from xml.etree import cElementTree as etree from vial.compat import PY2, bstr, filter, sstr, ustr if PY2: import urllib import urlparse import Cookie from cStringIO import StringIO else: from urllib import parse as urllib from urllib import pa...
import binascii import errno import functools import hashlib import importlib import logging import multiprocessing import os import signal import subprocess import sys import tempfile import threading import time from typing import Optional, Sequence, Tuple, Any, Union import uuid import grpc import warnings try: ...
# 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 ...
###################################################################### # Cloud Routes Web Application # ------------------------------------------------------------------- # Users Class ###################################################################### from werkzeug.security import generate_password_hash, check_pa...
import numpy as np import ms import shifter import numpy as np import scipy.optimize as op from scipy import ndimage import h5py import time from scipy.linalg import cho_factor, cho_solve from interruptible_pool import InterruptiblePool from nll_grad import nll_grad_lnX from nll_grad_fb import v2_fit_single_patch , v3_...
# # Copyright 2017 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# -*- coding: UTF-8 -*- # Copyright 2008-2020 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) """ Defines extended database field classes and utility functions related to fields. """ import logging ; logger = logging.getLogger(__name__) import datetime from decimal import...
""" ******** Models for test_data.py *********** The following classes are for testing basic data marshalling, including NULL values, where allowed. The basic idea is to have a model for each Django data type. """ from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.con...
import DistributedNPCToonBaseAI from toontown.toonbase import TTLocalizer, ToontownGlobals from direct.fsm import ClassicFSM, State from direct.task.Task import Task class DistributedNPCScientistAI(DistributedNPCToonBaseAI.DistributedNPCToonBaseAI): def __init__(self, air, npcId, questCallback = None, hq = 0): ...
import sys import os from keras.models import load_model from keras.utils import plot_model from custom_objects import CustomObjects from model_def import ModelDef from run_config import RunConfig import datetime Train=1 Generate=2 class ModelUtils(object): iteration = 0 config = None mode = Train model_fil...
import os current_path = os.path.dirname(os.path.abspath(__file__)) header = False sub_header = False footer = False buttons = False lists = False cards = False forms = False toogle = True checkbox = False radio_button = False range_control = False select_control = False tabs = True actionSheet = False backdrop = Fals...
#!/usr/bin/env python3 # Copyright 2013 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. """Downloads, builds (with instrumentation) and installs shared libraries.""" import argparse import ast import errno import fcntl im...
from __future__ import unicode_literals from __future__ import absolute_import from collections import namedtuple import logging import re import os import sys from operator import attrgetter import six from docker.errors import APIError from docker.utils import create_host_config, LogConfig from docker.utils.ports im...
import traceback import pyglet from geoplotlib.core import GeoplotlibApp class AppConfig: def __init__(self): self.reset() def reset(self): self.layers = [] self.bbox = None self.savefig = None self.tiles_provider = 'mapquest' self.smoothing = False s...
"""Contains the implementation of the X11 X Windows System color group.""" __all__ = ( 'X11', ) import enum from colors import base class X11(base.ColorGroup): """ The X11 color group. In computing, on the X Window System, X11 color names are represented in a simple text file, which maps certai...
#!/usr/bin/env python # Copyright (c) 2015 Arista Networks, Inc. All rights reserved. # Arista Networks, Inc. Confidential and Proprietary. """ This program provides an agent that sends and responds to health-check packets in order to determine the liveliness of the configured MPLS tunnels. """ import eossdk import ...
================================================================================ html_help.py ================================================================================ import time import Zam class html_table: def __init__(self, rows, columns, indent, style): self.__matrix = Zam.matrix(rows, columns...
#!/usr/bin/env python3 # Copyright (c) 2014 Brainly.com sp. z o.o. # Copyright (c) 2013 Spotify AB # # 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...
import collections import os import sys import numpy try: from PIL import Image available = True except ImportError as e: available = False _import_error = e import chainer from chainer.dataset.convert import concat_examples from chainer.dataset import download from chainer import function from chaine...
# 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 """ pyboard interface This module provides the Pyboard class, used to communicate with and control the pyboard over a serial USB connection. Example usage: import pyboard pyb = pyboard.Pyboard('/dev/ttyACM0') Or: pyb = pyboard.Pyboard('192.168.1.1') Then: pyb.enter_raw_repl...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): orm['cms.CMSPlugin'].objects.filter(plugin_type='AuthorEntriesPlugin').update(plugin_t...
""" Gaussian Mixture Models """ # Author: Ron Weiss <[email protected]> # Fabian Pedregosa <[email protected]> # import numpy as np from ..base import BaseEstimator from ..utils import check_random_state from ..utils.extmath import logsum from .. import cluster # FIXME this lacks a proper docstring...
# -*- coding: utf-8 -*- import numpy as np import pandas as pd from lifetimes.utils import calculate_alive_path, expected_cumulative_transactions from scipy import stats __all__ = [ "plot_period_transactions", "plot_calibration_purchases_vs_holdout_purchases", "plot_frequency_recency_matrix", "plot_pro...
from typing import List, Optional from urllib.parse import urlparse from zeus.exceptions import CommandError, HostError, InvalidPublicKey, UnknownRevision from zeus.utils.functional import memoize from zeus.utils import sentry, timezone from .base import Vcs, RevisionResult, BufferParser LOG_FORMAT = "%H\x01%an <%ae...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, print_function, unicode_literals) from textwrap import...
"""Test shopping list component.""" import asyncio from unittest.mock import patch import pytest from homeassistant.bootstrap import async_setup_component from homeassistant.helpers import intent from homeassistant.components.websocket_api.const import TYPE_RESULT @pytest.fixture(autouse=True) def mock_shopping_lis...
import sys import json import unicodedata from PyQt5 import QtGui, QtCore, QtWidgets class TextSearch: #Removes accents and lowers the cases. def normalizeText(self, text): return ''.join((c for c in unicodedata.normalize('NFD', text) if unicodedata.category(c) != 'Mn')).lower() def normalStringS...
# Copyright (c) 2015 EMC Corporation. # 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 functools import partial from ...external.qt.QtGui import (QWidget, QAction, QToolButton, QIcon, QMessageBox) from ...external.qt.QtCore import Qt import matplotlib.cm as cm from .data_viewer import DataViewer from ... import core from ...clients.image_client import ImageClien...
from __future__ import absolute_import # TODO(dcramer): this heavily inspired by pytest-selenium, and it's possible # we could simply inherit from the plugin at this point import os import pytest import signal from datetime import datetime from django.conf import settings from selenium import webdriver from selenium...
import configparser import os import os.path import queue import sys import threading import time import traceback import wx from . import core from . import file_io from . import gui from . import main from . import stringconv from . import version class Frame(gui.MainFrame): def __init__(self, parent): ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Oct 2 14:24:25 2017 @author: ajaver """ from .helper import get_n_worms_estimate, get_delta_in_frames, add_derivatives from .events import get_event_stats, event_region_labels from .path import get_path_extent_stats from .features import timeseries_f...
import uuid from datetime import date, datetime import pytest from freezegun import freeze_time from app.models import ( EMAIL_TYPE, KEY_TYPE_NORMAL, KEY_TYPE_TEAM, KEY_TYPE_TEST, LETTER_TYPE, PRECOMPILED_TEMPLATE_NAME, SMS_TYPE, ) from tests.app.db import ( create_ft_notification_stat...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 NTT # 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 # ...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division import os import logging from flask import Flask, request, make_response, abort, \ url_for, render_template, jsonify from flask_limiter import Limiter from flask_limiter.util import get_remote_address from werkzeug.uti...
""" *********** Annotations *********** Annotations are arbitrary metadata attached to Synapse entities. They can be accessed like ordinary object properties or like dictionary keys:: entity.my_annotation = 'This is one way to do it' entity['other_annotation'] = 'This is another' Annotations can be given in ...
# -*- coding: utf-8 -*- """ This module implements the base LaTeX object. .. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ from ordered_set import OrderedSet from ..utils import dumps_list from abc import abstractmethod, ABCMeta from reprlib import recursive_repr from in...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright 2016 Fedele Mantuano (https://twitter.com/fedelemantuano) 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/lice...
""" Several basic tests for hierarchical clustering procedures """ # Authors: Vincent Michel, 2010, Gael Varoquaux 2012 # License: BSD 3 clause from tempfile import mkdtemp import warnings import numpy as np from scipy import sparse from scipy.cluster import hierarchy from sklearn.utils.testing import assert_true fr...
# 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 # distributed under th...
# Lint as: python3 # 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 ...
""" Filename: Network.py Author: Nipun Gunawardena Acknowledgements: Based off of Michael Nielsen's Neural Network and Deep Learning Tutorial code found at https://github.com/mnielsen/neural-networks-and-deep-learning/blob/master/src/network.py. Also based off of info found at http...
# # Copyright (c) SAS Institute 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 w...
# This is based on https://github.com/cpopp/MicroTelnetServer # # Major modifications started by ulno (http://ulno.net) on 2017-09-15 # adding chacha encryption MAGIC = b"UlnoIOT-NetREPL:" import uiot._cfg as _cfg import time, socket, network, uos, machine, micropython, errno, ubinascii from crypt_socket import Crypt...
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. """ String manipulation functions """ from __future__ import absolute_import import binascii import func...
# # A class to merge quicklook qa outputs. # from __future__ import absolute_import, division, print_function from desiutil.io import yamlify import yaml import json import numpy as np import datetime import pytz ############################################################### def remove_task(myDict, Key): if Key ...
from test.test_support import TESTFN, run_unittest import mmap import unittest import os, re, itertools PAGESIZE = mmap.PAGESIZE class MmapTests(unittest.TestCase): def setUp(self): if os.path.exists(TESTFN): os.unlink(TESTFN) def tearDown(self): try: os.unlink(TESTFN...
# -*- coding: utf-8 -*- # Django settings for olympia project. import datetime import logging import os import socket import dj_database_url from django.utils.functional import lazy from django.core.urlresolvers import reverse_lazy from heka.config import client_from_dict_config ALLOWED_HOSTS = [ '.allizom.org',...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 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 collections import logging import os import plistlib import shutil import tempfile import xml.parsers.expat from telemetry.core import os_version 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...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# -*- coding: utf-8 -*- from __future__ import print_function import numpy as np from numpy import pi import logging import warnings from .kernel import PseudoSpectralKernel, tendency_forward_euler, tendency_ab2, tendency_ab3 try: import mkl np.use_fastnumpy = True except ImportError: pass try: import...
import _dk_core as core from collections import namedtuple import math # Light Space Perspective Shadow Maps # http://www.cg.tuwien.ac.at/research/vr/lispsm/ Plane = namedtuple('Plane', 'n, d') Vector = namedtuple('Vector', 'x, y, z') AABB = namedtuple('AABB', 'min, max') _dot = lambda a, b: a.x * b.x + a.y * b.y + ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
"""WeGovNow extension OnToMap logger.""" import json import time from os import path from ast import literal_eval from requests import request from django.conf import settings from django.contrib.sites.models import Site from allauth.socialaccount.models import SocialAccount from allauth_uwum.provider import UWUMPr...
# # Copyright (c) SAS Institute 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 w...
import logging import time import traceback from multiprocessing import Process, Queue, cpu_count from queue import Empty from threading import Thread logger = logging.getLogger(__name__) OUTPUT_QUEUE_TIMEOUT = 0.1 """ This is how long an output queue will block while waiting for output to process """ PROCESS_JOIN_T...
# # Broker peering simulation (part 3) in Python # Prototypes the full flow of status and tasks # # While this example runs in a single process, that is just to make # it easier to start and stop the example. Each thread has its own # context and conceptually acts as a separate process. # # Author : Min RK ...
from dipy.tracking.streamline import set_number_of_points import dipy.tracking.distances as pf from dipy.segment.metricspeed import distance_matrix from dipy.segment.metric import MinimumAverageDirectFlipMetric import numpy as np import pandas as pd from scipy.spatial import distance def flipTrackslr(streamlines,voxel...
#!/usr/bin/env python # ================================================= # Dependencies # ------------------------------------------------- from __future__ import print_function import cdms2 import glob import json import os import pkg_resources import sys from genutil import StringConstructor from PMPdriver_lib imp...
#!/usr/bin/env python3 import re import struct import sys import numpy as np import matplotlib.pyplot as plt import EbbUtils as eu import PlotUtils as pu def tryint(s): try: return int(s) except: return s def alphanum_key(s): """ Turn a string into a list of string and number chunks. ...
#!/usr/bin/env python import csv import datetime import glob import json import logging import os import re import requests import time from selenium import webdriver from selenium.webdriver.common.keys import Keys import sys sys.path.insert(0, '../Py-CatDV') from pycatdv import Catdvlib __author__ = "Edson Cudjoe" _...
#!/usr/bin/env python3 # Copyright (c) 2015-2021 The Dash Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import time from decimal import Decimal from test_framework.blocktools import get_masternode_payment, create...
# Copyright (c) 2016 QNAP Systems, 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 re...
# Copyright 2021 The Pigweed Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# # The Multiverse Platform is made available under the MIT License. # # Copyright (c) 2012 The Multiverse 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 restrict...
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, absolute_import, division) import re import hashlib import logging import datetime from functools import partial, reduce import six from IPy import IP from django.core.urlresolvers import reverse from django.utils.encoding import force_bytes, force_te...
from SimPEG import Mesh, Regularization, Maps, Utils, EM from SimPEG.EM.Static import DC import numpy as np import matplotlib.pyplot as plt #%matplotlib inline import copy #import pandas as pd #from scipy.sparse import csr_matrix, spdiags, dia_matrix,diags #from scipy.sparse.linalg import spsolve from scipy.stats imp...
# Copyright 2014, Hewlett-Packard Development Company, L.P. # 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-...
__author__ = 'USER' import random from common import math_util class NeuralNetwork: @property def output_matrix(self): return self._output_matrix @output_matrix.setter def output_matrix(self, __output_matrix): self._output_matrix = __output_matrix @output_matrix.deleter def ou...
from tornado import auth, web, httpclient from StringIO import StringIO from operator import itemgetter import os import logging import mimetypes import zipfile import yaml import json import time from main.helper import * from main.db import * class TestBug(myRequestHandler, Entity): def get(self): 1 /...
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2009 Edgewall Software # Copyright (C) 2006 Alec Thomas # Copyright (C) 2007 Eli Carter # Copyright (C) 2007 Christian Boos <[email protected]> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part ...
from django.utils.translation import ugettext_lazy as _ COUNTRIES = ( ('AD', _('Andorra')), ('AE', _('United Arab Emirates')), ('AF', _('Afghanistan')), ('AG', _('Antigua & Barbuda')), ('AI', _('Anguilla')), ('AL', _('Albania')), ('AM', _('Armenia')), ('AN', _('Netherlands Antilles')),...
# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/ # Copyright 2012-2014 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...
"""Implementation of the Seabreeze Transport layer. Some spectrometers can support different transports (usb, network, rs232, etc.) """ from __future__ import annotations import importlib import inspect import logging import warnings from functools import partialmethod from typing import TYPE_CHECKING from typing im...
""" Helper methods for components within Home Assistant. """ from datetime import datetime from homeassistant import NoEntitySpecifiedError from homeassistant.loader import get_component from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_FRIENDLY_NAME, STATE_ON, STATE_OFF, CONF_PLATFORM, CONF_TYPE, DEVICE...
#!/usr/bin/python3 -u helptext = """IFTTT Webhook for json requests to control a windows PC. Supported commands: wake, suspend, poweroff, poweroff_linux, reboot_linux""" import argparse import configparser import pprint pp = pprint.PrettyPrinter(width=1) import logging import binascii import socket import struct imp...
# Software License Agreement (BSD License) # # Copyright (c) 2010, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above...
# coding: utf-8 """ Helpers to use OpenMath as a DSL in Python EXAMPLES:: We first define: >>> cd = CDBaseHelper('http://www.openmath.org/cd') and then be able to use this as follows: >>> one_plus_one = cd.arith1.plus(1, 1) >>> print(one_plus_one) OMApplication( elem=OMSymbol(name='plus', cd='arith1', cd...
"""Module for testing date/time variables.""" import datetime import time class TestDateTimeVar(BaseTestCase): def setUp(self): BaseTestCase.setUp(self) self.rawData = [] self.dataByKey = {} for i in range(1, 11): timeTuple = (2002, 12, 9, 0, 0, 0, 0, 0, -1) ...
# Copyright 2016-2017 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
from __future__ import division, print_function # Multicut Pipeline implemented with luigi # Multicut Problem Tasks import luigi import os from .dataTasks import StackedRegionAdjacencyGraph from .learningTasks import EdgeProbabilities from .customTargets import HDF5DataTarget from .defectHandlingTasks import Modifi...
import logging import netaddr from ryu.services.protocols.bgp.base import SUPPORTED_GLOBAL_RF from ryu.services.protocols.bgp.model import OutgoingRoute from ryu.services.protocols.bgp.peer import Peer from ryu.lib.packet.bgp import BGP_ATTR_TYPE_MULTI_EXIT_DISC from ryu.lib.packet.bgp import BGP_ATTR_TYPE_COMMUNITIES...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
# 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 ...
# 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 use ...
# ============================================================================= # 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 #...
from panda3d.core import * from panda3d.direct import * from direct.showbase import DirectObject from direct.directnotify import DirectNotifyGlobal from toontown.launcher import DownloadForceAcknowledge import string import random from toontown.toonbase import ToontownGlobals from toontown.hood import ZoneUtil class H...
#!/usr/bin/env python import argparse import os import stat import sys from six.moves import input from clint.textui import puts from will.utils import print_head PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__))) sys.path.append(PROJECT_ROOT) sys.path.append(os.getcwd()) parser = argparse.Argum...
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:4320") else: access = Ser...
import numpy as np import pandas as pd import six from functools import wraps, partial from memory_profiler import memory_usage import sys, os, time from collections import OrderedDict, Iterable, namedtuple from sqlalchemy import (Table, Column, Integer, Float, String, Sequence, BLOB, MetaData, ...