gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import ast import builtins import itertools import logging import re import sys from collections import namedtuple from contextlib import suppress from functools import lru_cache, partial from keyword import iskeyword import attr import pycodestyle __version__ = "21.4.3" LOG = logging.getLogger("flake8.bugbear") ...
""" bwdata contains the BWData class. """ import datetime from . import filters import logging logger = logging.getLogger("bwapi") class BWData: """ This class is a superclass for brandwatch BWQueries and BWGroups. It was built to handle resources that access data (e.g. mentions, topics, charts, etc). "...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'Node.name' db.alter_column(u'oozie_node', 'name', self...
from pyramid.view import view_config import csv import json import logging from c2cgeoportal_geoportal.views.theme import Theme from c2cgeoportal_commons.models import DBSession from pyramid.i18n import make_localizer, TranslationStringFactory from pyramid.interfaces import ITranslationDirectories from pyramid.threadlo...
from __future__ import print_function, absolute_import, division import warnings from distutils.version import LooseVersion import pytest import numpy as np import astropy from astropy.wcs import WCS from astropy import units as u from astropy.io import fits from ..spectral_cube import SpectralCube, VarianceWarning...
from __future__ import unicode_literals, division, absolute_import import logging from datetime import datetime from dateutil import parser from pytvmaze import get_show, episode_by_number, episodes_by_date from pytvmaze.exceptions import ShowNotFound, EpisodeNotFound, NoEpisodesForAirdate, IllegalAirDate, Connection...
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Fabrice Laporte # # 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 t...
from django.conf import settings from django.contrib import messages from django.contrib.auth import views as auth_views from django.contrib.auth import update_session_auth_hash from django.contrib.auth.forms import PasswordChangeForm from django.http import Http404 from django.shortcuts import redirect, render from dj...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Sub programs for doing the measurements author : Eoin O'Farrell email : phyoec@nus.edu.sg last edited : July 2013 Explantion: There are 3 variables in our instrument: 1 Temperature 2 Field 3 Device parameter; e.g. Backgate V, Topgate V, Current, Angle (one day) T...
import json import logging from sqlalchemy import or_ from flask import Blueprint, request, url_for from grano.lib.serialisation import jsonify from grano.lib.args import object_or_404, get_limit from grano.core import db, app_name from grano.lib.exc import BadRequest from grano.model import Entity, Project, Property...
# SPDX-License-Identifier: Apache-2.0 # Copyright 2016 Eotvos Lorand University, Budapest, Hungary from compiler_log_warnings_errors import addError, addWarning from utils.codegen import format_expr, format_type, format_statement, format_declaration from compiler_common import statement_buffer_value, generate_var_name...
# 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 datetime import os import shutil import tempfile import time import unittest from infra.services.builder_alerts import buildbot # Unused argument -...
"""Test zha lock.""" from unittest.mock import patch import pytest import zigpy.profiles.zha import zigpy.zcl.clusters.closures as closures import zigpy.zcl.clusters.general as general import zigpy.zcl.foundation as zcl_f from homeassistant.const import ( STATE_LOCKED, STATE_UNAVAILABLE, STATE_UNLOCKED, ...
#!/usr/bin/python #coding: utf-8 #(c) 2013 Julian Ceballos <@jceb> import os import base64 import inspect import urllib from httplib2 import Http try: import json except ImportError: import simplejson as json API_VERSION = '0.3.0' __version__ = '1.1.0' __author__ = 'Julian Ceballos' API_BASE = 'https://api...
""" shared options and groups The principle here is to define options once, but *not* instantiate them globally. One reason being that options with action='append' can carry state between parses. pip parse's general options twice internally, and shouldn't pass on state. To be consistent, all options will follow this d...
#!/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...
# coding=utf-8 # Copyright 2022 The Uncertainty Baselines Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
#!/usr/bin/env python ################################################################################ # Created by Oscar Martinez # # o.rubi@esciencecenter.nl # #######################################################...
#!/usr/bin/env python3 """Search Windows registry keys, values, and data for a particular string.""" import argparse import sys import winreg # Hive name -> hive handle map HIVE_ABBR = { "HKCR": winreg.HKEY_CLASSES_ROOT, "HKCU": winreg.HKEY_CURRENT_USER, "HKLM": winreg.HKEY_LOCAL_MACHINE, "HKU": win...
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2021, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
#!/usr/bin/env python # Copyright (C) 2013 Adobe Systems Incorporated. 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 n...
# -*- coding: utf-8 -*- from distutils.version import LooseVersion from classytags.arguments import Argument from classytags.core import Options, Tag from classytags.helpers import InclusionTag from cms.utils import get_cms_setting from cms.utils.admin import get_admin_menu_item_context from cms.utils.permissions impo...
# Written by Bram Cohen # modified for multitracker operation by John Hoffman # see LICENSE.txt for license information from BitTornado.zurllib import urlopen from urllib import quote from btformats import check_peers from BitTornado.bencode import bdecode from threading import Thread, Lock from cStringIO import Strin...
from __future__ import unicode_literals from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, models, router, transaction from django...
from _ebcf_alexa import env from _ebcf_alexa import wods from _ebcf_alexa.speechlet import SSML as assert_valid_ssml # not really an assert, but this does do validation from datetime import datetime, date from textwrap import dedent from unittest.mock import patch, Mock import io import pytest import urllib.parse as p...
#!/usr/bin/env vpython3 # Copyright 2020 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. """Tests for chrome_proxy_utils.""" #pylint: disable=protected-access import os import unittest from pylib.utils import chrome_prox...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from datetime import date, datetime, time, timedelta from decimal import Decimal import unittest import uuid from mock import patch import numpy ...
from pandac.PandaModules import Point3, CollisionSphere, CollisionNode, BitMask32, Vec3, NodePath, TextNode, Vec4 from otp.otpbase import OTPGlobals from otp.otpbase import OTPLocalizer from direct.interval.IntervalGlobal import Sequence, Parallel, SoundInterval from direct.interval.FunctionInterval import Wait from di...
from __future__ import annotations from collections import defaultdict import csv import datetime from enum import Enum import itertools from typing import ( Any, Callable, DefaultDict, Iterable, Sequence, cast, final, ) import warnings import numpy as np import pandas._libs.lib as lib im...
""" Support for Epson projector. For more details about this component, please refer to the documentation at https://home-assistant.io/components/media_player.epson/ """ import logging import voluptuous as vol from homeassistant.components.media_player import ( DOMAIN, MEDIA_PLAYER_SCHEMA, PLATFORM_SCHEMA, SUPPO...
import unittest from os.path import abspath, dirname, join, normpath from robot.utils.asserts import assert_equals from robot.testdoc import JsonConverter, TestSuiteFactory DATADIR = join(dirname(abspath(__file__)), '..', '..', 'atest', 'testdata', 'misc') def test_convert(item, **expected): for name in expecte...
# Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk) # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Half-sphere exposure and coordination number calculation.""" from __future__ import pr...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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/LICEN...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals, print_function import os import unittest from datetime import datetime import six from httmock import urlmatch, HTTMock, response from wechatpy import WeChatClient from wechatpy._compat import json _TESTS_PATH = os.path.abspath(os.pat...
from abc import ABCMeta, abstractmethod from collections import namedtuple import hashlib from textwrap import dedent import warnings from logbook import Logger import numpy import pandas as pd from pandas import read_csv import pytz import requests from six import StringIO, iteritems, with_metaclass from zipline.err...
"""The tests for the Demo vacuum platform.""" import pytest from homeassistant.components import vacuum from homeassistant.components.demo.vacuum import ( DEMO_VACUUM_BASIC, DEMO_VACUUM_COMPLETE, DEMO_VACUUM_MINIMAL, DEMO_VACUUM_MOST, DEMO_VACUUM_NONE, DEMO_VACUUM_STATE, FAN_SPEEDS, ) from ...
import collections import copy import os import sphinx.util from sphinx.util.console import bold import sphinx.util.docstrings import sphinx.util.logging from ..base import SphinxMapperBase from .parser import Parser from .objects import ( PythonClass, PythonFunction, PythonModule, PythonMethod, P...
# -*- coding: utf-8 -*- # 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...
# Copyright (c) 2012 Rackspace Hosting # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
# 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 ...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
""" Python Markdown A Python implementation of John Gruber's Markdown. Documentation: https://python-markdown.github.io/ GitHub: https://github.com/Python-Markdown/markdown/ PyPI: https://pypi.org/project/Markdown/ Started by Manfred Stienstra (http://www.dwerg.net/). Maintained for a few years by Yuri Takhteyev (ht...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Generates C++ source files from a mojom.Module.""" import mojom.generate.generator as generator import mojom.generate.module as mojom import mojom.genera...
#!/usr/bin/env python # CREATED:2013-08-22 12:20:01 by Brian McFee <brm2132@columbia.edu> '''Music segmentation using timbre, pitch, repetition and time. ''' import argparse import logging import sys import numpy as np import scipy.signal import scipy.linalg import librosa import msaf from msaf.algorithms.interface ...
# Copyright 2013 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 ...
# Copyright 2013 Canonical 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 # # Unless required b...
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
#!/usr/bin/env python #coding=utf8 from util.rectangle import Rectangle import struct class MapObject(object): """ Base map data object. """ __slots__ = () # Structures describing how the data is stored inside their respective lumps. STRUCT_DOOM = None STRUCT_HEXEN = None ...
from django.contrib import admin from django import forms from metashare import settings from metashare.repository.editor.superadmin import SchemaModelAdmin from metashare.repository.editor.inlines import SchemaModelInline from metashare.repository.models import documentUnstructuredString_model admin.site.register(doc...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): is_dangerous = True def forwards(self, orm): db.alter_column( 'sentry_release', ...
import os from django.template import Context, Engine, TemplateSyntaxError from django.template.base import Node from django.template.library import InvalidTemplateLibrary from django.test import SimpleTestCase from django.test.utils import extend_sys_path from .templatetags import custom, inclusion from .utils impor...
# Copyright 2013: Mirantis 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 b...
''' Download MHCflurry released datasets and trained models. Examples Fetch the default downloads: $ mhcflurry-downloads fetch Fetch a specific download: $ mhcflurry-downloads fetch models_class1_pan Get the path to a download: $ mhcflurry-downloads path models_class1_pan Get the URL of a download: ...
# # 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...
# -*- coding: utf-8 -*- """ assets logic ~~~~~~~~~~~~ exposes logic for managing and making-use-of static assets. :author: Sam Gammon <sg@samgammon.com> :copyright: (c) Sam Gammon, 2014 :license: This software makes use of the MIT Open Source License. A copy of this license is included as ``...
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2013 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 ...
__all__ = ['Distribution'] import re from distutils.core import Distribution as _Distribution from setuptools.depends import Require from setuptools.command.install import install from setuptools.command.sdist import sdist from setuptools.command.install_lib import install_lib from distutils.errors import DistutilsOpt...
#!/usr/bin/env python # # rbssh.py -- A custom SSH client for use in Review Board. # # This is used as an ssh replacement that can be used across platforms with # a custom .ssh directory. OpenSSH doesn't respect $HOME, instead reading # /etc/passwd directly, which causes problems for us. Using rbssh, we can # work arou...
# # # Copyright (c) 2014, 2015, 2016, 2017 Psyop Media Company, LLC # See license.txt # # import tests import os import json def get_all_cryptomatte_tests(): return [ Cryptomatte000, Cryptomatte001, Cryptomatte002, Cryptomatte003, Cryptomatte010, Cryptomatte020, Cryptomatte030 ] ##########...
# Copyright (c) 2012 Andy Davidoff http://www.disruptek.com/ # Copyright (c) 2010 Jason R. Coombs http://www.jaraco.com/ # Copyright (c) 2008 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "...
import os import pkg_resources import tempfile import unittest import mock import numpy import six import chainer from chainer import cuda from chainer import gradient_check from chainer import links from chainer.links import caffe from chainer import testing from chainer.testing import attr from chainer.testing impo...
__author__ = 'Batchu Vishal' import pygame import math import sys import os from .person import Person from .onBoard import OnBoard from .coin import Coin from .player import Player from .fireball import Fireball from .monsterPerson import MonsterPerson class Board(object): ''' This class defines our gameboa...
from vtdb import dbexceptions from vtdb import field_types import framework import cache_cases1 import cache_cases2 import cases_framework class TestWillNotBeCached(framework.TestCase): def setUp(self): self.env.log.reset() def tearDown(self): self.env.execute("drop table vtocc_nocache") def test_n...
import threading import logging import subprocess import pycountry import gnupg import obelisk import json import random import time import urllib2 from bitcoin import ( apply_multisignatures, mk_multisig_script, mktx, multisign, scriptaddr ) from tornado import iostream import tornado.websocket fro...
from __future__ import unicode_literals import json import base64 import boto import boto.cloudformation import boto.datapipeline import boto.ec2 import boto.ec2.autoscale import boto.ec2.elb from boto.exception import BotoServerError import boto.iam import boto.redshift import boto.sns import boto.sqs import boto.vpc...
""" corpkit: add annotations to conll-u via concordancing """ def process_special_annotation(v, lin): """ If the user wants a fancy annotation, like 'add middle column', this gets processed here. it's potentially the place where the user could add entropy score, or something like that. """ if v...
# Copyright 2016 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 ...
from collections import defaultdict from sympy import Sieve, binomial_coefficients, binomial_coefficients_list, \ multinomial_coefficients, Mul, S, Pow, sieve, Symbol, summation, \ factorial as fac, pi, GoldenRatio as phi, sqrt from sympy.core.numbers import Integer, Rational from sympy.core.compatibility impor...
#! /usr/bin/env python3 import argparse import math import sys def add(a, b): """Perform Addition of two numbers passed as arguments.""" val = a + b return val def sub(a, b): """Perform Subtraction of two numbers passed as arguments.""" val = a - b return val def div(a, b): """Perform...
# -*- coding: utf-8 -*- from functools import partial from datetime import datetime from kivy.uix.floatlayout import FloatLayout from kivy.uix.screenmanager import Screen from kivy.uix.dropdown import DropDown from kivy.uix.boxlayout import BoxLayout from kivy.uix.relativelayout import RelativeLayout from kivy.uix.l...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016 F5 Networks Inc. # # This file is part of Ansible # # Ansible 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 # ...
import maya.api.OpenMaya as om # necessary because new api doesn't have iterators import maya.OpenMaya as oldOm import maya.api.OpenMayaRender as omr import maya.api.OpenMayaAnim as oma import maya.api.OpenMayaUI as omui import pymel.core as pm import os import inspect import traceback import collections """ This code...
# -*- coding: utf-8 -*- import requests from django.apps import apps from django.contrib.postgres import fields from django.core.exceptions import ValidationError from typedmodels.models import TypedModel from api.taxonomies.utils import optimize_subject_query from django.db import models from django.db.models.signals...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE """Use blog post test to test user permissions logic""" import frappe import frappe.defaults import frappe.model.meta from frappe.permissions import (add_user_permission, remove_user_permission, clear_user_permissions_for...
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy import String from sqlalchemy import util from sqlalchemy.orm import create_session from sqlalchemy.orm import mapper from sqlalchemy.orm import polymorphic_union from sqlalchemy.orm import relationship from sqlalchemy.testing import Asser...
""" Additional functions and demos for acoustics equations. """ import sys, os from clawpack import pyclaw from clawpack import riemann from matplotlib import animation from IPython.display import HTML import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import numpy as np from ipywidgets import widge...
# Copyright 2016 Twitter. 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 agree...
""" SVN. Copyright (c) 2013 - 2015 Isaac Muse <isaacmuse@gmail.com> License: MIT """ import xml.etree.ElementTree as ET import os import re import subprocess import sys NO_LOCK = 0 LOCAL_LOCK = 1 REMOTE_LOCK = 2 ORPHAN_LOCK = 3 if sys.platform.startswith('win'): _PLATFORM = "windows" elif sys.platform == "darwin...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, Adam Miller <maxamillion@fedoraproject.org> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata...
# Copyright 2012 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 # # Unless required by a...
import copy import os import logging import pickle from typing import Dict, List, Optional, Union try: import sigopt as sgo Connection = sgo.Connection except ImportError: sgo = None Connection = None from ray.tune.suggest import Searcher logger = logging.getLogger(__name__) class SigOptSearch(Sear...
# Copyright 2013 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...
# mypy: ignore-errors # # This source file is part of the EdgeDB open source project. # # Copyright 2020-present MagicStack Inc. and the EdgeDB authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the ...
# Copyright (c) 2010-2012 OpenStack, 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 ...
# Copyright 2013 Cloudera 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 writing...
<<<<<<< HEAD <<<<<<< HEAD import unittest from test import support from ctypes import * import _ctypes_test lib = CDLL(_ctypes_test.__file__) class StringPtrTestCase(unittest.TestCase): @support.refcount_test def test__POINTER_c_char(self): class X(Structure): _fields_ = [("str", POINTER...
"""This is the actual code we use to score people's solutions server-side. The interfaces here are not yet stable, but we include them so that people can reproduce our scoring calculations independently. We correspondly do not currently import this module. """ import os from collections import defaultdict import jso...
import global_vars import functions import random ###events### """ 0 = Take random time 1 = Perform CCA-Clear Channel Assesment 2 = Send echo 3 = Send payload 4 = update lookup tables 5 = random node entry 6 = Presence entry 7 = node takes a step 8 = propagate the new gateway of cloud A 9 = forward payload 10 = Term...
# 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/python3 # -*- coding: utf8 -* # Import Graphic Lib from PyQt5.QtWidgets import (QApplication, QMainWindow, QToolTip, QPushButton, QWidget, QStackedWidget, QHBoxLayout, QVBoxLayout, QLabel, QLineEdit, QFormLayout, QDockWidget, QListWidget, QListWidgetItem, QAction, qApp, QButtonGroup, QProgres...
# $Id: frontend.py 6205 2009-11-30 08:11:08Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Command-line and common processing for Docutils front-end tools. Exports the following classes: * `OptionParser`: Standard Docutils command-line process...
# Copyright 2012 NEC 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 applicable law or ag...
import copy from sqlalchemy import util, sql, exc, testing from sqlalchemy.testing import assert_raises, assert_raises_message, fixtures from sqlalchemy.testing import eq_, is_, ne_, fails_if from sqlalchemy.testing.util import picklers, gc_collect from sqlalchemy.util import classproperty, WeakSequence class KeyedT...
"""CherryPy dispatchers. A 'dispatcher' is the object which looks up the 'page handler' callable and collects config for the current request based on the path_info, other request attributes, and the application architecture. The core calls the dispatcher as early as possible, passing it a 'path_info' argument. The de...
#!/usr/bin/env python3 # Copyright 2017 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
""" Copyright (C) 2012 Alan J Lockett 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,...
'''VMSS Zones - tool to visualize multi-zone scale sets''' import json import os import sys import threading import tkinter as tk from time import sleep, strftime from tkinter import messagebox import subscription import vmssz # size and color defaults btnwidth = 14 entrywidth = 15 if os.name == 'posix': # Mac OS ...