gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
#!/usr/bin/env python # # Copyright 2015-2015 breakwa11 # # 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 la...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
#!/usr/bin/env python # Copyright (c) 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 os import subprocess import tempfile import time import media.audio_tools as audio_tools # This little construct ensures w...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Board.status' db.alter_column(u'boards_board', 'status_id', self.gf('django.db.models.fie...
''' Input file parser for the LEMON parser generator. ''' from ccruft import * from error import * from struct import * from table import * from sys import exit MAXRHS = 1000 ( INITIALIZE, WAITING_FOR_DECL_OR_RULE, WAITING_FOR_DECL_KEYWORD, WAITING_FOR_DECL_ARG, WAITING_FOR_PRECEDENCE_SYMBOL, ...
import torch import warnings from torch.optim.optimizer import Optimizer import math import itertools as it import torch.optim as optim warnings.filterwarnings("once") class Ranger(Optimizer): # https://github.com/lessw2020/Ranger-Deep-Learning-Optimizer/blob/master/ranger.py def __init__( self, ...
from __future__ import print_function import matplotlib.delaunay as delaunay import matplotlib._tri as _tri import numpy as np class Triangulation(object): """ An unstructured triangular grid consisting of npoints points and ntri triangles. The triangles can either be specified by the user or automat...
"""A rather messy way of parsing commands.""" ### This is better than what I made but I still probably want to redo it from pag import words as pag_words class Token: T_VERB = 'Verb' T_NOUN = 'Noun' T_EXTRA = 'Extra' T_DIRECTION = 'Direction' def __init__(self, tvalue, ttype=T_VERB): """ ...
import ssl from typing import Any, Dict, Optional, Union from unittest import mock import pytest from urllib3.exceptions import ProxySchemeUnsupported, SNIMissingWarning, SSLError from urllib3.util import ssl_ class TestSSL: @pytest.mark.parametrize( "addr", [ # IPv6 "::1...
# -*- test-case-name: admin.test.test_release -*- # Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Helper utilities for the Flocker release process. XXX This script is not automatically checked by buildbot. See https://clusterhq.atlassian.net/browse/FLOC-397 """ import json import os import sys impor...
from common_fixtures import * # NOQA test_network_policy = os.environ.get( 'TEST_NETWORK_POLICY', "False") np_reason = \ 'Intended to not execute this network policy test' if_network_policy = pytest.mark.skipif(test_network_policy != "ALL", reason=np_reason) if_network_...
from __future__ import absolute_import from django.contrib.auth import authenticate from django.contrib.sites.models import Site from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import PermissionDenied from django.db import models from django.utils.crypto import get_random_string...
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
# 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...
from peewee import * from .base import ModelTestCase from .base import TestModel from .base import get_in_memory_db from .base import requires_models from .base_models import Tweet from .base_models import User class User(TestModel): username = TextField(unique=True) class Note(TestModel): text = TextField(...
from dateutil import parser from hs_core.hydroshare.utils import get_resource_file_name_and_extension from hs_file_types.models import GeoRasterLogicalFile, GeoRasterFileMetaData, GenericLogicalFile, \ NetCDFLogicalFile def assert_raster_file_type_metadata(self): # test the resource now has 2 files (vrt file...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
#!/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...
# -*- coding: utf-8 -*- """ sphinxcontrib.github ~~~~~~~~~~~~~~~~~~~~ This sphinx-based resume builder system is pivoted toward programmers on github to create a solid resume. :copyright: (c) 2013 by Tony Narlock. :license: BSD, see LICENSE for more details. """ from __future__ import absolut...
# Copyright 2020 The Meson development 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 required by applicable law or agreed to ...
"""Manages the v6 recipe diff schema""" from __future__ import unicode_literals from jsonschema import validate from jsonschema.exceptions import ValidationError from recipe.diff.exceptions import InvalidDiff SCHEMA_VERSION = '7' SCHEMA_VERSIONS = ['6', '7'] RECIPE_DIFF_SCHEMA = { 'type': 'object', 'requir...
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
import mock import unittest from pyramid import testing from kinto.core.utils import sqlalchemy from kinto.core.storage import exceptions from kinto.core.permission import (PermissionBase, memory as memory_backend, postgresql as postgresql_backend,...
import md5 import os from twisted.python import util from twisted.trial.test import packages from twisted.trial import runner, reporter, unittest from twisted.python.modules import getModule # XXX - this is used in test_script, perhaps it should be in a utility module def testNames(test): """ Return the i...
# 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...
# Using Linear Regression to predict # family home sale prices in Ames, Iowa # Packages import pandas as pd import numpy as np import statsmodels.formula.api as smf import matplotlib.pyplot as plt import seaborn as sns from tabulate import tabulate from statsmodels.iolib.summary2 import summary_col # Set some op...
from test import support import unittest import urllib.parse RFC1808_BASE = "http://a/b/c/d;p?q#f" RFC2396_BASE = "http://a/b/c/d;p?q" RFC3986_BASE = 'http://a/b/c/d;p?q' SIMPLE_BASE = 'http://a/b/c/d' # A list of test cases. Each test case is a two-tuple that contains # a string with the query and a dictionary wit...
# 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 ...
''' Script: FitsToCSV_AndLS Version: v09 -- This scripts takes FITS files (for the available quarters), remove 3.5sigma outliers, join quarters using linear fit, and calculate Fast Lomb Scargle periodogram. The scripts returns the LS for each light curve, up to 100th peak, and a resume table with ...
import pytz import json from django.core.exceptions import ValidationError from rest_framework import serializers as ser from rest_framework import exceptions from api.base.exceptions import Conflict from api.base.utils import absolute_reverse, get_user_auth from website.project.metadata.utils import is_prereg_admin_...
# 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 (C) 2015 Nippon Telegraph and Telephone Corporation. # # 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...
# -*- coding: utf-8 -*- # # django-codenerix # # Copyright 2017 Centrologic Computational Logistic Center S.L. # # Project URL : http://www.codenerix.com # # 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 ...
# 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...
# Copyright 2016 Huawei Technologies India Pvt. Ltd. # 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 # #...
# -*- coding: utf-8 -*- # Copyright (C) 2012 Anaconda, Inc # SPDX-License-Identifier: BSD-3-Clause from __future__ import absolute_import, division, print_function, unicode_literals from logging import getLogger from os.path import basename, dirname import re import sys from .._vendor.auxlib.ish import dals from ..ba...
"""Test different accessory types: Lights.""" from pyhap.const import HAP_REPR_AID, HAP_REPR_CHARS, HAP_REPR_IID, HAP_REPR_VALUE import pytest from homeassistant.components.homekit.const import ATTR_VALUE from homeassistant.components.homekit.type_lights import Light from homeassistant.components.light import ( A...
import importlib import json import os import gettext as gettext_module from django import http from django.conf import settings from django.template import Context, Template from django.utils.translation import check_for_language, to_locale, get_language from django.utils.encoding import smart_text from django.utils....
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # Copyright (c) 2014 TrilioData, Inc # Copyright (c) 2015 EMC Corporation # Copyright (C) 2015 Kevin Fox <kevin@efox.cc> # Copyright (C) 2015 Tom Barron <tpb@dyncloud.net> # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "Li...
import numpy as np import scipy.sparse as sp from scipy.sparse import csr_matrix from itertools import chain, izip """ authors: Clement Gehring contact: gehring@csail.mit.edu date: May 2015 """ ################## VARIOUS INTERFACES ####################################### """ Generic map from a state (as an array), t...
# 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 ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ve...
# Copyright 2016 Christoph Groth (INAC / CEA Grenoble). # # This file is subject to the 2-clause BSD license as found at # http://kwant-project.org/license. """Replace symmetries of Kwant builders with momentum parameters to the system.""" import sys import itertools import collections import cmath import numpy as np...
import collections import copy import pickle import unittest class DictSetTest(unittest.TestCase): def test_constructors_not_callable(self): kt = type({}.keys()) self.assertRaises(TypeError, kt, {}) self.assertRaises(TypeError, kt) it = type({}.items()) self.assertRaises(Ty...
#!/usr/bin/env python # Copyright (C) 2015 Thomas Huang # # 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, version 2 of the License. # # This program is distributed in the hope that it will be us...
#! /usr/bin/env python ''' Andrew Till Winter 2015 Python-based PDT cross section reader / writer ''' #STDLIB from datetime import datetime #TPL import numpy as np ######################################################################################### def read_PDT_xs_generally(filePath): '''Read a PDT cross ...
# This test module covers support in various parts of the standard library # for working with modules located inside zipfiles # The tests are centralised in this fashion to make it easy to drop them # if a platform doesn't support zipimport import test.support import os import os.path import sys import textwrap import ...
import pytest import pytz import dateutil import numpy as np from datetime import datetime from dateutil.tz import tzlocal import pandas as pd import pandas.util.testing as tm from pandas import (DatetimeIndex, date_range, Series, NaT, Index, Timestamp, Int64Index, Period) class TestDatetimeInd...
# Library Kerasimo # you might have to set "export LANG=en_US.UTF-8" from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation from keras.optimizers import SGD from keras.models import Model import numpy as np import math import collections maxheight = 0 class Neuron: def __init_...
from __future__ import absolute_import, division, print_function import sys import platform import _pytest._code import pytest def runpdb_and_get_report(testdir, source): p = testdir.makepyfile(source) result = testdir.runpytest_inprocess("--pdb", p) reports = result.reprec.getreports("pytest_runtest_log...
# # 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 os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorx as tx import numpy as np import tensorflow as tf from tensorflow.keras.layers import SimpleRNNCell, LSTMCell, GRUCell, Attention def test_rnn_cell(): n_inputs = 3 n_units = 4 batch_size = 2 inputs = tx.Input(n_units=n_inputs) rnn...
#!/usr/bin/python import json import sys import os import time import random import getpass import re import atexit import paramiko import md5 import errno import PerfUtils import requests class H2OUseCloudNode: """ A class representing one node in an H2O cloud which was specified by the user. Don't tr...
# -*- coding: utf-8 -*- # Copyright (C) 2016 Grace Cox (University of Liverpool) # # Released under the MIT license, a copy of which is located at the root of # this project. """Module containing functions to parse World Data Centre (WDC) files. Part of the MagPySV package for geomagnetic data analysis. This...
""" Utility methods to deal with "names" of relations. To be safe, we always delimit names in queries but would prefer not to during logging. See TableName. There are additional methods and classes here to support the feature of choosing relations by a pattern from the command line. """ import fnmatch import re impo...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 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 operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
""" Support for Z-Wave. For more details about this component, please refer to the documentation at https://home-assistant.io/components/zwave/ """ import asyncio import copy import logging from pprint import pprint import voluptuous as vol from homeassistant.core import callback, CoreState from homeassistant.loader...
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
from raggregate.models.submission import Submission from raggregate.models.comment import Comment from raggregate.models.vote import Vote from raggregate.models.subscribe import Subscribe from raggregate.models.section import Section from raggregate.queries import hotness from raggregate.queries import subscribe as su...
#!/usr/bin/env python """ Copyright 2013 The Trustees of Princeton University 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 Unle...
# 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 # distribu...
"""Send data to Graphite metrics server (synchronously or on a background thread). For example usage, see README.rst. This code is licensed under a permissive MIT license -- see LICENSE.txt. The graphyte project lives on GitHub here: https://github.com/benhoyt/graphyte """ import atexit import logging try: impo...
from __future__ import unicode_literals import time from datetime import datetime import boto import pytz from boto.emr.bootstrap_action import BootstrapAction from boto.emr.instance_group import InstanceGroup from boto.emr.step import StreamingStep import six import sure # noqa from moto import mock_emr_deprecated...
from datetime import date from random import randint from django.core.exceptions import ValidationError from django.test import TestCase from rapidsms.contrib.locations.models import Location, LocationType from survey.models import BatchQuestionOrder, GroupCondition, HouseholdHead, QuestionModule, Indicator, Formula, ...
import pytest from aioresponses import aioresponses import rasa.core from rasa.core.actions import action from rasa.core.actions.action import ( ACTION_DEACTIVATE_FORM_NAME, ACTION_DEFAULT_ASK_AFFIRMATION_NAME, ACTION_DEFAULT_ASK_REPHRASE_NAME, ACTION_DEFAULT_FALLBACK_NAME, ACTION_LISTEN_NAME, ACTION_RESTA...
import time import datetime import pymongo import pyes import redis import celery import mongoengine as mongo from pyes.query import MatchQuery from django.conf import settings from django.contrib.auth.models import User from apps.search.tasks import IndexSubscriptionsForSearch from apps.search.tasks import IndexSubscr...
import math import cPickle import cocos from cocos import euclid import pyglet from pyglet.gl import * import copy class Skin(cocos.cocosnode.CocosNode): def __init__(self, skeleton): super(Skin, self).__init__() self.skeleton = skeleton class ColorSkin(Skin): def __init__(self, skeleton, c...
# 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) 2012 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
#! /usr/bin/env python import os import subprocess import re import sys import fnmatch import commands from collections import defaultdict from sourcefile import SourceFile from optparse import OptionParser lint_root = os.path.dirname(os.path.abspath(__file__)) repo_root = os.path.dirname(os.path.dirname(lint_root)...
# Copyright (c) 2006-2012 Filip Wasilewski <http://en.ig.ma/> # Copyright (c) 2012-2016 The PyWavelets Developers # <https://github.com/PyWavelets/pywt> # See COPYING for license details. """ The thresholding helper module implements the most popular signal thresholding functions. """ from __f...
# The content of this file was contributed by leppton # (http://mail.python.org/pipermail/patches/2006-November/020942.html) to # ctypes project, under MIT License. # This example shows how to use ctypes module to read all # function names from dll export directory import os if os.name != "nt": raise Exception("W...
# Copyright 2020 The FedLearner Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- from django import template from django.contrib.sites.models import Site from django.core.urlresolvers import reverse, NoReverseMatch from django.utils.encoding import force_text from django.utils.six.moves.urllib.parse import unquote from django.utils.translation import get_language, ugettext ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Midokura Japan K.K. # Copyright (C) 2013 Midokura PTE LTD # 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 th...
from __future__ import unicode_literals from django.contrib import admin from django.contrib.auth import logout from django.contrib.messages import error from django.contrib.redirects.models import Redirect from django.core.exceptions import MiddlewareNotUsed from django.core.urlresolvers import reverse, resolve from ...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, print_function, unicode_literals, absolute_import """ This module defines utility classes and functions. """ import six from io import open import os import tempfile from subp...
import logging from collections import namedtuple from typing import Union import urllib from sqlalchemy import create_engine, MetaData, Column, Table, select, asc, desc, and_ from sqlalchemy import engine from sqlalchemy.sql import Select from sqlalchemy.sql.functions import Function from sqlalchemy.sql.expression im...
""" Tests for django test runner """ from __future__ import absolute_import, unicode_literals import sys from optparse import make_option from django.core.exceptions import ImproperlyConfigured from django.core.management import call_command from django import db from django.test import simple, TransactionTestCase, s...
import pygame import pygame.camera from pygame.locals import * #import wx import time from datetime import date import numpy import Image import zbar from pgu import gui pygame.init() pygame.camera.init() automatic = False pause = 0.1 size = ( 640 , 480 ) window_size = ( 640 , 480 ) shrunken = size camlist = pygame.ca...
#!/usr/bin/env python3 import os import sys import argparse import glob import shutil ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(ZULIP_PATH) from scripts.lib.zulip_tools import run, run_as_root, OKBLUE, ENDC, \ get_dev_uuid_var_path, file_or_package_h...
# Copyright (c) 2008, Aldo Cortesi. All rights reserved. # # 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,...
""" .. _tut_stats_cluster_source_rANOVA: ====================================================================== Repeated measures ANOVA on source data with spatio-temporal clustering ====================================================================== This example illustrates how to make use of the clustering funct...
import logging import warnings import flask import werkzeug.exceptions from airflow._vendor.connexion.apis import flask_utils from airflow._vendor.connexion.apis.abstract import AbstractAPI from airflow._vendor.connexion.handlers import AuthErrorHandler from airflow._vendor.connexion.jsonifier import Jsonifier from ai...
# -*- encoding: utf-8 from sqlalchemy import and_ from sqlalchemy import Column from sqlalchemy import DDL from sqlalchemy import desc from sqlalchemy import event from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import Identity from sqlalchemy import Integer from sqlalchemy import literal ...
#!/usr/bin/python2.6 from eventlet.queue import LifoQueue as Queue import eventlet eventlet.monkey_patch() from clusto import script_helper from sgext.drivers import SGServer, EC2Zone from clusto.drivers import Pool from clusto.services.config import conf, get_logger import clusto import sgext import kombu from trac...
import logging from consts.ranking_indexes import RankingIndexes from models.event_details import EventDetails class RankingsHelper(object): SORT_ORDERS = { 2019: [2, 3, 4, 5, 6], 2018: [2, 3, 4, 5, 6], 2017: [2, 3, 4, 5, 6, 7], 2016: [2, 3, 4, 5, 6], 2015: [2, 5, 3, 4, 7,...
# -*- coding: utf-8 -*- """Mimic C structs with lots of extra functionality. $Id: ipstruct.py 1950 2006-11-28 19:15:35Z vivainio $""" #***************************************************************************** # Copyright (C) 2001-2004 Fernando Perez <fperez@colorado.edu> # # Distributed under the terms of ...
#!/usr/bin/env python # Copyright 2013 The Swarming Authors. All rights reserved. # Use of this source code is governed by the Apache v2.0 license that can be # found in the LICENSE file. import datetime import logging import os import sys import time import unittest import urllib ROOT_DIR = os.path.dirname(os.path.d...
#!/usr/bin/python # coding=utf-8 from catcher.api.resource import Collection, Item from catcher import models as m from catcher.resources.tournamentCreater import TournamentCreater from catcher.models.queries import Queries from catcher.api.privileges import Privilege import falcon import logging import datetime from...
import socket import socketserver import threading import json import re from node import Node from ring import ConsistentRing import api.tcpclient as client # The node containing container (our node container only) and the ring metadata node = None # Globals for commands ADD_NODE = { "cmd": "addnode", "arg...
import json import time from django.contrib.auth.models import User from django.core import management from django.test import TestCase, TransactionTestCase from django.test.utils import override_settings from restlib2.http import codes from avocado.history.models import Revision from avocado.models import DataField,...
# 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...
from __future__ import with_statement, absolute_import from django.contrib import admin from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.views.main import ChangeList, SEARCH_VAR, ALL_VAR from django.contrib.auth.models import User from django.template import Context, Templat...
# Copyright 2015-2017 Espressif Systems (Shanghai) PTE 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 applicable ...
################################################################################ # Copyright (C) 2011-2012,2014 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ import numpy as np import scipy.special as special from bay...
# pyOCD debugger # Copyright (c) 2018-2020 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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...