gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" Test classes and functions for retail calendar. Use unittest module as the main test framework. All the test cases in this module assume default values of class parameters: 1) fiscal year starts on Aug 1st. 2) Retail calendar's end date is the last Saturday of July. It is hard to unit-test with general, variable ...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Bot to upload pages from a file. This bot takes its input from a file that contains a number of pages to be put on the wiki. The pages should all have the same begin and end text (which may not overlap). By default the text should have the intended title of the page as t...
# -*- coding: UTF-8 -*- # Copyright 2008-2018 Rumma & Ko Ltd # # License: BSD (see file COPYING for details) """Database models for `lino_xl.lib.properties`. This module is deprecated. A :class:`PropOccurence` is when a given "property owner" has a given :class:`Property`. "Property owner" can be anything: a person...
# # 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...
""" Configuration of network interfaces on Windows hosts ==================================================== .. versionadded:: 2014.1.0 This module provides the ``network`` state(s) on Windows hosts. DNS servers, IP addresses and default gateways can currently be managed. Below is an example of the configuration fo...
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2009, Jean-Michel Sizun # Copyright 2009 Frank Scholz <coherence@beebits.net> import os.path from twisted.internet import reactor, threads from twisted.web import server, static from twisted.web.error import PageRedirect ...
''' Pubnub Modular Input Script ''' import sys,logging,os,time,re,threading,hashlib import xml.dom.minidom from datetime import datetime RESPONSE_HANDLER_INSTANCE = None SPLUNK_HOME = os.environ.get("SPLUNK_HOME") #dynamically load in any eggs EGG_DIR = SPLUNK_HOME + "/etc/apps/pubnub_ta/bin/" for filename in os.l...
# VMware vSphere Python SDK # Copyright (c) 2008-2015 VMware, 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 # # ...
from django.forms import fields, widgets from django.db.models.fields import NOT_PROVIDED from django.utils import formats from django.core.exceptions import ValidationError class Field(object): default = None help_text = None nullable = True required = False def __init__(self, *args, **kwarg...
# Copyright (C) 2012 Google 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 copyright # notice, this list of conditions and the ...
from django.core.cache.backends.base import BaseCache, InvalidCacheBackendError from django.core.exceptions import ImproperlyConfigured try: import redis except ImportError: raise InvalidCacheBackendError( "Redis cache backend requires the 'redis-py' library" ) from redis.connection import Default...
import matplotlib.pyplot as plt import numpy as np from scipy.optimize import curve_fit from matplotlib import dates import os import pickle from datetime import datetime from pprint import pprint import sys import math import traceback import time import mysql.connector data_dir = 'C:/Users/Sarah Hanna/Documents/Da...
# Copyright 2015 The Shaderc 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 applicable...
from datetime import datetime import time from .queue import Queue from . import context from .redishelpers import redis_zaddbyscore, redis_zpopbyscore, redis_key, redis_group_command from past.utils import old_div from future.builtins import range class QueueRaw(Queue): is_raw = True def __init__(self, que...
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################ ### @brief creates swagger json files from doc headers of rest files ### ### find files in ### arangod/RestHandler/*.cpp ### js/actions/api-*.js ### ### @usage generateSwagger.py < RestXXXX.cpp...
# Copyright 2015 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 ...
from __future__ import unicode_literals import os import re from unittest import skipUnless from django.contrib.gis.gdal import HAS_GDAL from django.core.management import call_command from django.db import connection, connections from django.test import TestCase, skipUnlessDBFeature from django.test.utils import mod...
""" Implementation of Harwell-Boeing read/write. At the moment not the full Harwell-Boeing format is supported. Supported features are: - assembled, non-symmetric, real matrices - integer for pointer/indices - exponential format for float values, and int format """ # TODO: # - Add more support (symmetr...
import json import os import re from django.core.urlresolvers import reverse from django.test import TestCase from corehq.apps.app_manager.tests.util import add_build from corehq.apps.app_manager.util import new_careplan_module from corehq.apps.app_manager.views import AppSummaryView from corehq.apps.builds.models imp...
# 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...
from django.conf import settings from django.core.cache import cache from django.utils.cache import patch_response_headers, add_never_cache_headers, get_max_age from django.utils.decorators import method_decorator from django.utils.functional import wraps from django_cache_middleware.decorators.utils import _combine_f...
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
# -*- coding: utf-8 -*- """ S3 Adobe PDF codec @copyright: 2011 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without r...
# Sublime Text plugin for Tern import sublime, sublime_plugin import os, sys, platform, subprocess, webbrowser, json, re, time, atexit from subprocess import CalledProcessError try: # python 2 from utils.renderer import create_renderer except: from .utils.renderer import create_renderer windows = platform.syste...
# 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 base64 import logging import urlparse from common import chrome_proxy_measurements as measurements from common.chrome_proxy_measurements import Chrom...
#!/usr/bin/env python from Container import Container from JumpScale import j import os import docker import time from urllib import parse class Docker: def __init__(self): self.__jslocation__ = "j.sal.docker" self.logger = j.logger.get('j.sal.docker') self._basepath = "/mnt/vmstor/docke...
import unittest class SrecException(Exception): def __init__(self, msg): self.msg = msg def __str__(self): return self.msg class SrecExceptionWrongLength(Exception): def __init__(self): self.msg = 'Wrong length of record line' def __str__(self): return self.msg cl...
#!/usr/bin/env python import logging import random import string import time import base64 import sys import hmac # from python 2.5 import imp import traceback if sys.version_info >= (2, 5): import hashlib else: # before python 2.5 import sha from saml2 import saml from saml2 import samlp from saml2 import...
# -*- coding: utf-8 -*- ## # This file is standalone vmware vcloud director util # 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/licen...
# Copyright 2016 Hewlett Packard Enterprise Development, LP # # 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/LICENS...
import copy import json import logging import os import colorcet as cc import pandas as pd import pyproj import pytoml import tornado import tornado.escape import yaml from bokeh.layouts import row, widgetbox, layout from bokeh.models import Select, CustomJS, Jitter, DataTable, TableColumn, Slider, Button # noinspecti...
#!/bin/env python2.7 import sys import os import os.path import glob import copy import traceback import re import csv import tempfile import urllib import shutil import atexit import subprocess import time import math from collections import defaultdict, Counter from os.path import join, dirname, realpath try: sys...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
''' By Tim Ehrensberger The base of the functions for the network's training is taken from https://github.com/Zackory/Keras-MNIST-GAN/blob/master/mnist_gan.py by Zackory Erickson The network architecture is perhaps loosely inspired by https://github.com/aleju/face-generator by Alexander Jung ''' import os import num...
''' Copyright (c) <2012> Tarek Galal <tare2.galal@gmail.com> 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, m...
import json import pytest from django.core.urlresolvers import reverse from django.test import TestCase from apps.core import factories from apps.core.tests import CoreFixturesTestCase from apps.explorer.views import DataTableCumulativeView, DataTableSelectionView from apps.explorer.views.views_selection import GetSe...
import numpy as np import logging import pytest from brainiak.isc import (isc, isfc, bootstrap_isc, permutation_isc, squareform_isfc, timeshift_isc, phaseshift_isc) from scipy.spatial.distance import squareform logger = logging.getLogger(__name__) # Create simple s...
#!/usr/bin/env python2.7 # # Copyright (c) 2016, Daniel Bolgheroni. # 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, # ...
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
# -*- coding: utf-8 -*- # # Copyright (C) 2014 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.com/license.html. # # This software consists of vo...
import datetime from django.contrib.auth.models import User from django.contrib.auth.hashers import make_password from django.conf import settings from money import Money import factory from ..models import (MangoPayNaturalUser, MangoPayBankAccount, MangoPayLegalUser, MangoPayWallet, ...
#!/usr/bin/env python """Compute the RBP features.""" from __future__ import print_function import argparse import re import subprocess as sp import sys import uuid from os import mkdir from shutil import rmtree import numpy as np import pandas as pd from rnacommender import fasta_utils from rnacommender import pf...
#!/usr/bin/env python # -*- coding: utf-8 -*- import glob import os import os.path import time import boto from config import * import amis import labs import vpc def _create_tags(conn, instance, current, lab_tag, user, amibuild, amikey, script): """Create instance tags""" print "Creating instance tags fo...
"""Compatibility layer for different database engines This modules stores logic specific to different database engines. Things like time-related functions that are similar but not identical, or information as to expose certain features or not and how to expose them. For instance, Hive/Presto supports partitions and h...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys # from glob import glob from setuptools import setup # import DistUtilsExtra.command.build_extra # import DistUtilsExtra.command.build_i18n # import DistUtilsExtra.command.clean_i18n # to update i18n .mo files (and merge .pot file into .po files) run...
#!/usr/bin/env python import threading import Queue import uspp.uspp as serial import message_dispatcher as dispatcher # ------------------------------------------------------------------------------ class CanException(Exception): pass # -----------------------------------------------------------------------------...
from datetime import datetime, timedelta import json import requests from StringIO import StringIO class DictObject(dict): __getattr__ = dict.get __setattr__ = dict.__setitem__ def __init__(self, obj, nest=False): super(DictObject, self).__init__(obj) if nest: for k, v in obj.i...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
"""Media accessors All media accessor __init__s take a `root` argument, which should be a path to the root of the media directory. Alternatively, `root` can be a custom MediaFile subclass. Most __init__s take an ORM object as a second argument. Their various methods take a number of arguments specifying exactly whi...
# # Ceilometer documentation build configuration file, created by # sphinx-quickstart on Thu Oct 27 11:38:59 2011. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration valu...
# Copyright (c) 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 ...
''' Copyright (C) 2012-2017 Diego Torres Milano Created on Dec 1, 2012 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/env python import os import pkg_resources import sys from setuptools import setup import chainerx_build_helper if sys.version_info[:3] == (3, 5, 0): if not int(os.getenv('CHAINER_PYTHON_350_FORCE', '0')): msg = """ Chainer does not work with Python 3.5.0. We strongly recommend to use anothe...
from __future__ import unicode_literals import json import os import boto3 import botocore from botocore.exceptions import ClientError from nose.tools import assert_raises import sure # noqa from moto import mock_elbv2, mock_ec2, mock_acm, mock_cloudformation from moto.elbv2 import elbv2_backends @mock_elbv2 @mock...
from __future__ import absolute_import import io import json import logging import os import re import socket import sys import time from nose.tools import assert_raises from django.test import LiveServerTestCase from django.test.testcases import QuietWSGIRequestHandler from django.utils import six import requests fr...
"""Thread module emulating a subset of Java's threading model.""" import sys as _sys try: import _pydev_thread as thread except ImportError: import thread import warnings from _pydev_time import time as _time, sleep as _sleep from traceback import format_exc as _format_exc # Note regarding PEP 8 compliant ...
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: December 16, 2004 # Author: Ivan Vilata i Balaguer - ivan at selidor dot net # # $Id$ # ######################################################################## """Atom classes for describing d...
# # 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 us...
#!/usr/bin/python2 # # Copyright 2018 Google LLC # # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd """Utility functions useful for CSV data sources.""" from __future__ import print_function __author__ =...
class Node: def __init__(self): self.labelIndex = -1 self.name = 'Top' self.children = [] self.parent = -1 self.subsize = 0 self.depth = 0 self.level = 0 def get_all_node_ids(self, name_2_id, cache): cache.append(self.name) if self.labelIndex != -1: name_2_id['\\'.join(cache[1:])] = self....
# Copyright 2020 Google 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/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright (C) 2016 SignalFx, Inc. All rights reserved. from . import errors, messages class Computation(object): """A live handle to a running SignalFlow computation.""" STATE_UNKNOWN = 0 STATE_STREAM_STARTED = 1 STATE_COMPUTATION_STARTED = 2 STATE_DATA_RECEIVED = 3 STATE_COMPLETED = 4 ...
# -*- coding:utf-8 -*- # This file comes from https://github.com/podhmo/python-semver/blob/b42e9896e391e086b773fc621b23fa299d16b874/semver/__init__.py # # It is licensed under the following license: # # MIT License # Copyright (c) 2016 podhmo # Permission is hereby granted, free of charge, to any person obtaining a c...
# Copyright (c) 2010-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 agree...
# -*- coding: utf-8 -*- # Copyright (c) 2012 Thomas Parslow http://almostobsolete.net/ # Copyright (c) 2012 Robie Basak <robie@justgohome.co.uk> # # 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 Softw...
import requests import string import datetime import tkinter as tk from tkinter import * from tkinter.ttk import * from PIL import Image, ImageTk # TODO: TEMP ETC. PLOTTING FROM MATPLOTLIB # TODO: ADD OPTION TO CHOOSE HOW MANY DAYS REPORT (using spinbox) # TODO: CONVERT RADIO BUTTONS TO COMBOBOXES (they look nicer) #...
# !/usr/bin/env python # coding=utf-8 """ Calculates the proton dissociation constant (PKA) for the given free energy data for a set of coordinates. * Input is rad_PMF (use corr col (3)) ** Plan for standard WHAM, too. * Find local max (inc, then dec) (two back) (middle val is tgt); in the algorithm below, I will c...
# Copyright (c) 2014 Hitachi Data 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 # # U...
"""Generic Z-Wave Entity Class.""" from __future__ import annotations import logging from zwave_js_server.client import Client as ZwaveClient from zwave_js_server.const import NodeStatus from zwave_js_server.model.value import Value as ZwaveValue, get_value_id from homeassistant.config_entries import ConfigEntry fro...
# -*- coding: utf-8 -*- """ Created on Tue Dec 22 06:28:16 2015 @author: fergal $Id$ $URL$ """ __version__ = "$Id$" __URL__ = "$URL$" import numpy as np import dave.pipeline.clipboard as clipboard import dave.pipeline.pipeline as pl import dave.pipeline.task as task import dave.fileio.nca as nca import dave.lpp...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function import theano.tensor as T from ..layers.core import Layer, Merge from ..utils.theano_utils import ndim_tensor from six.moves import range class Sequential(Layer): ''' Simple linear stack of layers. ...
# coding=utf-8 import os import re import yaml from fabric.context_managers import settings from fabric.decorators import task from fabric.state import env from fabric.utils import indent, abort from blues.application.deploy import maybe_install_requirements from refabric.utils import info from refabric.contrib impo...
# 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 (c) 2017 Vanessa Sochat 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, distribute...
# Roulette.py was created by Redjumpman for Redbot # This will create a rrgame.JSON file and a data folder import os import random import asyncio from time import gmtime, strftime from discord.ext import commands from .utils.dataIO import dataIO from .utils import checks from __main__ import send_cmd_help class Rus...
# -*- coding: utf-8 -*- import datetime from django.template.defaultfilters import slugify from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse, NoReverseMatch from django.db import models from django.utils.translation import ugettext_laz...
''' Base netlink socket and marshal =============================== All the netlink providers are derived from the socket class, so they provide normal socket API, including `getsockopt()`, `setsockopt()`, they can be used in poll/select I/O loops etc. asynchronous I/O ---------------- To run async reader thread, on...
# coding=utf-8 # Copyright 2015 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 unittest from builtins import object, str from textwrap import dedent from pants....
#!/usr/bin/python # (c) 2018 Jim Hawkins. MIT licensed, see https://opensource.org/licenses/MIT # Part of Blender Driver, see https://github.com/sjjhsjjh/blender-driver """Utility layer on the main Blender Python programming interface. This isn't the utilities for the Blender Game Engine. This module can only be used ...
import itertools import json import os import tempfile from numpy import average, std from numpy.random import random_integers, random_sample from tempfile import NamedTemporaryFile from penchy.compat import unittest, write from penchy.jobs.filters import * from penchy.jobs.typecheck import Types from penchy.util impo...
# Copyright 2013 OpenStack Foundation. # Copyright 2013 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/LI...
from __future__ import unicode_literals from celery import shared_task from isisdata.models import * from isisdata.tasks import _get_filtered_object_queryset from django.apps import apps from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth.models import User from django.db import models imp...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ impl.py ~~~~~~~ TAP file handling implementation. * 'range' is a tuple of two numbers. 'plan' is a string. They both represent TAP testcase numberings. * 'actual' in identifiers refers to the absolute number of testcases which must n...
# Wormy # By Elvis Sun ''' {'x': startx + 3, 'y': starty}, {'x': startx + 2, 'y': starty}, {'x': startx + 1, 'y': starty}, {'x': startx, 'y': starty}, {'x': startx, 'y': starty + 1}, {'x': startx, 'y': starty + ...
# -*- coding: utf-8 -*- """ Defines the fields that can be added to redisco models. """ import sys from datetime import datetime, date from dateutil.tz import tzutc, tzlocal from calendar import timegm from redisco.containers import List from exceptions import FieldValidationError, MissingID __all__ = ['Attribute', 'C...
from datetime import datetime from decimal import Decimal, ROUND_DOWN import uuid import base64 import random from django.conf import settings from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.utils import timezone import boto3 from botocore.client impo...
# 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...
# BEGIN_COPYRIGHT # # Copyright 2009-2021 CRS4. # # 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 agree...
from abc import ABC, abstractmethod from math import cos, sin, pi, sqrt class Interpolation(ABC): @abstractmethod def apply(self, a): pass class Linear(Interpolation): def apply(self, a): return a class Smooth(Interpolation): def apply(self, a): return a * a * (3 - 2 * a) ...
# Copyright 2012 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 logging import sys from telemetry.core import util from telemetry.core import platform as platform_module from telemetry import decorators from teleme...
import os import shutil from datetime import timedelta from functools import partial from itertools import chain from operator import is_not import numpy as np import pandas as pd import pytz from catalyst import get_calendar from catalyst.assets._assets import TradingPair from catalyst.constants import DATE_TIME_FORM...
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
import mock import sys from cron_sentry.runner import CommandReporter, DEFAULT_MAX_MESSAGE_LENGTH, run, parser @mock.patch('cron_sentry.runner.Client') def test_command_reporter_accepts_parameters(ClientMock): reporter = CommandReporter(['date', '--invalid-option'], 'http://testdsn', DEFAULT_MAX_MESSAGE_LENGTH) ...
import json import re from hearthbreaker.cards.base import MinionCard, WeaponCard from hearthbreaker.game_objects import Weapon, Minion import tests.card_tests.druid_tests import tests.card_tests.mage_tests import tests.card_tests.hunter_tests import tests.card_tests.paladin_tests import tests.card_tests.priest_tests i...
# Copyright 2021 DeepMind Technologies Limited. 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 ...
from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from pytz import common_timezones from pretix.base.forms import SettingsForm, VersionedModelForm from pretix.base.models import Event class EventCreateForm(VersionedModelForm): error_messages = { ...
"""Training Utilities for ViViT.""" import functools from typing import Callable, Dict, List, Optional, Tuple, Union from absl import logging from flax import jax_utils import flax.linen as nn import jax from jax.experimental.optimizers import clip_grads import jax.numpy as jnp import jax.profiler import matplotlib.p...
#!/usr/bin/env python # encoding: utf-8 """ Analyze multiple periods and starspot evolution """ from __future__ import print_function, division, absolute_import import datetime import os import sys from scipy.ndimage import gaussian_filter from scipy import signal import numpy as np import pandas as pd import matplot...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
import itertools import sys from pyglet.gl import * from pywavefront import Wavefront from pywavefront.material import Material from pywavefront.mesh import Mesh from bomb_defusal.view.utils.vector import Vector colors = { 'Blue': [0, 0, 1, 1], 'Yellow': [1, 1, 0, 1], 'Green': [0, .5, 0, 1], 'Red': [...