gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import pwd import os from ooni.managers import ReportEntryManager, MeasurementManager from ooni.reporter import Report from ooni.utils import log, generate_filename from ooni.utils.net import randomFreePort from ooni.nettest import NetTest, getNetTestInformation from ooni.settings import config from ooni import errors...
# -*- coding: utf-8 -*- # Copyright (C) 2011-2012 Rosen Diankov <[email protected]> # # 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 # # ...
""" numsed library numsed opcodes include unsigned operators (+, -, *) and unsigned comparisons. This library provides functions implementing all arithmetic and comparison signed operators using only numsed operators. """ from __future__ import print_function # signed comparison operators def signed_eq(x, y): ...
# stdlib from collections import namedtuple import re # project from checks import AgentCheck from utils.tailfile import TailFile # fields order for each event type, as named tuples EVENT_FIELDS = { 'CURRENT HOST STATE': namedtuple('E_CurrentHostState', 'host, event_state, event_soft_hard, return_code, payl...
# coding=utf-8 # Copyright 2022 The REALM authors and 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
""" Copyright (c) 2019 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from atomic_reactor.utils.cachito import ( CachitoAPI, CachitoAPIInvalidRequest, CachitoAPIRequestTimeout, CachitoAPIUnsuccessfulRequest)...
# Copyright 2013-2016 DataStax, 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 writi...
from datetime import datetime from ..enums import CardClass, CardSet, Rarity, ZodiacYear try: from lxml import etree as ElementTree # noqa except ImportError: from xml.etree import ElementTree # noqa CARDCLASS_HERO_MAP = { CardClass.DEMONHUNTER: "HERO_10", CardClass.DRUID: "HERO_06", CardClass.HUNTER: "HERO...
# Copyright 2016-2021 IBM Corp. 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...
import annoying.fields import django.core.validators import django.utils.timezone from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("auth", "0001_initial"), ] operations = [ migrations.CreateModel( ...
#!/usr/bin/env python """ Copyright 2010-2018 University Of Southern California Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by appli...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
""" Support for Synology Surveillance Station Cameras. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/camera.synology/ """ import asyncio import logging import voluptuous as vol import aiohttp from aiohttp import web from aiohttp.web_exceptions import ...
"""Quality control and summary metrics for next-gen alignments and analysis. """ import collections import copy import csv import os import yaml from datetime import datetime import pandas as pd import glob import toolz as tz from bcbio import bam from bcbio import utils from bcbio.cwl import cwlutils from bcbio.log...
# Copyright (c) 2015 Intel Research and Development Ireland Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
# 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...
#!/usr/bin/env python3 """ Testing dec2flt =============== These are *really* extensive tests. Expect them to run for hours. Due to the nature of the problem (the input is a string of arbitrary length), exhaustive testing is not really possible. Instead, there are exhaustive tests for some classes of inputs for which ...
import json from flask.ext.api import status import flask as fk from api import app, check_access, upload_handler, load_image from ddsmdb.common.models import UserModel from ddsmdb.common.models import ProjectModel from ddsmdb.common.models import RecordModel from ddsmdb.common.models import RecordBodyModel from ddsm...
from __future__ import absolute_import import six from mistune import markdown from collections import OrderedDict from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from sentry.models import IntegrationExternalProject, OrganizationIntegration, User from sentry.integratio...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
from copy import deepcopy import numpy as np import pandas as pd import pytest from xarray import DataArray, Dataset, Variable, concat from xarray.core import dtypes, merge from . import ( InaccessibleArray, assert_array_equal, assert_equal, assert_identical, raises_regex, requires_dask, ) fr...
# Copyright (c) 2013 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 ...
"""empty message Revision ID: 13484841a0c Revises: None Create Date: 2016-03-09 11:54:39.334813 """ # revision identifiers, used by Alembic. revision = '13484841a0c' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ### ...
# # 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 # ...
""" Test various aspects of the detectors classes """ import numpy import pytest import serpentTools from serpentTools import detectors @pytest.fixture(scope="module") def meshedBinData(): bins = numpy.ones((25, 12), order="f") bins[:, -1] = range(25) bins[:, -2] = range(25) bins[:, -3] = numpy.tile(...
from __future__ import absolute_import, print_function import random import numpy as np from .. import types from .templates import (ConcreteTemplate, AbstractTemplate, AttributeTemplate, CallableTemplate, Registry, signature, bound_function, make_callable_template) #...
from __future__ import absolute_import import logging import os import re import shutil import sys import tempfile import zipfile from distutils.util import change_root from distutils import sysconfig from email.parser import FeedParser from pip._vendor import pkg_resources, six from pip._vendor.distlib.markers impo...
#!/usr/bin/env python from __future__ import print_function from __future__ import absolute_import import numpy import datetime import _idl_histogram def histogram(data, binsize=None, maxv=None, minv=None, nbins=None, omax=None, omin=None, reverse_indices=None, locations=None, input_arr=None, ...
#!/usr/bin/python # ---------------------------------------------------------------------------- # cocos "install" plugin # # Authr: Luis Parravicini # # License: MIT # ---------------------------------------------------------------------------- ''' "run" plugin for cocos command line tool ''' __docformat__ = 'restruc...
""" Author: Jon Ander Gomez Adrian ([email protected], http://personales.upv.es/jon) Version: 2.0 Date: September 2016 Universitat Politecnica de Valencia Technical University of Valencia TU.VLC """ import sys import numpy from machine_learning import GMM from .Constants import Constants from .St...
# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University # Copyright (c) 2011, 2012 Open Networking Foundation # Copyright (c) 2012, 2013 Big Switch Networks, Inc. # See the file LICENSE.pyloxi which should have been included in the source distribution # Automatically generated by LOXI from ...
from __future__ import unicode_literals from functools import update_wrapper from django import http from django.core.exceptions import ImproperlyConfigured from django.template.response import TemplateResponse from django.utils.log import getLogger from django.utils.decorators import classonlymethod logger = getLogg...
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
# 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 applica...
from django import forms from django.forms.models import ModelFormMetaclass, BaseInlineFormSet from django.utils.translation import get_language from django.utils import six from parler.models import TranslationDoesNotExist from parler.utils import compat __all__ = ( 'TranslatableModelForm', 'TranslatedField'...
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson 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.0 # # Unless required by applicable ...
from django.contrib.auth.models import User from django.test.utils import override_settings from funfactory.urlresolvers import reverse from mock import patch from nose.tools import eq_, nottest from product_details import product_details from pyquery import PyQuery as pq from common import browserid_mock from common...
# 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 (c) 2011-2014, Alexander Todorov <[email protected]> # # 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 ...
import math import pygame import time from random import uniform, choice from itertools import cycle import binball_game.collision as collision import binball_game.events as events class Point(): def __init__(self, x, y=None): self.x = x self.y = y def copy(self): return Point(self.x,...
#------------------------------------------------------------------------------- # Copyright 2017 Cognizant Technology Solutions # # 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:...
# 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...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# # Copyright 2017 Quantopian, 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 wr...
import logging from django.utils.text import slugify from rest_framework import permissions, status, viewsets from rest_framework.authentication import ( SessionAuthentication, TokenAuthentication ) from rest_framework.decorators import list_route from rest_framework.pagination import PageNumberPagination from...
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import importlib.resources from typing import ClassVar, Iterable, Sequence, cast from pants.backend.python.target_types import ConsoleScript, EntryPoin...
# -*- coding: utf-8 -*- from __future__ import print_function import nose import numpy as np from pandas import (DataFrame, Series, Timestamp, _np_version_under1p11) import pandas as pd from pandas.util.testing import (assert_series_equal, assert_frame_equal, ...
import cv2 import numpy as np import argparse from matplotlib import pyplot as plt ''' Support library for jersy number recognition demo ''' #rectangle-rectangle intersection check def intersectRect(rect1,rect2): if (rect1[0] > rect2[2] or rect1[2] < rect2[0] or rect1[1] > rect2[3] or rect1[3] < rect2[1]): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import os import sys LOG_LEVEL_INDEX = sys.argv.index('--log_level') + 1 if '--log_level' in sys.argv else 0 DESIRED_LOG_LEVEL = sys.argv[LOG_LEVEL_INDEX] if 0 < LOG_LEVEL_INDEX < len(sys.argv) else '3' os.e...
from sympy.core import symbols, S, Pow, Function from sympy.functions import exp from sympy.utilities.pytest import raises from sympy.tensor.indexed import Idx, IndexedBase from sympy.tensor.index_methods import IndexConformanceException from sympy import get_contraction_structure, get_indices def test_trivial_indic...
import unittest import mock from tavrida import dispatcher from tavrida import entry_point from tavrida import exceptions from tavrida import messages from tavrida import router from tavrida import service class DispatcherTestCase(unittest.TestCase): def setUp(self): super(DispatcherTestCase, self).set...
# 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...
#!/usr/bin/python # # Copyright 2013, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. # This test simulates the first time a database has to be split: # - we start with a keyspace with a single shard and a single table # - we add an...
import numpy as np from .base import HomogFamilyAlignment from .affine import DiscreteAffine, Affine from .similarity import Similarity def Scale(scale_factor, n_dims=None): r""" Factory function for producing Scale transforms. Zero scale factors are not permitted. A :class:`UniformScale` will be pr...
from hippy import consts from hippy.klass import def_class from hippy.objects.base import W_Root from hippy.objects.intobject import W_IntObject from hippy.objects.instanceobject import W_InstanceObject from hippy.builtin import Optional from hippy.builtin_klass import GetterSetterWrapper from hippy.module.reflections....
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, print_function import frappe, os, re from frappe.utils import touch_file, encode, cstr def make_boilerplate(dest, app_name): if not os.path.exists(dest): print("Destination ...
import sys sys.path.append('./../../..') from mtSet.pycore.utils.utils import smartSum import mtSet.pycore.covariance as covariance import pdb import numpy as NP import scipy as SP import scipy.linalg as LA import sys import time as TIME from gp_base import GP class gp3kronSumLR(GP): def __init__(self,Y,Cg,Cn,...
# 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...
"""Unit tests for the bytes and bytearray types. XXX This is a mess. Common tests should be moved to buffer_tests.py, which itself ought to be unified with string_tests.py (and the latter should be modernized). """ import os import re import sys import copy import functools import pickle import tempfile import unitt...
"""Platform for the KEF Wireless Speakers.""" from datetime import timedelta from functools import partial import ipaddress import logging from aiokef import AsyncKefSpeaker from aiokef.aiokef import DSP_OPTION_MAPPING from getmac import get_mac_address import voluptuous as vol from homeassistant.components.media_pl...
from __future__ import absolute_import from pychron.entry.loaders.mass_spec_binary_extractor import MassSpecBinaryExtractor __author__ = "ross" import unittest class Expected(object): runid = "59273-01A" project = "Zimmerer" sample = "ORGAN-8" material = "Biotite" investigator = "Zimmerer" f...
#!/usr/bin/env python # # Appcelerator Titanium Module Packager # # import os, subprocess, sys, glob, string import zipfile from datetime import date cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) os.chdir(cwd) required_module_keys = ['name','version','moduleid','description','copyright','...
from __future__ import absolute_import from django.contrib.auth.models import AnonymousUser from sentry.models import ( ApiKey, AuditLogEntryEvent, DeletedOrganization, DeletedTeam, DeletedProject, Organization, OrganizationStatus, ) from sentry.testutils import TestCase from sentry.utils....
# 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 2019 Fortinet, 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
import demistomock as demisto from CommonServerPython import * from dxlclient.client_config import DxlClientConfig from dxlclient.client import DxlClient from dxlclient.broker import Broker from dxltieclient import TieClient from dxltieclient.constants import HashType from datetime import datetime VENDOR_NAME = 'McAfe...
""" This file contains a minimal set of tests for compliance with the extension array interface test suite, and should contain no other tests. The test suite for the full functionality of the array is located in `pandas/tests/arrays/`. The tests in this file are inherited from the BaseExtensionTests, and only minimal ...
# -*- coding: utf-8 -*- """ Wrap xtide's libtcd. """ from __future__ import absolute_import from ctypes import ( c_bool, c_char, c_char_p, c_double, c_float, c_int16, c_int32, c_uint8, c_uint16, c_uint32, cdll, sizeof, Structure, CFUNCTYPE, POINTER, ) EN...
# 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 ...
""" Module for vetting low S/N run """ from __future__ import print_function, absolute_import, division, unicode_literals import sys import io, json import pdb import numpy as np from matplotlib import pyplot as plt from pkg_resources import resource_filename from astropy import units as u from astropy.table import...
# 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...
from __future__ import division # for proper float division import os import sys import math import time import types import functools import random import json from collections import OrderedDict import numpy as np from director import ikconstraints from director import ikconstraintencoder from director import ikpar...
# -*- coding: utf-8 -*- """ pdt_locales All of the included locale classes shipped with pdt. """ import datetime try: import PyICU as pyicu except: pyicu = None def lcase(x): return x.lower() class pdtLocale_base(object): """ default values for Locales """ locale_keys = set([ 'M...
# original source from https://github.com/thesharp/daemonize import fcntl import os import pwd import grp import sys import signal import resource import logging import atexit from logging import handlers class Daemonize(object): """ Daemonize object Object constructor expects three arguments: - app: con...
# Copyright 2020 DeepMind Technologies Limited. # # 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...
"""(C) Frank-Rene Schaefer Path Compression ___________________________________________________________ Consider the file 'engine/analyzer/mega_state/path/core.py' for a detailed explanation of path compression. Code Generation ____________________________________________________________ Let 'path w...
# -*- coding: utf-8 -*- """ .. module:: skrf.networkSet ======================================== networkSet (:mod:`skrf.networkSet`) ======================================== Provides a class representing an un-ordered set of n-port microwave networks. Frequently one needs to make calculations, such as mean or stand...
import paddle.v2.framework.core as core from paddle.v2.framework.op import Operator import numpy import paddle.v2 as paddle BATCH_SIZE = 100 scope = core.Scope() place = core.CPUPlace() # if you want to test GPU training, you can use gpu place # place = core.GPUPlace(0) dev_ctx = core.DeviceContext.create(place) ini...
''' Copyright (c) 2011-2014, Agora Games, LLC All rights reserved. https://github.com/agoragames/haigha/blob/master/LICENSE.txt ''' from chai import Chai from haigha.classes import transaction_class from haigha.classes.protocol_class import ProtocolClass from haigha.classes.transaction_class import TransactionClass ...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
import logging import aiohttp from aiohttp import ClientError from duniterpy.api import bma, errors from duniterpy.documents import BMAEndpoint, SecuredBMAEndpoint from sakia.errors import NoPeerAvailable from pkg_resources import parse_version from socket import gaierror import asyncio import random import jsonschema ...
# 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...
import re import copy from collections import defaultdict content = [] # where we keep copies clipboard = {} vulnerability = '00' seat = '0' # meta information about the BML-file, supported: # TITLE = the name of the system # DESCRIPTION = a short summary of the system # AUTHOR = the system's author(s) # data in me...
''' Module that does most of the heavy lifting for the ``conda build`` command. ''' from __future__ import absolute_import, division, print_function import io import json import os import shutil import stat import subprocess import sys import tarfile from os.path import exists, isdir, isfile, islink, join import fnma...
# -*- coding: utf-8 -*- """ Created on Fri May 30 16:22:29 2014 Author: Josef Perktold License: BSD-3 """ from io import StringIO import numpy as np from numpy.testing import assert_, assert_allclose, assert_equal import pandas as pd import patsy import pytest from statsmodels import datasets from statsmodels.base....
import time from urlparse import parse_qs, urlparse from urllib import quote, urlencode from mailpile.commands import Command from mailpile.crypto.gpgi import GnuPG from mailpile.i18n import gettext as _ from mailpile.i18n import ngettext as _n from mailpile.plugins import PluginManager from mailpile.util import * c...
#!/usr/bin/env python # -*- coding: utf-8 -*- from freezegun import freeze_time from CTFd.models import Challenges, Flags, Hints, Solves, Tags, Users from CTFd.utils import set_config from tests.helpers import ( create_ctfd, destroy_ctfd, gen_challenge, gen_fail, gen_flag, gen_hint, gen_so...
import os import sys import pandas as pd import numpy as np from numpy.random import poisson, uniform from numpy import mean import time import math po = False team_homes = pd.read_csv(os.path.join(os.path.split(__file__)[0], 'TeamHomes.csv'), header = None, index_col = 0) stadium_locs = pd.read_csv(os.path.join(os.p...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import six import logging import traceback from . import Command from ..benchmarks import Benchmarks from ..console imp...
# Copyright 2013-2015 ARM Limited # # 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...
# # 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...
#!/usr/bin/env python import datetime import argparse from egcg_core import util from cached_property import cached_property from EPPs.common import StepEPP, RestCommunicationEPP reporting_app_date_format = '%d_%m_%Y_%H:%M:%S' class StepPopulator(StepEPP, RestCommunicationEPP): metrics_mapping = {} endpoint ...
#!/usr/bin/env python # -*- coding: UTF-8 -*- #need easy_install ntplib #sudo apt-get install python-crypto import datetime,time,sys,os import pprint, pickle import ntplib import thread import threading useNTPserversync=True update_time_NTPserversync_delay=400 #second between ntp time correction algo [fix ping lat...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
import os, subprocess, time, signal, sys import random from textgame import HomeWorld from gym import spaces, error, utils #import spacy import re # ------------ ---------- # |living | |garden | #Limbo-+ 00 +----------+ 01 | # | | | | # ---...
# 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 ...
import pickle from unittest import TestCase import numpy as np import os from sac.model.audacity_label import AudacityLabel from sac.util import Util class UtilTests(TestCase): def setUp(self): self.stats_csv = os.path.join(os.path.dirname(__file__), 'fixtures/example_yaafe_stats.csv') self.no_st...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Origin: https://github.com/jcsp/scrape/blob/master/scrape.py # Author: John Spray (github.com/jcsp) import difflib from errno import ENOENT from gzip import GzipFile import sys import os import yaml from collections import defaultdict import re import logging import subprocess import six log = logging.getLogger('s...
# -*- coding: utf-8 -*- # # 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 "L...